annotate extensions/dict_sip/dict_sip.c @ 1318:2a5620128a9a

Remove '*' from the couple enumerated values that had them. This was inconsistent and caused trouble with extensions that want to add enumerated values to existing enumerations.
author Thomas Klausner <tk@giga.or.at>
date Mon, 23 Jan 2017 15:26:25 +0100
parents c473581adff2
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
331
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1 /*********************************************************************************************************
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2 * Software License Agreement (BSD License) *
334
b7f0dac3ae77 Update copyright information for Alexandre's contributions.
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 331
diff changeset
3 * Author: Alexandre Westfahl <awestfahl@freediameter.net> *
331
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
4 * *
342
adffe87cfb6d Fixed copyright, removed unused defines, fix type of SIP-Server-URI.
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 334
diff changeset
5 * Copyright (c) 2010, Alexandre Westfahl, Teraoka Laboratory (Keio University), and the WIDE Project. * *
331
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
6 * All rights reserved. *
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
7 * *
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
8 * Redistribution and use of this software in source and binary forms, with or without modification, are *
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
9 * permitted provided that the following conditions are met: *
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
10 * *
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
11 * * Redistributions of source code must retain the above *
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
12 * copyright notice, this list of conditions and the *
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
13 * following disclaimer. *
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
14 * *
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
15 * * Redistributions in binary form must reproduce the above *
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
16 * copyright notice, this list of conditions and the *
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
17 * following disclaimer in the documentation and/or other *
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
18 * materials provided with the distribution. *
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
19 * *
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
20 * * Neither the name of the Teraoka Laboratory nor the *
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
21 * names of its contributors may be used to endorse or *
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
22 * promote products derived from this software without *
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
23 * specific prior written permission of Teraoka Laboratory *
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
24 * *
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
25 * *
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
26 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED *
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
27 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A *
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
28 * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR *
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
29 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT *
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
30 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS *
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
31 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR *
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
32 * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF *
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
33 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
34 *********************************************************************************************************/
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
35
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
36 #include <freeDiameter/extension.h>
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
37
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
38
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
39
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
40 /* The content of this file follows the same structure as dict_base_proto.c */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
41
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
42 #define CHECK_dict_new( _type, _data, _parent, _ref ) \
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
43 CHECK_FCT( fd_dict_new( fd_g_config->cnf_dict, (_type), (_data), (_parent), (_ref)) );
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
44
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
45 #define CHECK_dict_search( _type, _criteria, _what, _result ) \
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
46 CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, (_type), (_criteria), (_what), (_result), ENOENT) );
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
47
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
48 struct local_rules_definition {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
49 char *avp_name;
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
50 enum rule_position position;
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
51 int min;
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
52 int max;
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
53 };
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
54
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
55 #define RULE_ORDER( _position ) ((((_position) == RULE_FIXED_HEAD) || ((_position) == RULE_FIXED_TAIL)) ? 1 : 0 )
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
56
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
57 #define PARSE_loc_rules( _rulearray, _parent) { \
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
58 int __ar; \
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
59 for (__ar=0; __ar < sizeof(_rulearray) / sizeof((_rulearray)[0]); __ar++) { \
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
60 struct dict_rule_data __data = { NULL, \
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
61 (_rulearray)[__ar].position, \
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
62 0, \
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
63 (_rulearray)[__ar].min, \
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
64 (_rulearray)[__ar].max}; \
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
65 __data.rule_order = RULE_ORDER(__data.rule_position); \
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
66 CHECK_FCT( fd_dict_search( \
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
67 fd_g_config->cnf_dict, \
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
68 DICT_AVP, \
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
69 AVP_BY_NAME, \
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
70 (_rulearray)[__ar].avp_name, \
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
71 &__data.rule_avp, 0 ) ); \
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
72 if ( !__data.rule_avp ) { \
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
73 TRACE_DEBUG(INFO, "AVP Not found: '%s'", (_rulearray)[__ar].avp_name ); \
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
74 return ENOENT; \
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
75 } \
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
76 CHECK_FCT_DO( fd_dict_new( fd_g_config->cnf_dict, DICT_RULE, &__data, _parent, NULL), \
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
77 { \
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
78 TRACE_DEBUG(INFO, "Error on rule with AVP '%s'", \
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
79 (_rulearray)[__ar].avp_name ); \
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
80 return EINVAL; \
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
81 } ); \
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
82 } \
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
83 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
84
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
85 #define enumval_def_u32( _val_, _str_ ) \
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
86 { _str_, { .u32 = _val_ }}
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
87
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
88 #define enumval_def_os( _len_, _val_, _str_ ) \
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
89 { _str_, { .os = { .data = (unsigned char *)_val_, .len = _len_ }}}
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
90
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
91
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
92
614
b15620f1b1a4 Fix some compilation warning on OpenSUSE
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 342
diff changeset
93 int ds_dict_init(char * conffile)
331
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
94 {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
95 struct dict_object * sip;
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
96 {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
97 struct dict_application_data data = { 6, "Diameter Session Initiation Protocol (SIP) Application" };
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
98 CHECK_dict_new( DICT_APPLICATION, &data , NULL, &sip);
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
99 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
100
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
101 /* AVP section */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
102 {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
103 struct dict_object * UTF8String_type;
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
104 struct dict_object * DiameterURI_type;
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
105
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
106 CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "UTF8String", &UTF8String_type);
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
107 CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "DiameterURI", &DiameterURI_type);
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
108
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
109 /* Digest AVPs (from RADIUS) */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
110
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
111 /* Digest-Response */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
112 {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
113 /*
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
114
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
115 */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
116
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
117 struct dict_avp_data data = {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
118 103, /* Code */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
119 0, /* Vendor */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
120 "Digest-Response", /* Name */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
121 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
122 AVP_FLAG_MANDATORY, /* Fixed flag values */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
123 AVP_TYPE_OCTETSTRING /* base type of data */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
124 };
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
125 CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL);
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
126 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
127
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
128 /* Digest-Realm */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
129 {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
130 /*
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
131
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
132 */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
133
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
134 struct dict_avp_data data = {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
135 104, /* Code */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
136 0, /* Vendor */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
137 "Digest-Realm", /* Name */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
138 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
139 AVP_FLAG_MANDATORY, /* Fixed flag values */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
140 AVP_TYPE_OCTETSTRING /* base type of data */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
141 };
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
142 CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL);
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
143 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
144
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
145 /* Digest-Nonce */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
146 {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
147 /*
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
148
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
149 */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
150
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
151 struct dict_avp_data data = {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
152 105, /* Code */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
153 0, /* Vendor */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
154 "Digest-Nonce", /* Name */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
155 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
156 AVP_FLAG_MANDATORY, /* Fixed flag values */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
157 AVP_TYPE_OCTETSTRING /* base type of data */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
158 };
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
159 CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL);
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
160 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
161
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
162 /* Digest-Response-Auth */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
163 {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
164 /*
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
165
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
166 */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
167
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
168 struct dict_avp_data data = {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
169 106, /* Code */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
170 0, /* Vendor */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
171 "Digest-Response-Auth", /* Name */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
172 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
173 AVP_FLAG_MANDATORY, /* Fixed flag values */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
174 AVP_TYPE_OCTETSTRING /* base type of data */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
175 };
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
176 CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL);
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
177 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
178
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
179 /* Digest-Nextnonce */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
180 {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
181 /*
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
182
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
183 */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
184
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
185 struct dict_avp_data data = {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
186 107, /* Code */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
187 0, /* Vendor */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
188 "Digest-Nextnonce", /* Name */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
189 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
190 AVP_FLAG_MANDATORY, /* Fixed flag values */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
191 AVP_TYPE_OCTETSTRING /* base type of data */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
192 };
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
193 CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL);
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
194 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
195
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
196 /* Digest-Method */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
197 {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
198 /*
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
199
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
200 */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
201
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
202 struct dict_avp_data data = {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
203 108, /* Code */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
204 0, /* Vendor */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
205 "Digest-Method", /* Name */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
206 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
207 AVP_FLAG_MANDATORY, /* Fixed flag values */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
208 AVP_TYPE_OCTETSTRING /* base type of data */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
209 };
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
210 CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL);
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
211 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
212
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
213 /* Digest-URI */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
214 {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
215 /*
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
216
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
217 */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
218
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
219 struct dict_avp_data data = {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
220 109, /* Code */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
221 0, /* Vendor */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
222 "Digest-URI", /* Name */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
223 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
224 AVP_FLAG_MANDATORY, /* Fixed flag values */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
225 AVP_TYPE_OCTETSTRING /* base type of data */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
226 };
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
227 CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL);
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
228 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
229
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
230 /* Digest-QoP */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
231 {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
232 /*
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
233
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
234 */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
235
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
236 struct dict_avp_data data = {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
237 110, /* Code */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
238 0, /* Vendor */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
239 "Digest-QoP", /* Name */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
240 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
241 AVP_FLAG_MANDATORY, /* Fixed flag values */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
242 AVP_TYPE_OCTETSTRING /* base type of data */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
243 };
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
244 CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL);
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
245 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
246
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
247 /* Digest-Algorithm */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
248 {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
249 /*
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
250
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
251 */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
252
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
253 struct dict_avp_data data = {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
254 111, /* Code */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
255 0, /* Vendor */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
256 "Digest-Algorithm", /* Name */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
257 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
258 AVP_FLAG_MANDATORY, /* Fixed flag values */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
259 AVP_TYPE_OCTETSTRING /* base type of data */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
260 };
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
261 CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL);
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
262 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
263
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
264 /* Digest-Entity-Body-Hash */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
265 {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
266 /*
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
267
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
268 */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
269
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
270 struct dict_avp_data data = {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
271 112, /* Code */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
272 0, /* Vendor */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
273 "Digest-Entity-Body-Hash", /* Name */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
274 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
275 AVP_FLAG_MANDATORY, /* Fixed flag values */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
276 AVP_TYPE_OCTETSTRING /* base type of data */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
277 };
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
278 CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL);
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
279 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
280
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
281 /* Digest-CNonce */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
282 {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
283 /*
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
284
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
285 */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
286
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
287 struct dict_avp_data data = {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
288 113, /* Code */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
289 0, /* Vendor */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
290 "Digest-CNonce", /* Name */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
291 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
292 AVP_FLAG_MANDATORY, /* Fixed flag values */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
293 AVP_TYPE_OCTETSTRING /* base type of data */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
294 };
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
295 CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL);
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
296 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
297
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
298 /* Digest-Nonce-Count */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
299 {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
300 /*
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
301
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
302 */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
303
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
304 struct dict_avp_data data = {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
305 114, /* Code */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
306 0, /* Vendor */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
307 "Digest-Nonce-Count", /* Name */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
308 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
309 AVP_FLAG_MANDATORY, /* Fixed flag values */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
310 AVP_TYPE_OCTETSTRING /* base type of data */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
311 };
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
312 CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL);
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
313 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
314
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
315 /* Digest-Username */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
316 {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
317 /*
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
318
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
319 */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
320
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
321 struct dict_avp_data data = {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
322 115, /* Code */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
323 0, /* Vendor */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
324 "Digest-Username", /* Name */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
325 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
326 AVP_FLAG_MANDATORY, /* Fixed flag values */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
327 AVP_TYPE_OCTETSTRING /* base type of data */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
328 };
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
329 CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL);
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
330 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
331
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
332 /* Digest-Opaque */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
333 {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
334 /*
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
335
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
336 */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
337
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
338 struct dict_avp_data data = {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
339 116, /* Code */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
340 0, /* Vendor */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
341 "Digest-Opaque", /* Name */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
342 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
343 AVP_FLAG_MANDATORY, /* Fixed flag values */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
344 AVP_TYPE_OCTETSTRING /* base type of data */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
345 };
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
346 CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL);
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
347 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
348
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
349 /* Digest-Auth-Param */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
350 {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
351 /*
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
352
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
353 */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
354
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
355 struct dict_avp_data data = {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
356 117, /* Code */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
357 0, /* Vendor */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
358 "Digest-Auth-Param", /* Name */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
359 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
360 AVP_FLAG_MANDATORY, /* Fixed flag values */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
361 AVP_TYPE_OCTETSTRING /* base type of data */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
362 };
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
363 CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL);
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
364 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
365
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
366 /* Digest-AKA-Auts */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
367 {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
368 /*
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
369
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
370 */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
371
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
372 struct dict_avp_data data = {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
373 118, /* Code */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
374 0, /* Vendor */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
375 "Digest-AKA-Auts", /* Name */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
376 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
377 AVP_FLAG_MANDATORY, /* Fixed flag values */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
378 AVP_TYPE_OCTETSTRING /* base type of data */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
379 };
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
380 CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL);
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
381 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
382
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
383 /* Digest-Domain */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
384 {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
385 /*
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
386
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
387 */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
388
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
389 struct dict_avp_data data = {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
390 119, /* Code */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
391 0, /* Vendor */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
392 "Digest-Domain", /* Name */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
393 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
394 AVP_FLAG_MANDATORY, /* Fixed flag values */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
395 AVP_TYPE_OCTETSTRING /* base type of data */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
396 };
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
397 CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL);
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
398 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
399
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
400 /* Digest-Stale */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
401 {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
402 /*
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
403
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
404 */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
405
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
406 struct dict_avp_data data = {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
407 120, /* Code */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
408 0, /* Vendor */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
409 "Digest-Stale", /* Name */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
410 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
411 AVP_FLAG_MANDATORY, /* Fixed flag values */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
412 AVP_TYPE_OCTETSTRING /* base type of data */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
413 };
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
414 CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL);
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
415 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
416
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
417 /* Digest-HA1 */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
418 {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
419 /*
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
420
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
421 */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
422
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
423 struct dict_avp_data data = {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
424 121, /* Code */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
425 0, /* Vendor */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
426 "Digest-HA1", /* Name */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
427 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
428 AVP_FLAG_MANDATORY, /* Fixed flag values */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
429 AVP_TYPE_OCTETSTRING /* base type of data */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
430 };
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
431 CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL);
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
432 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
433 /* SIP-AOR */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
434 {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
435 /*
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
436
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
437 */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
438
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
439 struct dict_avp_data data = {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
440 122, /* Code */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
441 0, /* Vendor */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
442 "SIP-AOR", /* Name */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
443 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
444 AVP_FLAG_MANDATORY, /* Fixed flag values */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
445 AVP_TYPE_OCTETSTRING /* base type of data */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
446 };
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
447 CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL);
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
448 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
449
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
450
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
451 /* Diameter SIP AVPs*/
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
452 /* SIP-Accounting-Server-URI*/
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
453 {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
454 /*
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
455 The SIP-Accounting-Server-URI AVP (AVP Code 369) is of type
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
456 DiameterURI. This AVP contains the address of a Diameter server that
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
457 is able to receive SIP-session-related accounting information.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
458 */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
459
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
460 struct dict_avp_data data = {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
461 369, /* Code */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
462 0, /* Vendor */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
463 "SIP-Accounting-Server-URI", /* Name */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
464 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
465 AVP_FLAG_MANDATORY, /* Fixed flag values */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
466 AVP_TYPE_OCTETSTRING /* base type of data */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
467 };
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
468 CHECK_dict_new( DICT_AVP, &data , DiameterURI_type, NULL);
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
469 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
470 /* SIP-Credit-Control-Server-URI */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
471 {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
472 /*
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
473 The SIP-Credit-Control-Server-URI AVP (AVP Code 370) is of type
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
474 DiameterURI. This AVP contains the address of a Diameter server that
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
475 is able to authorize real-time credit control usage. The Diameter
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
476 Credit-Control Application [RFC4006] may be used for this purpose.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
477
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
478
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
479 */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
480
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
481 struct dict_avp_data data = {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
482 370, /* Code */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
483 0, /* Vendor */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
484 "SIP-Credit-Control-Server-URI", /* Name */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
485 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
486 AVP_FLAG_MANDATORY, /* Fixed flag values */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
487 AVP_TYPE_OCTETSTRING /* base type of data */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
488 };
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
489 CHECK_dict_new( DICT_AVP, &data , DiameterURI_type, NULL);
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
490 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
491
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
492 /* SIP-Accounting-Information */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
493 {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
494 /*
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
495 The SIP-Accounting-Information (AVP Code 368) is of type Grouped, and
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
496 contains the Diameter addresses of those nodes that are able to
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
497 collect accounting information.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
498
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
499 The SIP-Accounting-Information AVP is defined as follows (per the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
500 grouped-avp-def of RFC 3588 [RFC3588]):
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
501
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
502 SIP-Accounting-Information ::= < AVP Header: 368 >
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
503 * [ SIP-Accounting-Server-URI ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
504 * [ SIP-Credit-Control-Server-URI ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
505 * [ AVP]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
506
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
507 */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
508 struct dict_object * avp;
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
509 struct dict_avp_data data = {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
510 368, /* Code */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
511 0, /* Vendor */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
512 "SIP-Accounting-Information", /* Name */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
513 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
514 AVP_FLAG_MANDATORY, /* Fixed flag values */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
515 AVP_TYPE_GROUPED /* base type of data */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
516 };
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
517 struct local_rules_definition rules[] =
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
518 { { "SIP-Accounting-Server-URI", RULE_OPTIONAL, -1, -1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
519 ,{ "SIP-Credit-Control-Server-URI", RULE_OPTIONAL, -1, -1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
520 };
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
521
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
522 CHECK_dict_new( DICT_AVP, &data , NULL, &avp);
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
523 PARSE_loc_rules( rules, avp );
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
524 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
525
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
526 /* SIP-Server-URI */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
527 {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
528 /*
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
529 The SIP-Server-URI AVP (AVP Code 371) is of type UTF8String. This
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
530 AVP contains a SIP or SIPS URI (as defined in RFC 3261 [RFC3261])
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
531 that identifies a SIP server.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
532 */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
533
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
534 struct dict_avp_data data = {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
535 371, /* Code */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
536 0, /* Vendor */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
537 "SIP-Server-URI", /* Name */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
538 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
539 AVP_FLAG_MANDATORY, /* Fixed flag values */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
540 AVP_TYPE_OCTETSTRING /* base type of data */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
541 };
342
adffe87cfb6d Fixed copyright, removed unused defines, fix type of SIP-Server-URI.
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 334
diff changeset
542 CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL);
331
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
543 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
544
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
545 /* SIP-Mandatory-Capability */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
546 {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
547 /*
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
548 The SIP-Mandatory-Capability AVP (AVP Code 373) is of type
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
549 Unsigned32. The value represents a certain capability (or set of
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
550 capabilities) that have to be fulfilled by the SIP server allocated
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
551 to the user.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
552
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
553 The semantics of the different values are not standardized, as it is
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
554 a matter of the administrative network to allocate its own semantics
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
555 within its own network. Each value has to represent a single
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
556 capability within the administrative network.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
557
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
558 */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
559
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
560 struct dict_avp_data data = {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
561 373, /* Code */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
562 0, /* Vendor */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
563 "SIP-Mandatory-Capability", /* Name */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
564 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
565 AVP_FLAG_MANDATORY, /* Fixed flag values */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
566 AVP_TYPE_UNSIGNED32 /* base type of data */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
567 };
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
568 CHECK_dict_new( DICT_AVP, &data , NULL, NULL);
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
569 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
570 /* SIP-Optional-Capability */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
571 {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
572 /*
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
573 The SIP-Optional-Capability AVP (AVP Code 374) is of type Unsigned32.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
574 The value represents a certain capability (or set of capabilities)
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
575 that, optionally, may be fulfilled by the SIP server allocated to the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
576 user.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
577
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
578 The semantics of the different values are not standardized, as it is
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
579 a matter of the administrative network to allocate its own semantics
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
580 within its own network. Each value has to represent a single
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
581 capability within the administrative network.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
582
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
583 */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
584
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
585 struct dict_avp_data data = {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
586 374, /* Code */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
587 0, /* Vendor */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
588 "SIP-Optional-Capability", /* Name */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
589 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
590 AVP_FLAG_MANDATORY, /* Fixed flag values */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
591 AVP_TYPE_UNSIGNED32 /* base type of data */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
592 };
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
593 CHECK_dict_new( DICT_AVP, &data , NULL, NULL);
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
594 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
595
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
596
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
597 /* SIP-Server-Capabilities */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
598 {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
599 /*
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
600 The SIP-Server-Capabilities AVP (AVP Code 372) is of type Grouped.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
601 The Diameter indicates in this AVP the requirements for a particular
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
602 SIP capability, so that the Diameter client (SIP server) is able to
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
603 select another appropriate SIP server to serve the user.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
604
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
605 The SIP-Server-Capabilities AVP allows a Diameter client (SIP server)
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
606 to select another SIP server for triggering or executing services to
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
607 the user. A user may have enabled some services that require the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
608 implementation of certain capabilities in the SIP server that
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
609 triggers or executes those services. For example, the SIP server
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
610 that triggers or executes services to this user may need to implement
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
611 SIP servlets [JSR-000116], Call Processing Language (CPL) [RFC3880],
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
612 or any other kind of capability. Or perhaps that user belongs to a
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
613 premium users group that has a certain stringent quality-of-service
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
614 agreement that requires a fast SIP server. The capabilities required
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
615 or recommended to a given user are conveyed in the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
616 SIP-Server-Capabilities AVP. When it receives them, the Diameter
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
617 client (SIP server) that does the SIP server selection needs to have
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
618 the means to find out available SIP servers that meet the required or
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
619 optional capabilities. Such means are outside the scope of this
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
620 specification.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
621
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
622 Note that the SIP-Server-Capabilities AVP assists the Diameter client
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
623 (SIP server) to produce a subset of all the available SIP servers to
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
624 be allocated to the user in the Home Realm; this is the subset that
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
625 conforms the requirements of capabilities on a per-user basis.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
626 Typically this subset will be formed of more than a single SIP
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
627 server, so once the subset of those SIP servers is identified, it is
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
628 possible that several instances of these SIP servers exist, in which
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
629 case the Diameter client (SIP server) should choose one particular
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
630 SIP server to execute and trigger services to this user. It is
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
631 expected that at this point the SIP server (Diameter client) will
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
632 follow the procedures of RFC 3263 [RFC3263] to allocate one SIP
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
633 server to the user.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
634
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
635 The SIP-Server-Capabilities AVP is defined as follows (per the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
636 grouped-avp-def of RFC 3588 [RFC3588]):
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
637
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
638 SIP-Server-Capabilities ::= < AVP Header: 372 >
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
639 * [ SIP-Mandatory-Capability ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
640 * [ SIP-Optional-Capability ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
641 * [ SIP-Server-URI ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
642 * [ AVP ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
643
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
644 */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
645 struct dict_object * avp;
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
646 struct dict_avp_data data = {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
647 372, /* Code */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
648 0, /* Vendor */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
649 "SIP-Server-Capabilities", /* Name */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
650 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
651 AVP_FLAG_MANDATORY, /* Fixed flag values */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
652 AVP_TYPE_GROUPED /* base type of data */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
653 };
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
654 struct local_rules_definition rules[] =
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
655 { { "SIP-Mandatory-Capability", RULE_OPTIONAL, -1, -1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
656 ,{ "SIP-Optional-Capability", RULE_OPTIONAL, -1, -1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
657 ,{ "SIP-Server-URI", RULE_OPTIONAL, -1, -1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
658 };
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
659
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
660 CHECK_dict_new( DICT_AVP, &data , NULL, &avp);
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
661 PARSE_loc_rules( rules, avp );
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
662 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
663
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
664
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
665 /* SIP-Server-Assignment-Type */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
666 {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
667 /*
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
668 The SIP-Server-Assignment-Type AVP (AVP Code 375) is of type
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
669 Enumerated and indicates the type of server update being performed in
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
670 a Diameter Server-Assignment-Request (SAR) operation. The following
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
671 values are defined:
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
672
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
673
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
674 o NO_ASSIGNMENT (0)
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
675 The Diameter client uses this value to request the user profile of
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
676 a SIP AOR, without affecting the registration state of that
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
677 identity.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
678
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
679 o REGISTRATION (1)
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
680 First SIP registration of a SIP AOR.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
681
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
682 o RE_REGISTRATION (2)
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
683 Subsequent SIP registration of a SIP AOR.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
684
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
685 o UNREGISTERED_USER (3)
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
686 The SIP server has received a SIP request (e.g., SIP INVITE)
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
687 addressed for a SIP AOR that is not registered.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
688
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
689 o TIMEOUT_DEREGISTRATION (4)
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
690 The SIP registration timer of an identity has expired.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
691
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
692 o USER_DEREGISTRATION (5)
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
693 The SIP server has received a request to deregister a SIP AOR.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
694
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
695 o TIMEOUT_DEREGISTRATION_STORE_SERVER_NAME (6)
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
696 The SIP registration timer of an identity has expired. The SIP
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
697 server keeps the user data stored and requests the Diameter server
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
698 to store the SIP server address.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
699
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
700 o USER_DEREGISTRATION_STORE_SERVER_NAME (7)
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
701 The SIP server has received a user-initiated deregistration
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
702 request. The SIP server keeps the user data stored and requests
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
703 the Diameter server to store the SIP server address.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
704
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
705 o ADMINISTRATIVE_DEREGISTRATION (8)
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
706 The SIP server, due to administrative reasons, has deregistered a
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
707 SIP AOR.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
708
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
709 o AUTHENTICATION_FAILURE (9)
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
710 The authentication of a user has failed.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
711
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
712 o AUTHENTICATION_TIMEOUT (10)
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
713 The authentication timer has expired.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
714
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
715 o DEREGISTRATION_TOO_MUCH_DATA (11)
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
716 The SIP server has requested user profile information from the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
717 Diameter server and has received a volume of data higher than it
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
718 can accept.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
719
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
720 */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
721 struct dict_object *type;
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
722 struct dict_type_data tdata = { AVP_TYPE_UNSIGNED32, "Enumerated(SIP-Server-Assignment-Type)" , NULL, NULL};
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
723 struct dict_enumval_data tvals[] = {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
724 enumval_def_u32( 0, "NO_ASSIGNMENT"),
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
725 enumval_def_u32( 1, "REGISTRATION"),
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
726 enumval_def_u32( 2, "RE_REGISTRATION"),
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
727 enumval_def_u32( 3, "UNREGISTERED_USER"),
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
728 enumval_def_u32( 4, "TIMEOUT_DEREGISTRATION"),
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
729 enumval_def_u32( 5, "USER_DEREGISTRATION"),
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
730 enumval_def_u32( 6, "TIMEOUT_DEREGISTRATION_STORE_SERVER_NAME"),
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
731 enumval_def_u32( 7, "USER_DEREGISTRATION_STORE_SERVER_NAME"),
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
732 enumval_def_u32( 8, "ADMINISTRATIVE_DEREGISTRATION"),
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
733 enumval_def_u32( 9, "AUTHENTICATION_FAILURE"),
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
734 enumval_def_u32( 10, "AUTHENTICATION_TIMEOUT"),
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
735 enumval_def_u32( 11, "DEREGISTRATION_TOO_MUCH_DATA")
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
736 };
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
737 struct dict_avp_data data = {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
738 375, /* Code */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
739 0, /* Vendor */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
740 "SIP-Server-Assignment-Type", /* Name */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
741 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
742 AVP_FLAG_MANDATORY, /* Fixed flag values */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
743 AVP_TYPE_UNSIGNED32 /* base type of data */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
744 };
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
745 int i;
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
746 /* Create the Enumerated type, enumerated values, and the AVP */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
747 CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type);
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
748 for (i = 0; i < sizeof(tvals) / sizeof(tvals[0]); i++) {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
749 CHECK_dict_new( DICT_ENUMVAL, &tvals[i], type, NULL);
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
750 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
751 CHECK_dict_new( DICT_AVP, &data , type, NULL);
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
752 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
753
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
754
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
755 /* SIP-Authenticate */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
756 {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
757 /*
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
758 The SIP-Authenticate AVP (AVP Code 379) is of type Grouped and
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
759 contains a reconstruction of either the SIP WWW-Authenticate or
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
760 Proxy-Authentication header fields specified in RFC 2617 [RFC2617]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
761 for the HTTP Digest authentication scheme. Additionally, the AVP may
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
762 include a Digest-HA1 AVP that contains H(A1) (as defined in RFC 2617
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
763 [RFC2617]). H(A1) allows the Diameter client to create an expected
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
764 response and compare it with the Digest response received from the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
765 SIP UA.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
766 The SIP-Authenticate AVP is defined as follows (per the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
767 grouped-avp-def of RFC 3588 [RFC3588]):
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
768
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
769 SIP-Authenticate ::= < AVP Header: 379 >
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
770 { Digest-Realm }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
771 { Digest-Nonce }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
772 [ Digest-Domain ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
773 [ Digest-Opaque ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
774 [ Digest-Stale ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
775 [ Digest-Algorithm ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
776 [ Digest-QoP ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
777 [ Digest-HA1]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
778 * [ Digest-Auth-Param ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
779 * [ AVP ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
780
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
781
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
782 */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
783 struct dict_object * avp;
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
784 struct dict_avp_data data = {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
785 379, /* Code */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
786 0, /* Vendor */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
787 "SIP-Authenticate", /* Name */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
788 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
789 AVP_FLAG_MANDATORY, /* Fixed flag values */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
790 AVP_TYPE_GROUPED /* base type of data */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
791 };
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
792 struct local_rules_definition rules[] =
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
793 { { "Digest-Realm", RULE_REQUIRED, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
794 ,{ "Digest-Nonce", RULE_REQUIRED, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
795 ,{ "Digest-Domain", RULE_OPTIONAL, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
796 ,{ "Digest-Opaque", RULE_OPTIONAL, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
797 ,{ "Digest-Stale", RULE_OPTIONAL, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
798 ,{ "Digest-Algorithm", RULE_OPTIONAL, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
799 ,{ "Digest-QoP", RULE_OPTIONAL, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
800 ,{ "Digest-HA1", RULE_OPTIONAL, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
801 ,{ "Digest-Auth-Param", RULE_OPTIONAL, -1, -1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
802
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
803 };
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
804
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
805 CHECK_dict_new( DICT_AVP, &data , NULL, &avp);
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
806 PARSE_loc_rules( rules, avp );
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
807 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
808 /* SIP-Authorization */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
809 {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
810 /*
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
811 The SIP-Authorization AVP (AVP Code 380) is of type Grouped and
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
812 contains a reconstruction of either the SIP Authorization or
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
813 Proxy-Authorization header fields specified in RFC 2617 [RFC2617] for
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
814 the HTTP Digest authentication scheme.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
815
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
816 The SIP-Authorization AVP is defined as follows (per the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
817 grouped-avp-def of RFC 3588 [RFC3588]):
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
818
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
819 SIP-Authorization ::= < AVP Header: 380 >
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
820 { Digest-Username }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
821 { Digest-Realm }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
822 { Digest-Nonce }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
823 { Digest-URI }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
824 { Digest-Response }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
825 [ Digest-Algorithm ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
826 [ Digest-CNonce ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
827 [ Digest-Opaque ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
828 [ Digest-QoP ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
829 [ Digest-Nonce-Count ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
830 [ Digest-Method]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
831 [ Digest-Entity-Body-Hash ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
832 * [ Digest-Auth-Param ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
833 * [ AVP ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
834
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
835 */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
836 struct dict_object * avp;
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
837 struct dict_avp_data data = {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
838 380, /* Code */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
839 0, /* Vendor */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
840 "SIP-Authorization", /* Name */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
841 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
842 AVP_FLAG_MANDATORY, /* Fixed flag values */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
843 AVP_TYPE_GROUPED /* base type of data */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
844 };
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
845 struct local_rules_definition rules[] =
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
846 { { "Digest-Username", RULE_REQUIRED, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
847 ,{ "Digest-Realm", RULE_REQUIRED, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
848 ,{ "Digest-Nonce", RULE_REQUIRED, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
849 ,{ "Digest-URI", RULE_REQUIRED, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
850 ,{ "Digest-Response", RULE_REQUIRED, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
851 ,{ "Digest-Algorithm", RULE_OPTIONAL, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
852 ,{ "Digest-CNonce", RULE_OPTIONAL, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
853 ,{ "Digest-Opaque", RULE_OPTIONAL, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
854 ,{ "Digest-QoP", RULE_OPTIONAL, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
855 ,{ "Digest-Nonce-Count", RULE_OPTIONAL, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
856 ,{ "Digest-Method", RULE_OPTIONAL, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
857 ,{ "Digest-Entity-Body-Hash", RULE_OPTIONAL, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
858 ,{ "Digest-Auth-Param", RULE_OPTIONAL, -1, -1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
859 };
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
860
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
861 CHECK_dict_new( DICT_AVP, &data , NULL, &avp);
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
862 PARSE_loc_rules( rules, avp );
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
863 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
864 /* SIP-Authentication-Info */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
865 {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
866 /*
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
867 The SIP-Authentication-Info AVP (AVP Code 381) is of type Grouped and
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
868 contains a reconstruction of the SIP Authentication-Info header
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
869 specified in RFC 2617 [RFC2617] for the HTTP Digest authentication
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
870 scheme.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
871 The SIP-Authentication-Info AVP is defined as follows (per the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
872 grouped-avp-def of RFC 3588 [RFC3588]):
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
873
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
874 SIP-Authentication-Info ::= < AVP Header: 381 >
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
875 [ Digest-Nextnonce ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
876 [ Digest-QoP ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
877 [ Digest-Response-Auth ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
878 [ Digest-CNonce ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
879 [ Digest-Nonce-Count ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
880 * [ AVP ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
881
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
882 Note that, in some cases, the Digest-Response-Auth AVP cannot be
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
883 calculated at the Diameter server, but has to be calculated at the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
884 Diameter client (SIP server). For example, if the value of the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
885 quality of protection (qop) parameter in Digest is set to "auth-int",
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
886 then the response-digest (rspauth parameter value in Digest) is
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
887 calculated with the hash of the body of the SIP response, which is
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
888 not available at the Diameter server. In this case, the Diameter
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
889 client (SIP server) must calculate the response-digest once the body
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
890 of the SIP response is calculated.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
891
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
892 Therefore, a value of "auth-int" in the Digest-QoP AVP of the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
893 SIP-Authentication-Info AVP indicates that the Diameter client (SIP
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
894 server) MUST compute the Digest "rspauth" parameter value at the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
895 Diameter client (SIP server).
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
896
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
897 */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
898 struct dict_object * avp;
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
899 struct dict_avp_data data = {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
900 381, /* Code */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
901 0, /* Vendor */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
902 "SIP-Authentication-Info", /* Name */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
903 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
904 AVP_FLAG_MANDATORY, /* Fixed flag values */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
905 AVP_TYPE_GROUPED /* base type of data */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
906 };
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
907 struct local_rules_definition rules[] =
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
908 { { "Digest-Nextnonce", RULE_OPTIONAL, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
909 ,{ "Digest-QoP", RULE_OPTIONAL, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
910 ,{ "Digest-Response-Auth", RULE_OPTIONAL, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
911 ,{ "Digest-CNonce", RULE_OPTIONAL, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
912 ,{ "Digest-Nonce-Count", RULE_OPTIONAL, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
913 };
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
914
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
915 CHECK_dict_new( DICT_AVP, &data , NULL, &avp);
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
916 PARSE_loc_rules( rules, avp );
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
917 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
918 /* SIP-Authentication-Scheme */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
919 {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
920 /*
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
921 The SIP-Authentication-Scheme AVP (AVP Code 377) is of type
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
922 Enumerated and indicates the authentication scheme used in the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
923 authentication of SIP services. RFC 2617 identifies this value as an
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
924 "auth-scheme" (see Section 1.2 of RFC 2617 [RFC2617]). The only
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
925 currently defined value is:
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
926
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
927 o DIGEST (0) to indicate HTTP Digest authentication as specified in
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
928 RFC 2617 [RFC2617] Section 3.2.1. Derivative work is also
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
929 considered Digest authentication scheme, as long as the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
930 "auth-scheme" is identified as Digest in the SIP headers carrying
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
931 the HTTP authentication. This includes, e.g., the HTTP Digest
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
932 authentication using AKA [RFC3310].
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
933
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
934 Each HTTP Digest directive (parameter) is transported in a
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
935 corresponding AVP, whose name follows the pattern Digest-*. The
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
936 Digest-* AVPs are RADIUS attributes imported from the RADIUS
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
937 Extension for Digest Authentication [RFC4590] namespace, allowing a
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
938 smooth transition between RADIUS and Diameter applications supporting
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
939 SIP. The Diameter SIP application goes a step further by grouping
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
940 the Digest-* AVPs into the SIP-Authenticate, SIP-Authorization, and
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
941 SIP-Authentication-Info grouped AVPs that correspond to the SIP WWW-
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
942 Authenticate/Proxy-Authentication, Authorization/Proxy-Authorization,
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
943 and Authentication-Info headers fields, respectively.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
944
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
945 Note: Due to the fact that HTTP Digest authentication [RFC2617] is
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
946 the only mandatory authentication mechanism in SIP, this memo only
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
947 provides support for HTTP Digest authentication and derivative
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
948 work such as HTTP Digest authentication using AKA [RFC3310].
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
949 Extensions to this memo can register new values and new AVPs to
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
950 provide support for other authentication schemes or extensions to
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
951 HTTP Digest authentication.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
952
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
953 Note: Although RFC 2617 [RFC2617] defines the Basic and Digest
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
954 schemes for authenticating HTTP requests, RFC 3261 [RFC3261] only
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
955 imports HTTP Digest as a mechanism to provide authentication in
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
956 SIP.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
957
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
958 Due to syntactic requirements, HTTP Digest authentication has to
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
959 escape quote characters in contents of HTTP Digest directives. When
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
960 translating directives into Digest-* AVPs, the Diameter client or
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
961 server removes the surrounding quotes where present, as required by
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
962 the syntax of the Digest-* attributes defined in the "RADIUS
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
963 Extension for Digest Authentication" [RFC4590].
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
964
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
965 */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
966
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
967 struct dict_object *type;
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
968 struct dict_type_data tdata = { AVP_TYPE_UNSIGNED32, "Enumerated(SIP-Authentication-Scheme)" , NULL, NULL};
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
969 struct dict_enumval_data tvals[] = {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
970 enumval_def_u32( 0, "DIGEST")
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
971 };
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
972 struct dict_avp_data data = {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
973 377, /* Code */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
974 0, /* Vendor */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
975 "SIP-Authentication-Scheme", /* Name */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
976 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
977 AVP_FLAG_MANDATORY, /* Fixed flag values */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
978 AVP_TYPE_UNSIGNED32 /* base type of data */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
979 };
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
980 int i;
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
981 /* Create the Enumerated type, enumerated values, and the AVP */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
982 CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type);
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
983 for (i = 0; i < sizeof(tvals) / sizeof(tvals[0]); i++) {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
984 CHECK_dict_new( DICT_ENUMVAL, &tvals[i], type, NULL);
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
985 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
986 CHECK_dict_new( DICT_AVP, &data , type, NULL);
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
987 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
988 /* SIP-Item-Number */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
989 {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
990 /*
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
991 The SIP-Item-Number (AVP Code 378) is of type Unsigned32 and is
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
992 included in a SIP-Auth-Data-Item grouped AVP in circumstances where
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
993 there are multiple occurrences of SIP-Auth-Data-Item AVPs and the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
994 order of processing is relevant. The AVP indicates the order in
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
995 which the Grouped SIP-Auth-Data-Item should be processed. Lower
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
996 values of the SIP-Item-Number AVP indicate that the whole
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
997 SIP-Auth-Data-Item SHOULD be processed before other
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
998 SIP-Auth-Data-Item AVPs that contain higher values in the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
999 SIP-Item-Number AVP.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1000
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1001 */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1002
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1003 struct dict_avp_data data = {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1004 378, /* Code */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1005 0, /* Vendor */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1006 "SIP-Item-Number", /* Name */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1007 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1008 AVP_FLAG_MANDATORY, /* Fixed flag values */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1009 AVP_TYPE_UNSIGNED32 /* base type of data */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1010 };
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1011 CHECK_dict_new( DICT_AVP, &data , NULL, NULL);
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1012 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1013 /* SIP-Auth-Data-Item */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1014 {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1015 /*
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1016 The SIP-Auth-Data-Item (AVP Code 376) is of type Grouped and contains
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1017 the authentication and/or authorization information pertaining to a
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1018 user.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1019
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1020 When the Diameter server uses the grouped SIP-Auth-Data-Item AVP to
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1021 include a SIP-Authenticate AVP, the Diameter server MUST send a
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1022 maximum of one authentication data item (e.g., in case the SIP
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1023 request contained several credentials). Section 11 contains a
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1024 detailed discussion and normative text of the case when a SIP request
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1025 contains several credentials.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1026
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1027 The SIP-Auth-Data-Item AVP is defined as follows (per the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1028 grouped-avp-def of RFC 3588 [RFC3588]):
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1029
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1030 SIP-Auth-Data-Item ::= < AVP Header: 376 >
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1031 { SIP-Authentication-Scheme }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1032 [ SIP-Item-Number ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1033 [ SIP-Authenticate ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1034 [ SIP-Authorization ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1035 [ SIP-Authentication-Info ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1036 * [ AVP ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1037
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1038
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1039 */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1040 struct dict_object * avp;
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1041 struct dict_avp_data data = {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1042 376, /* Code */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1043 0, /* Vendor */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1044 "SIP-Auth-Data-Item", /* Name */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1045 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1046 AVP_FLAG_MANDATORY, /* Fixed flag values */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1047 AVP_TYPE_GROUPED /* base type of data */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1048 };
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1049 struct local_rules_definition rules[] =
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1050 { { "SIP-Authentication-Scheme",RULE_REQUIRED, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1051 ,{ "SIP-Item-Number", RULE_OPTIONAL, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1052 ,{ "SIP-Authenticate", RULE_OPTIONAL, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1053 ,{ "SIP-Authorization", RULE_OPTIONAL, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1054 ,{ "SIP-Authentication-Info", RULE_OPTIONAL, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1055 };
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1056
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1057 CHECK_dict_new( DICT_AVP, &data , NULL, &avp);
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1058 PARSE_loc_rules( rules, avp );
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1059 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1060 /* SIP-Number-Auth-Items */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1061 {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1062 /*
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1063 The SIP-Number-Auth-Items AVP (AVP Code 382) is of type Unsigned32
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1064 and indicates the number of authentication and/or authorization
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1065 credentials that the Diameter server included in a Diameter message.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1066
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1067 When the AVP is present in a request, it indicates the number of
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1068 SIP-Auth-Data-Items the Diameter client is requesting. This can be
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1069 used, for instance, when the SIP server is requesting several
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1070 pre-calculated authentication credentials. In the answer message,
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1071 the SIP-Number-Auth-Items AVP indicates the actual number of items
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1072 that the Diameter server included.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1073
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1074 */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1075
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1076 struct dict_avp_data data = {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1077 382, /* Code */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1078 0, /* Vendor */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1079 "SIP-Number-Auth-Items", /* Name */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1080 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1081 AVP_FLAG_MANDATORY, /* Fixed flag values */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1082 AVP_TYPE_UNSIGNED32 /* base type of data */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1083 };
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1084 CHECK_dict_new( DICT_AVP, &data , NULL, NULL);
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1085 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1086
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1087 /* SIP-Reason-Code */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1088 {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1089 /*
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1090 The SIP-Reason-Code AVP (AVP Code 384) is of type Enumerated and
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1091 defines the reason for the network initiated deregistration. The
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1092 following values are defined:
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1093
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1094 o PERMANENT_TERMINATION (0)
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1095 o NEW_SIP_SERVER_ASSIGNED (1)
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1096 o SIP_SERVER_CHANGE (2)
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1097 o REMOVE_SIP_SERVER (3)
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1098 */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1099
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1100 struct dict_object *type;
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1101 struct dict_type_data tdata = { AVP_TYPE_UNSIGNED32, "Enumerated(SIP-Reason-Code)" , NULL, NULL};
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1102 struct dict_enumval_data tvals[] = {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1103 enumval_def_u32( 0, "PERMANENT_TERMINATION"),
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1104 enumval_def_u32( 1, "NEW_SIP_SERVER_ASSIGNED"),
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1105 enumval_def_u32( 2, "SIP_SERVER_CHANGE"),
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1106 enumval_def_u32( 3, "REMOVE_SIP_SERVER")
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1107 };
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1108 struct dict_avp_data data = {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1109 384, /* Code */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1110 0, /* Vendor */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1111 "SIP-Reason-Code", /* Name */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1112 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1113 AVP_FLAG_MANDATORY, /* Fixed flag values */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1114 AVP_TYPE_UNSIGNED32 /* base type of data */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1115 };
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1116 int i;
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1117 /* Create the Enumerated type, enumerated values, and the AVP */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1118 CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type);
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1119 for (i = 0; i < sizeof(tvals) / sizeof(tvals[0]); i++) {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1120 CHECK_dict_new( DICT_ENUMVAL, &tvals[i], type, NULL);
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1121 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1122 CHECK_dict_new( DICT_AVP, &data , type, NULL);
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1123 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1124
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1125 /* SIP-Reason-Info */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1126 {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1127 /*
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1128 The SIP-Reason-Info AVP (AVP Code 385) is of type UTF8String and
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1129 contains textual information that can be rendered to the user, about
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1130 the reason for a deregistration.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1131
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1132 */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1133
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1134 struct dict_avp_data data = {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1135 385, /* Code */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1136 0, /* Vendor */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1137 "SIP-Reason-Info", /* Name */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1138 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1139 AVP_FLAG_MANDATORY, /* Fixed flag values */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1140 AVP_TYPE_OCTETSTRING /* base type of data */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1141 };
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1142 CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL);
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1143 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1144
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1145 /* SIP-Deregistration-Reason */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1146 {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1147 /*
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1148 The SIP-Deregistration-Reason AVP (AVP Code 383) is of type Grouped
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1149 and indicates the reason for a deregistration operation.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1150
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1151 The SIP-Deregistration-Reason AVP is defined as follows (per the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1152 grouped-avp-def of RFC 3588 [RFC3588]):
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1153
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1154 SIP-Deregistration-Reason ::= < AVP Header: 383 >
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1155 { SIP-Reason-Code }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1156 [ SIP-Reason-Info ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1157 * [ AVP ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1158
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1159 */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1160 struct dict_object * avp;
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1161 struct dict_avp_data data = {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1162 383, /* Code */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1163 0, /* Vendor */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1164 "SIP-Deregistration-Reason", /* Name */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1165 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1166 AVP_FLAG_MANDATORY, /* Fixed flag values */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1167 AVP_TYPE_GROUPED /* base type of data */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1168 };
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1169 struct local_rules_definition rules[] =
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1170 { { "SIP-Reason-Code", RULE_REQUIRED, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1171 ,{ "SIP-Reason-Info", RULE_OPTIONAL, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1172 };
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1173
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1174 CHECK_dict_new( DICT_AVP, &data , NULL, &avp);
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1175 PARSE_loc_rules( rules, avp );
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1176 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1177
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1178 /* SIP-Visited-Network-Id */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1179 {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1180 /*
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1181 The SIP-Visited-Network-Id AVP (AVP Code 386) is of type UTF8String.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1182 This AVP contains an identifier that helps the home network identify
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1183 the visited network (e.g., the visited network domain name), in order
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1184 to authorize roaming to that visited network.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1185
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1186 */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1187
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1188 struct dict_avp_data data = {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1189 386, /* Code */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1190 0, /* Vendor */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1191 "SIP-Visited-Network-Id", /* Name */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1192 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1193 AVP_FLAG_MANDATORY, /* Fixed flag values */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1194 AVP_TYPE_OCTETSTRING /* base type of data */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1195 };
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1196 CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL);
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1197 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1198 /* SIP-User-Authorization-Type */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1199 {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1200 /*
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1201 The SIP-User-Authorization-Type AVP (AVP Code 387) is of type
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1202 Enumerated and indicates the type of user authorization being
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1203 performed in a User Authorization operation, i.e., the Diameter
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1204 User-Authorization-Request (UAR) command. The following values are
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1205 defined:
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1206
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1207 o REGISTRATION (0)
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1208 This value is used for initial registration or re-registration.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1209 This is the default value.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1210
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1211 o DEREGISTRATION (1)
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1212 This value is used for deregistration.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1213
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1214 o REGISTRATION_AND_CAPABILITIES (2)
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1215 This value is used for initial registration or re-registration
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1216 when the SIP server explicitly requests the Diameter server to get
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1217 capability information. This capability information helps the SIP
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1218 server to allocate another SIP server to serve the user.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1219
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1220 */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1221
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1222 struct dict_object *type;
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1223 struct dict_type_data tdata = { AVP_TYPE_UNSIGNED32, "Enumerated(SIP-User-Authorization-Type)" , NULL, NULL};
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1224 struct dict_enumval_data tvals[] = {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1225 enumval_def_u32( 0, "REGISTRATION"),
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1226 enumval_def_u32( 1, "DEREGISTRATION"),
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1227 enumval_def_u32( 2, "REGISTRATION_AND_CAPABILITIES")
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1228 };
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1229 struct dict_avp_data data = {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1230 387, /* Code */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1231 0, /* Vendor */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1232 "SIP-User-Authorization-Type", /* Name */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1233 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1234 AVP_FLAG_MANDATORY, /* Fixed flag values */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1235 AVP_TYPE_UNSIGNED32 /* base type of data */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1236 };
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1237 int i;
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1238 /* Create the Enumerated type, enumerated values, and the AVP */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1239 CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type);
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1240 for (i = 0; i < sizeof(tvals) / sizeof(tvals[0]); i++) {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1241 CHECK_dict_new( DICT_ENUMVAL, &tvals[i], type, NULL);
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1242 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1243 CHECK_dict_new( DICT_AVP, &data , type, NULL);
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1244 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1245 /* SIP-Supported-User-Data-Type */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1246 {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1247 /*
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1248 The SIP-Supported-User-Data-Type AVP (AVP Code 388) is of type
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1249 UTF8String and contains a string that identifies the type of
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1250 supported user data (user profile, see SIP-User-Data AVP
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1251 (Section 9.12)) supported in the node. The AVP can be repeated, if
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1252 the SIP server supports several user data types. In case of
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1253 repetition, the Diameter client should order the different instances
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1254 of this AVP according to its preferences.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1255
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1256 When the Diameter client inserts this AVP in a SAR message, it allows
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1257 the Diameter client to provide an indication to the Diameter server
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1258 of the types of user data supported by the SIP server. The Diameter
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1259 server, upon inspection of these AVPs, will return a suitable
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1260 SIP-User-Data AVP (Section 9.12) of the type indicated in the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1261 SIP-User-Data-Type AVP (Section 9.12.1).
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1262
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1263 */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1264
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1265 struct dict_avp_data data = {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1266 388, /* Code */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1267 0, /* Vendor */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1268 "SIP-Supported-User-Data-Type", /* Name */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1269 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1270 AVP_FLAG_MANDATORY, /* Fixed flag values */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1271 AVP_TYPE_OCTETSTRING /* base type of data */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1272 };
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1273 CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL);
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1274 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1275 /* SIP-User-Data-Type */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1276 {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1277 /*
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1278 The SIP-User-Data-Type AVP (AVP Code 390) is of type UTF8String and
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1279 contains a string that identifies the type of user data included in
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1280 the SIP-User-Data-Type AVP (Section 9.12).
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1281
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1282 This document does not specify a convention to characterize the type
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1283 of user data contained in the SIP-User-Data-Type AVP (Section 9.12). It
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1284 is believed that in most cases this feature will be used in
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1285 environments controlled by a network administrator who can configure
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1286 both the client and server to assign the same value type at the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1287 client and server. It is also RECOMMENDED that organizations
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1288 developing their own profile of SIP-User-Data-Type AVP (Section 9.12)
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1289 allocate a type based on their canonical DNS name. For instance,
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1290 organization "example.com" can define several types of SIP-User-Data
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1291 and allocate the types "type1.dsa.example.com",
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1292 "type2.dsa.example.com", and so on. This convention will avoid a
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1293 clash in the allocation of types of SIP-User-Data-Type AVP (Section 9.12).
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1294
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1295 */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1296
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1297 struct dict_avp_data data = {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1298 390, /* Code */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1299 0, /* Vendor */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1300 "SIP-User-Data-Type", /* Name */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1301 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1302 AVP_FLAG_MANDATORY, /* Fixed flag values */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1303 AVP_TYPE_OCTETSTRING /* base type of data */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1304 };
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1305 CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL);
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1306 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1307 /* SIP-User-Data-Contents */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1308 {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1309 /*
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1310 The SIP-User-Data-Contents AVP (AVP Code 391) is of type OctetString.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1311 The Diameter peers do not need to understand the value of this AVP.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1312
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1313 The AVP contains the user profile data required for a SIP server to
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1314 give service to the user.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1315
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1316
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1317 */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1318
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1319 struct dict_avp_data data = {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1320 391, /* Code */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1321 0, /* Vendor */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1322 "SIP-User-Data-Contents", /* Name */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1323 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1324 AVP_FLAG_MANDATORY, /* Fixed flag values */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1325 AVP_TYPE_OCTETSTRING /* base type of data */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1326 };
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1327 CHECK_dict_new( DICT_AVP, &data , NULL, NULL);
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1328 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1329
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1330 /* SIP-User-Data */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1331 {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1332 /*
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1333 The SIP-User-Data AVP (AVP Code 389) is of type Grouped. This AVP
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1334 allows the Diameter server to transport user-specific data, such as a
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1335 user profile, to the SIP server (in the Diameter client). The
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1336 Diameter server selects a type of user data that is understood by the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1337 SIP server in the Diameter client, and has been indicated in a
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1338 SIP-Supported-User-Data-Type AVP. In case the Diameter client
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1339 indicated support for several types of user data, the Diameter server
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1340 SHOULD choose the first type supported by the client.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1341
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1342 The SIP-User-Data grouped AVP contains a SIP-User-Data-Type AVP that
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1343 indicates the type of user data included in the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1344 SIP-User-Data-Contents-AVP.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1345
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1346 The SIP-User-Data AVP is defined as follows (per the grouped-avp-def
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1347 of RFC 3588 [RFC3588]):
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1348
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1349
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1350 SIP-User-Data ::= < AVP Header: 389 >
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1351 { SIP-User-Data-Type }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1352 { SIP-User-Data-Contents }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1353 * [ AVP ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1354
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1355 */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1356 struct dict_object * avp;
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1357 struct dict_avp_data data = {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1358 389, /* Code */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1359 0, /* Vendor */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1360 "SIP-User-Data", /* Name */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1361 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1362 AVP_FLAG_MANDATORY, /* Fixed flag values */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1363 AVP_TYPE_GROUPED /* base type of data */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1364 };
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1365 struct local_rules_definition rules[] =
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1366 { { "SIP-User-Data-Type", RULE_REQUIRED, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1367 ,{ "SIP-User-Data-Contents", RULE_REQUIRED, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1368 };
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1369
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1370 CHECK_dict_new( DICT_AVP, &data , NULL, &avp);
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1371 PARSE_loc_rules( rules, avp );
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1372 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1373 /* SIP-User-Data-Already-Available */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1374 {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1375 /*
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1376 The SIP-User-Data-Already-Available AVP (AVP Code 392) is of type
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1377 Enumerated and gives an indication to the Diameter server about
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1378 whether the Diameter client (SIP server) already received the portion
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1379 of the user profile needed in order to serve the user. The following
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1380 values are defined:
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1381
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1382 o USER_DATA_NOT_AVAILABLE (0)
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1383 The Diameter client (SIP server) does not have the data that it
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1384 needs to serve the user.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1385
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1386 o USER_DATA_ALREADY_AVAILABLE (1)
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1387 The Diameter client (SIP server) already has received the data
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1388 that it needs to serve the user.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1389
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1390
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1391 */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1392
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1393 struct dict_object *type;
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1394 struct dict_type_data tdata = { AVP_TYPE_UNSIGNED32, "Enumerated(SIP-User-Data-Already-Available)" , NULL, NULL};
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1395 struct dict_enumval_data tvals[] = {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1396 enumval_def_u32( 0, "USER_DATA_NOT_AVAILABLE"),
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1397 enumval_def_u32( 1, "USER_DATA_ALREADY_AVAILABLE")
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1398 };
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1399 struct dict_avp_data data = {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1400 392, /* Code */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1401 0, /* Vendor */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1402 "SIP-User-Data-Already-Available", /* Name */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1403 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1404 AVP_FLAG_MANDATORY, /* Fixed flag values */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1405 AVP_TYPE_UNSIGNED32 /* base type of data */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1406 };
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1407 int i;
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1408 /* Create the Enumerated type, enumerated values, and the AVP */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1409 CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type);
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1410 for (i = 0; i < sizeof(tvals) / sizeof(tvals[0]); i++) {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1411 CHECK_dict_new( DICT_ENUMVAL, &tvals[i], type, NULL);
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1412 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1413 CHECK_dict_new( DICT_AVP, &data , type, NULL);
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1414 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1415 /* SIP-Method */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1416 {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1417 /*
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1418 The SIP-Method-AVP (AVP Code 393) is of type UTF8String and contains
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1419 the method of the SIP request that triggered the Diameter message.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1420 The Diameter server MUST use this AVP solely for authorization of SIP
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1421 requests, and MUST NOT use it to compute the Digest authentication.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1422 To compute the Digest authentication, the Diameter server MUST use
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1423 the Digest-Method AVP instead.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1424
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1425
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1426 */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1427
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1428 struct dict_avp_data data = {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1429 393, /* Code */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1430 0, /* Vendor */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1431 "SIP-Method", /* Name */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1432 AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1433 AVP_FLAG_MANDATORY, /* Fixed flag values */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1434 AVP_TYPE_OCTETSTRING /* base type of data */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1435 };
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1436 CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL);
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1437 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1438 /* Complement of Result-Code AVP values */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1439 {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1440 struct dict_object * resultcode_data_type;
1318
2a5620128a9a Remove '*' from the couple enumerated values that had them.
Thomas Klausner <tk@giga.or.at>
parents: 1120
diff changeset
1441 CHECK_dict_search(DICT_TYPE,TYPE_BY_NAME,"Enumerated(Result-Code)",&resultcode_data_type);
331
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1442
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1443
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1444 {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1445
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1446 /* Success */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1447 {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1448 /* 2003 */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1449 {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1450 /*
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1451 The user was not previously registered. The Diameter server has
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1452 now authorized the registration.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1453 */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1454 struct dict_enumval_data error_code = { "DIAMETER_FIRST_REGISTRATION", { .u32 = 2003 }};
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1455 CHECK_dict_new( DICT_ENUMVAL, &error_code , resultcode_data_type, NULL);
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1456 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1457 /* 2004 */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1458 {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1459 /*
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1460 The user is already registered. The Diameter server has now
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1461 authorized the re-registration.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1462
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1463 */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1464 struct dict_enumval_data error_code = { "DIAMETER_SUBSEQUENT_REGISTRATION", { .u32 = 2004 }};
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1465 CHECK_dict_new( DICT_ENUMVAL, &error_code , resultcode_data_type, NULL);
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1466 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1467 /* 2005 */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1468 {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1469 struct dict_enumval_data error_code = { "DIAMETER_UNREGISTERED_SERVICE", { .u32 = 2005 }};
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1470 CHECK_dict_new( DICT_ENUMVAL, &error_code , resultcode_data_type, NULL);
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1471 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1472 /* 2006 */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1473 {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1474 struct dict_enumval_data error_code = { "DIAMETER_SUCCESS_SERVER_NAME_NOT_STORED", { .u32 = 2006 }};
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1475 CHECK_dict_new( DICT_ENUMVAL, &error_code , resultcode_data_type, NULL);
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1476 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1477 /* 2007 */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1478 {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1479 struct dict_enumval_data error_code = { "DIAMETER_SERVER_SELECTION", { .u32 = 2007 }};
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1480 CHECK_dict_new( DICT_ENUMVAL, &error_code , resultcode_data_type, NULL);
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1481 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1482 /* 2008 */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1483 {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1484 struct dict_enumval_data error_code = { "DIAMETER_SUCCESS_AUTH_SENT_SERVER_NOT_STORED", { .u32 = 2008 }};
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1485 CHECK_dict_new( DICT_ENUMVAL, &error_code , resultcode_data_type, NULL);
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1486 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1487 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1488 /* Transient Failures */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1489 {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1490 /* 4013 */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1491 {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1492 struct dict_enumval_data error_code = { "DIAMETER_USER_NAME_REQUIRED", { .u32 = 4013 }};
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1493 CHECK_dict_new( DICT_ENUMVAL, &error_code , resultcode_data_type, NULL);
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1494 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1495 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1496 /* Permanent Failures */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1497 {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1498 /* 5032 */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1499 {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1500 struct dict_enumval_data error_code = { "DIAMETER_ERROR_USER_UNKNOWN", { .u32 = 5032 }};
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1501 CHECK_dict_new( DICT_ENUMVAL, &error_code , resultcode_data_type, NULL);
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1502 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1503 /* 5033 */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1504 {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1505 struct dict_enumval_data error_code = { "DIAMETER_ERROR_IDENTITIES_DONT_MATCH", { .u32 = 5033 }};
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1506 CHECK_dict_new( DICT_ENUMVAL, &error_code , resultcode_data_type, NULL);
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1507 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1508 /* 5034 */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1509 {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1510 struct dict_enumval_data error_code = { "DIAMETER_ERROR_IDENTITY_NOT_REGISTERED", { .u32 = 5034 }};
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1511 CHECK_dict_new( DICT_ENUMVAL, &error_code , resultcode_data_type, NULL);
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1512 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1513 /* 5035 */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1514 {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1515 struct dict_enumval_data error_code = { "DIAMETER_ERROR_ROAMING_NOT_ALLOWED", { .u32 = 5035 }};
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1516 CHECK_dict_new( DICT_ENUMVAL, &error_code , resultcode_data_type, NULL);
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1517 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1518 /* 5036 */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1519 {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1520 struct dict_enumval_data error_code = { "DIAMETER_ERROR_IDENTITY_ALREADY_REGISTERED", { .u32 = 5036 }};
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1521 CHECK_dict_new( DICT_ENUMVAL, &error_code , resultcode_data_type, NULL);
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1522 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1523 /* 5037 */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1524 {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1525 struct dict_enumval_data error_code = { "DIAMETER_ERROR_AUTH_SCHEME_NOT_SUPPORTED", { .u32 = 5037 }};
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1526 CHECK_dict_new( DICT_ENUMVAL, &error_code , resultcode_data_type, NULL);
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1527 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1528 /* 5038 */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1529 {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1530 struct dict_enumval_data error_code = { "DIAMETER_ERROR_IN_ASSIGNMENT_TYPE", { .u32 = 5038 }};
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1531 CHECK_dict_new( DICT_ENUMVAL, &error_code , resultcode_data_type, NULL);
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1532 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1533 /* 5039 */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1534 {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1535 struct dict_enumval_data error_code = { "DIAMETER_ERROR_TOO_MUCH_DATA", { .u32 = 5039 }};
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1536 CHECK_dict_new( DICT_ENUMVAL, &error_code , resultcode_data_type, NULL);
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1537 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1538 /* 5040 */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1539 {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1540 struct dict_enumval_data error_code = { "DIAMETER_ERROR_NOT SUPPORTED_USER_DATA", { .u32 = 5040 }};
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1541 CHECK_dict_new( DICT_ENUMVAL, &error_code , resultcode_data_type, NULL);
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1542 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1543 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1544 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1545
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1546
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1547 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1548 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1549 /* Command section */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1550 {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1551 /* User-Authorization-Request (UAR) Command */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1552 {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1553 /*
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1554 The User-Authorization-Request (UAR) is indicated by the Command-Code
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1555 set to 283 and the Command Flags' 'R' bit set. The Diameter client
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1556 in a SIP server sends this command to the Diameter server to request
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1557 authorization for the SIP User Agent to route a SIP REGISTER request.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1558 Because the SIP REGISTER request implicitly carries a permission to
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1559 bind an AOR to a contact address, the Diameter client uses the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1560 Diameter UAR as a first authorization request towards the Diameter
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1561 server to authorize the registration. For instance, the Diameter
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1562 server can verify that the AOR is a legitimate user of the realm.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1563
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1564 The Diameter client in the SIP server requests authorization for one
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1565 of the possible values defined in the SIP-User-Authorization-Type AVP
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1566 (Section 9.10).
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1567
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1568 The user name used for authentication of the user is conveyed in a
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1569 User-Name AVP (defined in the Diameter base protocol, RFC 3588
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1570 [RFC3588]). The location of the authentication user name in the SIP
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1571 REGISTER request varies depending on the authentication mechanism.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1572 When the authentication mechanism is HTTP Digest as defined in RFC
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1573 2617 [RFC2617], the authentication user name is found in the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1574 "username" directive of the SIP Authorization header field value.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1575 This Diameter SIP application only provides support for HTTP Digest
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1576 authentication in SIP; other authentication mechanisms are not
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1577 currently supported.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1578
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1579 The SIP or SIPS URI to be registered is conveyed in the SIP-AOR AVP
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1580 (Section 9.8). Typically this SIP or SIPS URI is found in the To
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1581 header field value of the SIP REGISTER request that triggered the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1582 Diameter UAR message.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1583
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1584 The SIP-Visited-Network-Id AVP indicates the network that is
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1585 providing SIP services (e.g., SIP proxy functionality or any other
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1586 kind of services) to the SIP User Agent.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1587
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1588 The Message Format of the UAR command is as follows:
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1589
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1590 <UAR> ::= < Diameter Header: 283, REQ, PXY >
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1591 < Session-Id >
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1592 { Auth-Application-Id }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1593 { Auth-Session-State }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1594 { Origin-Host }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1595 { Origin-Realm }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1596 { Destination-Realm }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1597 { SIP-AOR }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1598 [ Destination-Host ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1599 [ User-Name ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1600 [ SIP-Visited-Network-Id ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1601 [ SIP-User-Authorization-Type ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1602 * [ Proxy-Info ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1603 * [ Route-Record ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1604 * [ AVP ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1605
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1606 */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1607 struct dict_object * cmd;
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1608 struct dict_cmd_data data = {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1609 283, /* Code */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1610 "User-Authorization-Request", /* Name */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1611 CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1612 CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE /* Fixed flag values */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1613 };
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1614 struct local_rules_definition rules[] =
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1615 { { "Session-Id", RULE_FIXED_HEAD, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1616 ,{ "Auth-Application-Id", RULE_REQUIRED, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1617 ,{ "Auth-Session-State", RULE_REQUIRED, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1618 ,{ "Origin-Host", RULE_REQUIRED, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1619 ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1620 ,{ "Destination-Realm", RULE_REQUIRED, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1621 ,{ "SIP-AOR", RULE_REQUIRED, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1622 ,{ "Destination-Host", RULE_OPTIONAL, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1623 ,{ "User-Name", RULE_OPTIONAL, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1624 ,{ "SIP-Visited-Network-Id", RULE_OPTIONAL, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1625 ,{ "SIP-User-Authorization-Type", RULE_OPTIONAL, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1626 ,{ "Proxy-Info", RULE_OPTIONAL, -1, -1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1627 ,{ "Route-Record", RULE_OPTIONAL, -1, -1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1628
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1629 };
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1630
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1631 CHECK_dict_new( DICT_COMMAND, &data , sip, &cmd);
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1632 PARSE_loc_rules( rules, cmd );
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1633 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1634
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1635 /* User-Authorization-Answer (UAA) Command */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1636 {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1637 /*
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1638 The User-Authorization-Answer (UAA) is indicated by the Command-Code
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1639 set to 283 and the Command Flags' 'R' bit cleared. The Diameter
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1640 server sends this command in response to a previously received
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1641 Diameter User-Authorization-Request (UAR) command. The Diameter
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1642 server indicates the result of the requested registration
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1643 authorization. Additionally, the Diameter server may indicate a
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1644 collection of SIP capabilities that assists the Diameter client to
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1645 select a SIP proxy to the AOR under registration.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1646
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1647
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1648 In addition to the values already defined in RFC 3588 [RFC3588], the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1649 Result-Code AVP may contain one of the values defined in
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1650 Section 10.1.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1651
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1652 Whenever the Diameter server fails to process the Diameter UAR
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1653 message, it MUST stop processing and return the relevant error in the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1654 Diameter UAA message. When there is success in the process, the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1655 Diameter server MUST set the code to DIAMETER_SUCCESS in the Diameter
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1656 UAA message.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1657
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1658 If the Diameter server requires a User-Name AVP value to process the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1659 Diameter UAR request, but the Diameter UAR message did not contain a
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1660 User-Name AVP value, the Diameter server MUST set the Result-Code AVP
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1661 value to DIAMETER_USER_NAME_REQUIRED (see Section 10.1.2) and return
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1662 it in a Diameter UAA message. Upon reception of this Diameter UAA
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1663 message with the Result-Code AVP value set to
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1664 DIAMETER_USER_NAME_REQUIRED, the SIP server typically requests
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1665 authentication by sending a SIP 401 (Unauthorized) or SIP 407 (Proxy
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1666 Authentication Required) response back to the originator.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1667
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1668 When the authorization procedure succeeds, the Diameter server
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1669 constructs a User-Authorization-Answer (UAA) message that MUST
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1670 include (1) the address of the SIP server already assigned to the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1671 user name, (2) the capabilities needed by the SIP server (Diameter
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1672 client) to select another SIP server for the user, or (3) a
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1673 combination of the previous two options.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1674
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1675 If the Diameter server is already aware of a SIP server allocated to
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1676 the user, the Diameter UAA message contains the address of that SIP
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1677 server.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1678
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1679 The Diameter UAA message contains the capabilities required by a SIP
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1680 server to trigger and execute services. It is required that these
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1681 capabilities are present in the Diameter UAA message due to the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1682 possibility that the Diameter client (in the SIP server) allocates a
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1683 different SIP server to trigger and execute services for that
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1684 particular user.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1685
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1686 If a User-Name AVP is present in the Diameter UAR message, then the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1687 Diameter server MUST verify the existence of the user in the realm,
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1688 i.e., the User-Name AVP value is a valid user within that realm. If
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1689 the Diameter server does not recognize the user name received in the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1690 User-Name AVP, the Diameter server MUST build a Diameter User-
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1691 Authorization-Answer (UAA) message and MUST set the Result-Code AVP
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1692 to DIAMETER_ERROR_USER_UNKNOWN.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1693
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1694
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1695 If a User-Name AVP is present in the Diameter UAR message, then the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1696 Diameter server MUST authorize that User-Name AVP value is able to
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1697 register the SIP or SIPS URI included in the SIP-AOR AVP. If this
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1698 authorization fails, the Diameter server must set the Result-Code AVP
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1699 to DIAMETER_ERROR_IDENTITIES_DONT_MATCH and send it in a Diameter
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1700 User-Authorization-Answer (UAA) message.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1701
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1702 Note: Correlation between User-Name and SIP-AOR AVP values is
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1703 required in order to avoid registration of a SIP-AOR allocated to
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1704 another user.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1705
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1706 If there is a SIP-Visited-Network-Id AVP in the Diameter UAR message,
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1707 and the SIP-User-Authorization-Type AVP value received in the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1708 Diameter UAR message is set to REGISTRATION or REGISTRATION&
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1709 CAPABILITIES, then the Diameter server SHOULD verify whether the user
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1710 is allowed to roam into the network specified in the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1711 SIP-Visited-Network-Id AVP in the Diameter UAR message. If the user
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1712 is not allowed to roam into that network, the Diameter AAA server
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1713 MUST set the Result-Code AVP value in the Diameter UAA message to
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1714 DIAMETER_ERROR_ROAMING_NOT_ALLOWED.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1715
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1716 If the SIP-User-Authorization-Type AVP value received in the Diameter
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1717 UAR message is set to REGISTRATION or REGISTRATION&CAPABILITIES, then
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1718 the Diameter server SHOULD verify whether the SIP-AOR AVP value is
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1719 authorized to register in the Home Realm. Where the SIP AOR is not
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1720 authorized to register in the Home Realm, the Diameter server MUST
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1721 set the Result-Code AVP to DIAMETER_AUTHORIZATION_REJECTED and send
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1722 it in a Diameter UAA message.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1723
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1724 When the SIP-User-Authorization-Type AVP is not present in the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1725 Diameter UAR message, or when it is present and its value is set to
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1726 REGISTRATION, then:
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1727
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1728 o If the Diameter server is not aware of any previous registration
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1729 of the user name (including registrations of other SIP AORs
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1730 allocated to the same user name), then the Diameter server does
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1731 not know of any SIP server allocated to the user. In this case,
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1732 the Diameter server MUST set the Result-Code AVP value to
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1733 DIAMETER_FIRST_REGISTRATION in the Diameter UAA message, and the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1734 Diameter server SHOULD include the required SIP server
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1735 capabilities in the SIP-Server-Capabilities AVP value in the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1736 Diameter UAA message. The SIP-Server-Capabilities AVP assists the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1737 Diameter client (SIP server) to select an appropriate SIP server
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1738 for the user, according to the required capabilities.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1739
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1740 o In some cases, the Diameter server is aware of a previously
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1741 assigned SIP server for the same or different SIP AORs allocated
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1742 to the same user name. In these cases, re-assignment of a new SIP
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1743 server may or may not be needed, depending on the capabilities of
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1744 the SIP server. The Diameter server MUST always include the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1745 allocated SIP server URI in the SIP-Server-URI AVP of the UAA
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1746 message. If the Diameter server does not return the SIP
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1747 capabilities, the Diameter server MUST set the Result-Code AVP in
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1748 the Diameter UAA message to DIAMETER_SUBSEQUENT_REGISTRATION.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1749 Otherwise (i.e., if the Diameter server includes a
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1750 SIP-Server-Capabilities AVP), then the Diameter server MUST set
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1751 the Result-Code AVP in the Diameter UAA message to
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1752 DIAMETER_SERVER_SELECTION. Then the Diameter client determines,
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1753 based on the received information, whether it needs to select a
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1754 new SIP server.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1755
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1756 When the SIP-User-Authorization-Type AVP value received in the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1757 Diameter UAR message is set to REGISTRATION&CAPABILITIES, then
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1758 Diameter Server MUST return the list of capabilities in the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1759 SIP-Server-Capabilities AVP value of the Diameter UAA message, it
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1760 MUST set the Result-Code to DIAMETER_SUCCESS, and it MUST NOT return
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1761 a SIP-Server-URI AVP. The SIP-Server-Capabilities AVP enables the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1762 SIP server (Diameter client) to select another appropriate SIP server
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1763 for invoking and executing services for the user, depending on the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1764 required capabilities. The Diameter server MAY leave the list of
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1765 capabilities empty to indicate that any SIP server can be selected.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1766
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1767 When the SIP-User-Authorization-Type AVP value received in the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1768 Diameter UAR message is set to DEREGISTRATION, then:
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1769
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1770 o If the Diameter server is aware of a SIP server assigned to the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1771 SIP AOR under deregistration, the Diameter server MUST set the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1772 Result-Code AVP to DIAMETER_SUCCESS and MUST set the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1773 SIP-Server-URI AVP value to the known SIP server, and return them
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1774 in the Diameter UAA message.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1775
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1776 o If the Diameter server is not aware of a SIP server assigned to
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1777 the SIP AOR under deregistration, then the Diameter server MUST
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1778 set the Result-Code AVP in the Diameter UAA message to
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1779 DIAMETER_ERROR_IDENTITY_NOT_REGISTERED.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1780
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1781 The Message Format of the UAA command is as follows:
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1782
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1783 <UAA> ::= < Diameter Header: 283, PXY >
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1784 < Session-Id >
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1785 { Auth-Application-Id }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1786 { Auth-Session-State }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1787 { Result-Code }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1788 { Origin-Host }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1789 { Origin-Realm }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1790 [ SIP-Server-URI ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1791 [ SIP-Server-Capabilities ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1792 [ Authorization-Lifetime ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1793 [ Auth-Grace-Period ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1794 [ Redirect-Host ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1795 [ Redirect-Host-Usage ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1796 [ Redirect-Max-Cache-Time ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1797 * [ Proxy-Info ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1798 * [ Route-Record ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1799 * [ AVP ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1800
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1801
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1802 */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1803 struct dict_object * cmd;
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1804 struct dict_cmd_data data = {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1805 283, /* Code */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1806 "User-Authorization-Answer", /* Name */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1807 CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1808 CMD_FLAG_PROXIABLE /* Fixed flag values */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1809 };
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1810 struct local_rules_definition rules[] =
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1811 { { "Session-Id", RULE_FIXED_HEAD, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1812 ,{ "Auth-Application-Id", RULE_REQUIRED, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1813 ,{ "Auth-Session-State", RULE_REQUIRED, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1814 ,{ "Result-Code", RULE_REQUIRED, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1815 ,{ "Origin-Host", RULE_REQUIRED, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1816 ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1817 ,{ "SIP-Server-URI", RULE_OPTIONAL, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1818 ,{ "SIP-Server-Capabilities", RULE_OPTIONAL, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1819 ,{ "Authorization-Lifetime", RULE_OPTIONAL, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1820 ,{ "Auth-Grace-Period", RULE_OPTIONAL, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1821 ,{ "Redirect-Host", RULE_OPTIONAL, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1822 ,{ "Redirect-Host-Usage", RULE_OPTIONAL, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1823 ,{ "Redirect-Max-Cache-Time", RULE_OPTIONAL, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1824 ,{ "Proxy-Info", RULE_OPTIONAL, -1, -1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1825 ,{ "Route-Record", RULE_OPTIONAL, -1, -1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1826
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1827 };
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1828
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1829 CHECK_dict_new( DICT_COMMAND, &data , sip, &cmd);
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1830 PARSE_loc_rules( rules, cmd );
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1831 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1832
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1833 /* Multimedia-Auth-Request (MAR) Command */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1834 {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1835 /*
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1836
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1837 The Multimedia-Auth-Request (MAR) command is indicated by the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1838 Command-Code set to 286 and the Command Flags' 'R' bit set. The
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1839 Diameter client in a SIP server sends this command to the Diameter
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1840 server to request that the Diameter server authenticate and authorize
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1841 a user attempt to use some SIP service (in this context, SIP service
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1842 can be something as simple as a SIP subscription or using the proxy
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1843 services for a SIP request).
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1844
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1845 The MAR command may also register the SIP server's own URI to the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1846 Diameter server, so that future LIR/LIA messages can return this URI.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1847 If the SIP server is acting as a SIP registrar (see examples in
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1848 Sections 6.2 and 6.3), its Diameter client MUST include a SIP-
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1849 Server-URI AVP in the MAR command. In any other cases (see example
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1850 in Section 6.4), its Diameter client MUST NOT include a SIP-Server-
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1851 URI AVP in the MAR command.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1852
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1853 The SIP-Method AVP MUST include the SIP method name of the SIP
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1854 request that triggered this Diameter MAR message. The Diameter
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1855 server can use this AVP to authorize some SIP requests depending on
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1856 the method.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1857
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1858 The Diameter MAR message MUST include a SIP-AOR AVP. The SIP-AOR AVP
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1859 indicates the target of the SIP request. The value of the AVP is
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1860 extracted from different places in SIP request, depending on the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1861 semantics of the SIP request. For SIP REGISTER messages the SIP-AOR
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1862 AVP value indicates the intended public user identity under
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1863 registration, and it is the SIP or SIPS URI populated in the To
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1864 header field value (addr-spec as per RFC 3261 [RFC3261]) of the SIP
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1865 REGISTER request. For other types of SIP requests, such as INVITE,
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1866 SUBSCRIBE, MESSAGE, etc., the SIP-AOR AVP value indicates the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1867 intended destination of the request. This is typically populated in
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1868 the Request-URI of the SIP request. Extracting the SIP-AOR AVP value
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1869 from the proper SIP header field is the Diameter client's
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1870 responsibility. Extensions to SIP (new SIP methods or new semantics)
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1871 may require the SIP-AOR to be extracted from other parts of the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1872 request.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1873
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1874 If the SIP request includes some sort of authentication information,
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1875 the Diameter client MUST include the user name, extracted from the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1876 authentication information of the SIP request, in the User-Name AVP
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1877 value.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1878
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1879 The Message Format of the MAR command is as follows:
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1880
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1881 <MAR> ::= < Diameter Header: 286, REQ, PXY >
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1882 < Session-Id >
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1883 { Auth-Application-Id }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1884 { Auth-Session-State }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1885 { Origin-Host }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1886 { Origin-Realm }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1887 { Destination-Realm }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1888 { SIP-AOR }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1889 { SIP-Method }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1890 [ Destination-Host ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1891 [ User-Name ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1892 [ SIP-Server-URI ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1893 [ SIP-Number-Auth-Items ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1894 [ SIP-Auth-Data-Item ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1895 * [ Proxy-Info ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1896 * [ Route-Record ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1897 * [ AVP ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1898
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1899
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1900
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1901 */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1902 struct dict_object * cmd;
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1903 struct dict_cmd_data data = {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1904 286, /* Code */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1905 "Multimedia-Auth-Request", /* Name */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1906 CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1907 CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE /* Fixed flag values */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1908 };
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1909 struct local_rules_definition rules[] =
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1910 { { "Session-Id", RULE_FIXED_HEAD, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1911 ,{ "Auth-Application-Id", RULE_REQUIRED, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1912 ,{ "Auth-Session-State", RULE_REQUIRED, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1913 ,{ "Origin-Host", RULE_REQUIRED, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1914 ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1915 ,{ "Destination-Realm", RULE_REQUIRED, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1916 ,{ "SIP-AOR", RULE_REQUIRED, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1917 ,{ "SIP-Method", RULE_REQUIRED, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1918 ,{ "Destination-Host", RULE_OPTIONAL, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1919 ,{ "User-Name", RULE_OPTIONAL, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1920 ,{ "SIP-Server-URI", RULE_OPTIONAL, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1921 ,{ "SIP-Number-Auth-Items", RULE_OPTIONAL, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1922 ,{ "SIP-Auth-Data-Item", RULE_OPTIONAL, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1923 ,{ "Proxy-Info", RULE_OPTIONAL, -1, -1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1924 ,{ "Route-Record", RULE_OPTIONAL, -1, -1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1925
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1926 };
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1927
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1928 CHECK_dict_new( DICT_COMMAND, &data , sip, &cmd);
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1929 PARSE_loc_rules( rules, cmd );
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1930 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1931 /* Multimedia-Auth-Answer (MAA) Command */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1932 {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1933 /*
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1934
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1935 The Multimedia-Auth-Answer (MAA) is indicated by the Command-Code set
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1936 to 286 and the Command Flags' 'R' bit cleared. The Diameter server
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1937 sends this command in response to a previously received Diameter
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1938 Multimedia-Auth-Request (MAR) command.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1939
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1940 In addition to the values already defined in RFC 3588 [RFC3588], the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1941 Result-Code AVP may contain one of the values defined in
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1942 Section 10.1.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1943
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1944 If the Diameter server requires a User-Name AVP value to process the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1945 Diameter MAR request, but the Diameter MAR message did not contain a
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1946 User-Name AVP value, the Diameter server MUST set the Result-Code AVP
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1947 value to DIAMETER_USER_NAME_REQUIRED (see Section 10.1.2) and return
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1948 it in a Diameter MAA message. The Diameter server MAY include a
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1949 SIP-Number-Auth-Items AVP and one or more SIP-Auth-Data-Item AVPs
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1950 with authentication information (e.g., a challenge). Upon reception
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1951 of this Diameter MAA message with the Result-Code AVP value set to
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1952 DIAMETER_USER_NAME_REQUIRED, the SIP server typically requests
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1953 authentication by generating a SIP 401 (Unauthorized) or SIP 407
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1954 (Proxy Authentication Required) response back to the originator.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1955
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1956 If the User-Name AVP is present in the Diameter MAR message, the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1957 Diameter server MUST verify the existence of the user in the realm,
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1958 i.e., the User-Name AVP value is a valid user within that realm. If
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1959 the Diameter server does not recognize the user name received in the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1960 User-Name AVP, the Diameter server MUST build a Diameter
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1961 Multimedia-Auth-Answer (MAA) message and MUST set the Result-Code AVP
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1962 to DIAMETER_ERROR_USER_UNKNOWN.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1963
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1964 If the SIP-Methods AVP value of the Diameter MAR message is set to
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1965 REGISTER and a User-Name AVP is present, then the Diameter server
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1966 MUST authorize that User-Name AVP value is able to use the URI
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1967 included in the SIP-AOR AVP. If this authorization fails, the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1968 Diameter server must set the Result-Code AVP to
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1969 DIAMETER_ERROR_IDENTITIES_DONT_MATCH and send it in a Diameter
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1970 Multimedia-Auth-Answer (MAA) message.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1971
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1972 Note: Correlation between User-Name and SIP-AOR AVP values is only
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1973 required for SIP REGISTER request, to prevent a user from
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1974 registering a SIP-AOR allocated to another user. In other types
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1975 of SIP requests (e.g., INVITE), the SIP-AOR indicates the intended
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1976 destination of the request, rather than the originator of it.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1977
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1978 The Diameter server MUST verify whether the authentication scheme
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1979 (SIP-Authentication-Scheme AVP value) indicated in the grouped
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1980 SIP-Auth-Data-Item AVP is supported or not. If that authentication
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1981 scheme is not supported, then the Diameter server MUST set the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1982 Result-Code AVP to DIAMETER_ERROR_AUTH_SCHEME_NOT_SUPPORTED and send
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1983 it in a Diameter Multimedia-Auth-Answer (MAA) message.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1984
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1985 If the SIP-Number-Auth-Items AVP is present in the Diameter MAR
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1986 message, it indicates the number of authentication data items that
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1987 the Diameter client is requesting. It is RECOMMENDED that the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1988 Diameter server, when building the Diameter MAA message, includes a
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1989 number of SIP-Auth-Data-Item AVPs that are a subset of the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1990 authentication data items requested by the Diameter client in the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1991 SIP-Number-Auth-Items AVP value of the Diameter MAR message.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1992
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1993 If the SIP-Server-URI AVP is present in the Diameter MAR message,
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1994 then the Diameter server MUST compare the stored SIP server (assigned
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1995 to the user) with the SIP-Server-URI AVP value (received in the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1996 Diameter MAR message). If they don't match, the Diameter server MUST
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1997 temporarily save the newly received SIP server assigned to the user,
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1998 and MUST set an "authentication pending" flag for the user. If they
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1999 match, the Diameter server shall clear the "authentication pending"
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2000 flag for the user.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2001
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2002 In any other situation, if there is a success in processing the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2003 Diameter MAR command and the Diameter server stored the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2004 SIP-Server-URI, the Diameter server MUST set the Result-Code AVP
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2005 value to DIAMETER_SUCCESS and return it in a Diameter MAA message.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2006
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2007 If there is a success in processing the Diameter MAR command, but the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2008 Diameter server does not store the SIP-Server-URI because the AVP was
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2009 not present in the Diameter MAR command, then the Diameter server
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2010 MUST set the Result-Code AVP value to either:
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2011
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2012 1. DIAMETER_SUCCESS_AUTH_SENT_SERVER_NOT_STORED, if the Diameter
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2013 server is sending authentication credentials to create a
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2014 challenge.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2015
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2016 2. DIAMETER_SUCCESS_SERVER_NAME_NOT_STORED, if the Diameter server
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2017 successfully authenticated the user and authorized the SIP server
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2018 to proceed with the SIP request.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2019
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2020 Otherwise, the Diameter server MUST set the Result-Code AVP value to
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2021 DIAMETER_UNABLE_TO_COMPLY, and it MUST NOT include any
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2022 SIP-Auth-Data-Item AVP.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2023
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2024 The Message Format of the MAA command is as follows:
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2025
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2026 <MAA> ::= < Diameter Header: 286, PXY >
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2027 < Session-Id >
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2028 { Auth-Application-Id }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2029 { Result-Code }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2030 { Auth-Session-State }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2031 { Origin-Host }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2032 { Origin-Realm }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2033 [ User-Name ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2034 [ SIP-AOR ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2035 [ SIP-Number-Auth-Items ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2036 * [ SIP-Auth-Data-Item ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2037 [ Authorization-Lifetime ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2038 [ Auth-Grace-Period ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2039 [ Redirect-Host ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2040 [ Redirect-Host-Usage ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2041 [ Redirect-Max-Cache-Time ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2042 * [ Proxy-Info ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2043 * [ Route-Record ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2044 * [ AVP ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2045
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2046 */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2047 struct dict_object * cmd;
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2048 struct dict_cmd_data data = {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2049 286, /* Code */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2050 "Multimedia-Auth-Answer", /* Name */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2051 CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2052 CMD_FLAG_PROXIABLE /* Fixed flag values */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2053 };
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2054 struct local_rules_definition rules[] =
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2055 { { "Session-Id", RULE_FIXED_HEAD, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2056 ,{ "Auth-Application-Id", RULE_REQUIRED, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2057 ,{ "Result-Code", RULE_REQUIRED, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2058 ,{ "Auth-Session-State", RULE_REQUIRED, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2059 ,{ "Origin-Host", RULE_REQUIRED, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2060 ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2061 ,{ "User-Name", RULE_OPTIONAL, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2062 ,{ "SIP-AOR", RULE_OPTIONAL, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2063 ,{ "SIP-Number-Auth-Items", RULE_OPTIONAL, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2064 ,{ "SIP-Auth-Data-Item", RULE_OPTIONAL, -1, -1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2065 ,{ "Authorization-Lifetime", RULE_OPTIONAL, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2066 ,{ "Auth-Grace-Period", RULE_OPTIONAL, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2067 ,{ "Redirect-Host", RULE_OPTIONAL, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2068 ,{ "Redirect-Host-Usage", RULE_OPTIONAL, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2069 ,{ "Redirect-Max-Cache-Time", RULE_OPTIONAL, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2070 ,{ "Proxy-Info", RULE_OPTIONAL, -1, -1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2071 ,{ "Route-Record", RULE_OPTIONAL, -1, -1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2072
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2073 };
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2074
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2075 CHECK_dict_new( DICT_COMMAND, &data , sip, &cmd);
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2076 PARSE_loc_rules( rules, cmd );
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2077 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2078 /* Server-Assignment-Request (SAR) Command */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2079 {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2080 /*
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2081
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2082 The Server-Assignment-Request (SAR) command is indicated by the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2083 Command-Code set to 284 and the Command Flags' 'R' bit set. The
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2084 Diameter client in a SIP server sends this command to the Diameter
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2085 server to indicate the completion of the authentication process and
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2086 to request that the Diameter server store the URI of the SIP server
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2087 that is currently serving the user. The main functions of the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2088 Diameter SAR command are to inform the Diameter server of the URI of
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2089 the SIP server allocated to the user, and to store or clear it from
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2090 the Diameter server. Additionally, the Diameter client can request
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2091 to download the user profile or part of it.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2092
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2093 During the registration procedure, a SIP server becomes assigned to
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2094 the user. The Diameter client in the assigned SIP server MUST
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2095 include its own URI in the SIP-Server-URI AVP of the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2096 Server-Assignment-Request (SAR) Diameter message and send it to the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2097 Diameter server. The Diameter server then becomes aware of the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2098 allocation of the SIP server to the user name and the server's URI.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2099
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2100 The Diameter client in the SIP server MAY send a Diameter SAR message
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2101 because of other reasons. These reasons are identified in the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2102 SIP-Server-Assignment-Type AVP (Section 9.4) value. For instance, a
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2103 Diameter client in a SIP server may contact the Diameter server to
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2104 request deregistration of a user, to inform the Diameter server of an
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2105 authentication failure, or just to download the user profile. For a
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2106 complete description of all the SIP-Server-Assignment-Type AVP
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2107 values, see Section 9.4.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2108
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2109 Typically the reception of a SIP REGISTER request in a SIP server
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2110 will trigger the Diameter client in the SIP server to send the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2111 Diameter SAR message. However, if a SIP server is receiving other
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2112 SIP request, such as INVITE, and the SIP server does not have the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2113 user profile, the Diameter client in the SIP server may send the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2114 Diameter SAR message to the Diameter server in order to download the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2115 user profile and make the Diameter server aware of the SIP server
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2116 assigned to the user.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2117 The user profile is an important piece of information that dictates
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2118 the behavior of the SIP server when triggering or providing services
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2119 for the user. Typically the user profile is divided into:
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2120
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2121 o Services to be rendered to the user when the user is registered
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2122 and initiates a SIP request.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2123
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2124 o Services to be rendered to the user when the user is registered
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2125 and a SIP request destined to that user arrives to the SIP proxy.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2126
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2127 o Services to be rendered to the user when the user is not
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2128 registered and a SIP request destined to that user arrives to the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2129 SIP proxy.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2130
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2131 The SIP-Server-Assignment-Type AVP indicates the reason why the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2132 Diameter client (SIP server) contacted the Diameter server. If the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2133 Diameter client sets the SIP-Server-Assignment-Type AVP value to
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2134 REGISTRATION, RE_REGISTRATION, UNREGISTERED_USER, NO_ASSIGNMENT,
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2135 AUTHENTICATION_FAILURE or AUTHENTICATION_TIMEOUT, the Diameter client
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2136 MUST include exactly one SIP-AOR AVP in the Diameter SAR message.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2137
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2138 The SAR message MAY contain zero or more SIP-Supported-User-Data-Type
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2139 AVPs. Each of them contains a type of user data understood by the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2140 SIP server. This allows the Diameter client to provide an indication
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2141 to the Diameter server of the different format of user data
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2142 understood by the SIP server. The Diameter server uses this
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2143 information to select one or more SIP-User-Data AVPs that will be
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2144 included in the SAA message.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2145
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2146 The Message Format of the SAR command is as follows:
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2147
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2148 <SAR> ::= < Diameter Header: 284, REQ, PXY >
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2149 < Session-Id >
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2150 { Auth-Application-Id }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2151 { Auth-Session-State }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2152 { Origin-Host }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2153 { Origin-Realm }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2154 { Destination-Realm }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2155 { SIP-Server-Assignment-Type }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2156 { SIP-User-Data-Already-Available }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2157 [ Destination-Host ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2158 [ User-Name ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2159 [ SIP-Server-URI ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2160 * [ SIP-Supported-User-Data-Type ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2161 * [ SIP-AOR ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2162 * [ Proxy-Info ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2163 * [ Route-Record ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2164 * [ AVP ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2165 */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2166 struct dict_object * cmd;
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2167 struct dict_cmd_data data = {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2168 284, /* Code */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2169 "Server-Assignment-Request", /* Name */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2170 CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2171 CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE /* Fixed flag values */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2172 };
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2173 struct local_rules_definition rules[] =
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2174 { { "Session-Id", RULE_FIXED_HEAD, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2175 ,{ "Auth-Application-Id", RULE_REQUIRED, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2176 ,{ "Auth-Session-State", RULE_REQUIRED, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2177 ,{ "Origin-Host", RULE_REQUIRED, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2178 ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2179 ,{ "Destination-Realm", RULE_REQUIRED, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2180 ,{ "SIP-Server-Assignment-Type", RULE_REQUIRED, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2181 ,{ "SIP-User-Data-Already-Available", RULE_REQUIRED, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2182 ,{ "Destination-Host", RULE_OPTIONAL, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2183 ,{ "User-Name", RULE_OPTIONAL, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2184 ,{ "SIP-Server-URI", RULE_OPTIONAL, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2185 ,{ "SIP-Supported-User-Data-Type", RULE_OPTIONAL, -1, -1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2186 ,{ "SIP-AOR", RULE_OPTIONAL, -1, -1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2187 ,{ "Proxy-Info", RULE_OPTIONAL, -1, -1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2188 ,{ "Route-Record", RULE_OPTIONAL, -1, -1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2189
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2190 };
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2191
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2192 CHECK_dict_new( DICT_COMMAND, &data , sip, &cmd);
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2193 PARSE_loc_rules( rules, cmd );
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2194 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2195 /* Server-Assignment-Answer (SAA) Command */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2196 {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2197 /*
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2198
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2199 The Server-Assignment-Answer (SAA) is indicated by the Command-Code
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2200 set to 284 and the Command Flags' 'R' bit cleared. The Diameter
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2201 server sends this command in response to a previously received
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2202 Diameter Server-Assignment-Request (SAR) command. The response may
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2203 include the user profile or part of it, if requested.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2204
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2205 In addition to the values already defined in RFC 3588 [RFC3588], the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2206 Result-Code AVP may contain one of the values defined in
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2207 Section 10.1.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2208
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2209 The Result-Code AVP value in the Diameter SAA message may indicate a
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2210 success or an error in the execution of the Diameter SAR command. If
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2211 Result-Code AVP value in the Diameter SAA message does not contain an
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2212 error code, the SAA message MAY include one or more SIP-User-Data
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2213 AVPs that typically contain the profile of the user, indicating
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2214 services that the SIP server can provide to that user.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2215
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2216 The Diameter server MAY include one or more
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2217 SIP-Supported-User-Data-Type AVPs, each one identifying a type of
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2218 user data format supported in the Diameter server. If there is not a
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2219 common supported user data type between the Diameter client and the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2220 Diameter server, the Diameter server SHOULD declare its list of
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2221 supported user data types by including one or more
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2222 SIP-Supported-User-Data-Type AVPs in a Diameter SAA message. This
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2223 indication is merely for debugging reasons, since there is not a
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2224 fallback mechanism that allows the Diameter client to retrieve the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2225 profile in a supported format.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2226
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2227 If the Diameter server requires a User-Name AVP value to process the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2228 Diameter SAR request, but the Diameter SAR message did not contain a
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2229 User-Name AVP value, the Diameter server MUST set the Result-Code AVP
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2230 value to DIAMETER_USER_NAME_REQUIRED (see Section 10.1.2) and return
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2231 it in a Diameter SAA message. Upon reception of this Diameter SAA
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2232 message with the Result-Code AVP value set to
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2233 DIAMETER_USER_NAME_REQUIRED, the SIP server typically requests
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2234 authentication by generating a SIP 401 (Unauthorized) or SIP 407
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2235 (Proxy Authentication Required) response back to the originator.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2236
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2237 If the User-Name AVP is included in the Diameter SAR message, upon
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2238 reception of the Diameter SAR message, the Diameter server MUST
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2239 verify the existence of the user in the realm, i.e., the User-Name
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2240 AVP value is a valid user within that realm. If the Diameter server
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2241 does not recognize the user name received in the User-Name AVP, the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2242 Diameter server MUST build a Diameter Server-Assignment-Answer (SAA)
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2243 message and MUST set the Result-Code AVP to
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2244 DIAMETER_ERROR_USER_UNKNOWN.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2245 Then the Diameter server MUST authorize that User-Name AVP value is a
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2246 valid authentication name for the SIP or SIPS URI included in the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2247 SIP-AOR AVP of the Diameter SAR message. If this authorization
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2248 fails, the Diameter server must set the Result-Code AVP to
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2249 DIAMETER_ERROR_IDENTITIES_DONT_MATCH and send it in a Diameter
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2250 Server-Assignment-Answer (SAA) message.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2251
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2252 After successful execution of the Diameter SAR command, the Diameter
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2253 server MUST clear the "authentication pending" flag and SHOULD move
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2254 the temporarily stored SIP server URI to permanent storage.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2255
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2256 The actions of the Diameter server upon reception of the Diameter SAR
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2257 message depend on the value of the SIP-Server-Assignment-Type:
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2258
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2259 o If the SIP-Server-Assignment-Type AVP value in the Diameter SAR
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2260 message is set to REGISTRATION or RE_REGISTRATION, the Diameter
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2261 server SHOULD verify that there is only one SIP-AOR AVP.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2262 Otherwise, the Diameter server MUST answer with a Diameter SAA
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2263 message with the Result-Code AVP value set to
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2264 DIAMETER_AVP_OCCURS_TOO_MANY_TIMES and MUST NOT include any
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2265 SIP-User-Data AVP. If there is only one SIP-AOR AVP and if the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2266 SIP-User-Data-Already-Available AVP value is set to
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2267 USER_DATA_NOT_AVAILABLE, then the Diameter server SHOULD include
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2268 one or more user profile data with the SIP or SIPS URI (SIP-AOR
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2269 AVP) and all other SIP identities associated with that AVP in the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2270 SIP-User-Data AVP value of the Diameter SAA message. On selecting
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2271 the type of user data, the Diameter server SHOULD take into
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2272 account the supported formats at the SIP server
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2273 (SIP-Supported-User-Data-Type AVP in the SAR message) and the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2274 local policy. Additionally, the Diameter server MUST set the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2275 Result-Code AVP value to DIAMETER_SUCCESS in the Diameter SAA
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2276 message. The Diameter server considers the SIP AOR authenticated
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2277 and registered.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2278
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2279 o If the SIP-Server-Assignment-Type AVP value in the Diameter SAR
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2280 message is set to UNREGISTERED_USER, then the Diameter server MUST
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2281 store the SIP server address included in the SIP-Server-URI AVP
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2282 value. The Diameter server will return the SIP server address in
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2283 Diameter Location-Info-Answer (LIA) messages. If the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2284 SIP-User-Data-Already-Available AVP value is set to
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2285 USER_DATA_NOT_AVAILABLE, then the Diameter server SHOULD include
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2286 one or more user profile data associated with the SIP or SIPS URI
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2287 (SIP-AOR AVP) and associated identities in the SIP-User-Data AVP
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2288 value of the Diameter SAA message. On selecting the type of user
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2289 data, the Diameter server SHOULD take into account the supported
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2290 formats at the SIP server (SIP-Supported-User-Data-Type AVP in the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2291 SAR message) and the local policy. The Diameter server MUST set
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2292 the Result-Code AVP value to DIAMETER_SUCCESS. The Diameter
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2293 server considers the SIP AOR UNREGISTERED, but with a SIP server
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2294 allocated to trigger and provide services for unregistered users.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2295 Note that in case of UNREGISTERED_USER (SIP-Server-Assignment-Type
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2296 AVP), the Diameter server MUST verify that there is only one
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2297 SIP-AOR AVP. Otherwise, the Diameter server MUST answer the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2298 Diameter SAR message with a Diameter SAA message, and it MUST set
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2299 the Result-Code AVP value to DIAMETER_AVP_OCCURS_TOO_MANY_TIMES
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2300 and MUST NOT include any SIP-User-Data AVP.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2301 If the User-Name AVP was not present in the Diameter SAR message
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2302 and the SIP-AOR is not known for the Diameter server, the Diameter
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2303 server MUST NOT include a User-Name AVP in the Diameter SAA
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2304 message and MUST set the Result-Code AVP value to
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2305 DIAMETER_ERROR_USER_UNKNOWN.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2306
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2307 o If the SIP-Server-Assignment-Type AVP value in the Diameter SAR
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2308 message is set to TIMEOUT_DEREGISTRATION, USER_DEREGISTRATION,
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2309 DEREGISTRATION_TOO_MUCH_DATA, or ADMINISTRATIVE_DEREGISTRATION,
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2310 the Diameter server MUST clear the SIP server address associated
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2311 with all SIP AORs indicated in each of the SIP-AOR AVP values
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2312 included in the Diameter SAR message. The Diameter server
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2313 considers all of these SIP AORs as not registered. The Diameter
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2314 server MUST set the Result-Code AVP value to DIAMETER_SUCCESS in
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2315 the Diameter SAA message.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2316
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2317 o If the SIP-Server-Assignment-Type AVP value in the Diameter SAR
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2318 message is set to TIMEOUT_DEREGISTRATION_STORE_SERVER_NAME or
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2319 USER_DEREGISTRATION_STORE_SERVER_NAME, the Diameter server MAY
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2320 keep the SIP server address associated with the SIP AORs included
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2321 in the SIP-AOR AVP values of the Diameter SAR message, even though
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2322 the SIP AORs become unregistered. This feature allows a SIP
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2323 server to request that the Diameter server remain an assigned SIP
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2324 server for those SIP AORs (SIP-AOR AVP values) allocated to the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2325 same user name, and avoid SIP server assignment. The Diameter
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2326 server MUST consider all these SIP AORs as not registered. If the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2327 Diameter server honors the request of the Diameter client (SIP
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2328 server) to remain as an allocated SIP server, then the Diameter
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2329 server MUST keep the SIP server assigned to those SIP AORs
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2330 allocated to the username and MUST set the Result-Code AVP value
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2331 to DIAMETER_SUCCESS in the Diameter SAA message. Otherwise, when
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2332 the Diameter server does not honor the request of the Diameter
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2333 client (SIP server) to remain as an allocated SIP server, the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2334 Diameter server MUST clear the SIP server name assigned to those
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2335 SIP AORs and it MUST set the Result-Code AVP value to
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2336 DIAMETER_SUCCESS_SERVER_NAME_NOT_STORED in the Diameter SAA
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2337 message.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2338 o If the SIP-Server-Assignment-Type AVP value in the Diameter SAR
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2339 message is set to NO_ASSIGNMENT, the Diameter server SHOULD first
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2340 verify that the SIP-Server-URI AVP value in the Diameter SAR
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2341 message is the same URI as the one assigned to the SIP-AOR AVP
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2342 value. If they differ, then the Diameter server MUST set the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2343 Result-Code AVP value to DIAMETER_UNABLE_TO_COMPLY in the Diameter
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2344 SAA message. Otherwise, if the SIP-User-Data-Already-Available
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2345 AVP value is set to USER_DATA_NOT_AVAILABLE, then the Diameter
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2346 server SHOULD include the user profile data with the SIP or SIPS
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2347 URI (SIP-AOR AVP) and all other SIP identities associated with
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2348 that AVP in the SIP-User-Data AVP value of the Diameter SAA
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2349 message. On selecting the type of user data, the Diameter server
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2350 SHOULD take into account the supported formats at the SIP server
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2351 (SIP-Supported-User-Data-Type AVP in the SAR message) and the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2352 local policy.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2353
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2354 o If the SIP-Server-Assignment-Type AVP value in the Diameter SAR
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2355 message is set to AUTHENTICATION_FAILURE or
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2356 AUTHENTICATION_TIMEOUT, the Diameter server MUST verify that there
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2357 is exactly one SIP-AOR AVP in the Diameter SAR message. If the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2358 number of occurrences of the SIP-AOR AVP is not exactly one, the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2359 Diameter server MUST set the Result-Code AVP value to
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2360 DIAMETER_AVP_OCCURS_TOO_MANY_TIMES in the Diameter SAA message,
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2361 and SHOULD not take further actions. If there is exactly one
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2362 SIP-AOR AVP in the Diameter SAR message, the Diameter server MUST
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2363 clear the address of the SIP server assigned to the SIP AOR
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2364 allocated to the user name, and the Diameter server MUST set the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2365 Result-Code AVP value to DIAMETER_SUCCESS in the Diameter SAA
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2366 message. The Diameter server MUST consider the SIP AOR as not
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2367 registered.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2368
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2369 The Message Format of the SAA command is as follows:
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2370
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2371 <SAA> ::= < Diameter Header: 284, PXY >
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2372 < Session-Id >
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2373 { Auth-Application-Id }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2374 { Result-Code }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2375 { Auth-Session-State }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2376 { Origin-Host }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2377 { Origin-Realm }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2378 * [ SIP-User-Data ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2379 [ SIP-Accounting-Information ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2380 * [ SIP-Supported-User-Data-Type ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2381 [ User-Name ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2382 [ Auth-Grace-Period ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2383 [ Authorization-Lifetime ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2384 [ Redirect-Host ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2385 [ Redirect-Host-Usage ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2386 [ Redirect-Max-Cache-Time ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2387 * [ Proxy-Info ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2388 * [ Route-Record ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2389 * [ AVP ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2390
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2391
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2392
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2393
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2394 */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2395 struct dict_object * cmd;
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2396 struct dict_cmd_data data = {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2397 284, /* Code */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2398 "Server-Assignment-Answer", /* Name */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2399 CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2400 CMD_FLAG_PROXIABLE /* Fixed flag values */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2401 };
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2402 struct local_rules_definition rules[] =
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2403 { { "Session-Id", RULE_FIXED_HEAD, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2404 ,{ "Auth-Application-Id", RULE_REQUIRED, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2405 ,{ "Result-Code", RULE_REQUIRED, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2406 ,{ "Auth-Session-State", RULE_REQUIRED, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2407 ,{ "Origin-Host", RULE_REQUIRED, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2408 ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2409 ,{ "SIP-User-Data", RULE_OPTIONAL, -1, -1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2410 ,{ "SIP-Accounting-Information", RULE_OPTIONAL, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2411 ,{ "SIP-Supported-User-Data-Type", RULE_OPTIONAL, -1, -1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2412 ,{ "User-Name", RULE_OPTIONAL, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2413 ,{ "Auth-Grace-Period", RULE_OPTIONAL, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2414 ,{ "Authorization-Lifetime", RULE_OPTIONAL, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2415 ,{ "Redirect-Host", RULE_OPTIONAL, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2416 ,{ "Redirect-Host-Usage", RULE_OPTIONAL, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2417 ,{ "Redirect-Max-Cache-Time", RULE_OPTIONAL, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2418 ,{ "Proxy-Info", RULE_OPTIONAL, -1, -1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2419 ,{ "Route-Record", RULE_OPTIONAL, -1, -1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2420
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2421 };
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2422
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2423 CHECK_dict_new( DICT_COMMAND, &data , sip, &cmd);
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2424 PARSE_loc_rules( rules, cmd );
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2425 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2426 /* Location-Info-Request (LIR) Command */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2427 {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2428 /*
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2429
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2430 The Location-Info-Request (LIR) is indicated by the Command-Code set
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2431 to 285 and the Command Flags' 'R' bit set. The Diameter client in a
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2432 SIP server sends this command to the Diameter server to request
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2433 routing information, e.g., the URI of the SIP server assigned to the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2434 SIP-AOR AVP value allocated to the users.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2435
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2436 The Message Format of the LIR command is as follows:
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2437
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2438 <LIR> ::= < Diameter Header: 285, REQ, PXY >
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2439 < Session-Id >
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2440 { Auth-Application-Id }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2441 { Auth-Session-State }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2442 { Origin-Host }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2443 { Origin-Realm }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2444 { Destination-Realm }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2445 { SIP-AOR }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2446 [ Destination-Host ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2447 * [ Proxy-Info ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2448 * [ Route-Record ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2449 * [ AVP ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2450 */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2451 struct dict_object * cmd;
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2452 struct dict_cmd_data data = {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2453 285, /* Code */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2454 "Location-Info-Request", /* Name */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2455 CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2456 CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE /* Fixed flag values */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2457 };
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2458 struct local_rules_definition rules[] =
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2459 { { "Session-Id", RULE_FIXED_HEAD, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2460 ,{ "Auth-Application-Id", RULE_REQUIRED, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2461 ,{ "Auth-Session-State", RULE_REQUIRED, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2462 ,{ "Origin-Host", RULE_REQUIRED, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2463 ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2464 ,{ "Destination-Realm", RULE_REQUIRED, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2465 ,{ "SIP-AOR", RULE_REQUIRED, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2466 ,{ "Destination-Host", RULE_OPTIONAL, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2467 ,{ "Proxy-Info", RULE_OPTIONAL, -1, -1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2468 ,{ "Route-Record", RULE_OPTIONAL, -1, -1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2469
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2470 };
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2471
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2472 CHECK_dict_new( DICT_COMMAND, &data , sip, &cmd);
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2473 PARSE_loc_rules( rules, cmd );
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2474 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2475 /* Location-Info-Answer (LIA) Command */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2476 {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2477 /*
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2478 The Location-Info-Answer (LIA) is indicated by the Command-Code set
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2479 to 285 and the Command Flags' 'R' bit cleared. The Diameter server
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2480 sends this command in response to a previously received Diameter
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2481 Location-Info-Request (LIR) command.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2482
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2483 In addition to the values already defined in RFC 3588 [RFC3588], the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2484 Result-Code AVP may contain one of the values defined in
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2485 Section 10.1. When the Diameter server finds an error in processing
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2486 the Diameter LIR message, the Diameter server MUST stop the process
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2487 of the message and answer with a Diameter LIA message that includes
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2488 the appropriate error code in the Result-Code AVP value. When there
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2489 is no error, the Diameter server MUST set the Result-Code AVP value
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2490 to DIAMETER_SUCCESS in the Diameter LIA message.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2491
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2492 One of the errors that the Diameter server may find is that the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2493 SIP-AOR AVP value is not a valid user in the realm. In such cases,
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2494 the Diameter server MUST set the Result-Code AVP value to
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2495 DIAMETER_ERROR_USER_UNKNOWN and return it in a Diameter LIA message.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2496
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2497 If the Diameter server cannot process the Diameter LIR command, e.g.,
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2498 due to a database error, the Diameter server MUST set the Result-Code
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2499 AVP value to DIAMETER_UNABLE_TO_COMPLY and return it in a Diameter
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2500 LIA message. The Diameter server MUST NOT include any SIP-Server-URI
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2501 or SIP-Server-Capabilities AVP in the Diameter LIA message.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2502
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2503 The Diameter server may or may not be aware of a SIP server assigned
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2504 to the SIP-AOR AVP value included in the Diameter LIR message. If
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2505 the Diameter server is aware of a SIP server allocated to that
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2506 particular user, the Diameter server MUST include the URI of such SIP
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2507 server in the SIP-Server-URI AVP and return it in a Diameter LIA
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2508 message. This is typically the situation when the user is either
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2509 registered, or unregistered but a SIP server is still assigned to the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2510 user.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2511
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2512 When the Diameter server is not aware of a SIP server allocated to
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2513 the user (typically the case when the user unregistered), the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2514 Result-Code AVP value in the Diameter LIA message depends on whether
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2515 the Diameter server is aware that the user has services defined for
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2516 unregistered users:
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2517
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2518 o Those users who have services defined for unregistered users may
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2519 require the allocation of a SIP server to trigger and perhaps
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2520 execute those services. Therefore, when the Diameter server is
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2521 not aware of an assigned SIP server, but the user has services
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2522 defined for unregistered users, the Diameter server MUST set the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2523 Result-Code AVP value to DIAMETER_UNREGISTERED_SERVICE and return
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2524 it in a Diameter LIA message. The Diameter server MAY also
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2525 include a SIP-Server-Capabilities AVP to facilitate the SIP server
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2526 (Diameter client) with the selection of an appropriate SIP server
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2527 with the required capabilities. Absence of the SIP-Server-
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2528 Capabilities AVP indicates to the SIP server (Diameter client)
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2529 that any SIP server is suitable to be allocated for the user.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2530
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2531 o Those users who do not have service defined for unregistered users
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2532 do not require further processing. The Diameter server MUST set
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2533 the Result-Code AVP value to
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2534 DIAMETER_ERROR_IDENTITY_NOT_REGISTERED and return it to the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2535 Diameter client in a Diameter LIA message. The SIP server
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2536 (Diameter client) may return the appropriate SIP response (e.g.,
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2537 480 (Temporarily unavailable)) to the original SIP request.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2538
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2539 The Message Format of the LIA command is as follows:
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2540
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2541 <LIA> ::= < Diameter Header: 285, PXY >
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2542 < Session-Id >
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2543 { Auth-Application-Id }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2544 { Result-Code }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2545 { Auth-Session-State }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2546 { Origin-Host }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2547 { Origin-Realm }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2548 [ SIP-Server-URI ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2549 [ SIP-Server-Capabilities ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2550 [ Auth-Grace-Period ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2551 [ Authorization-Lifetime ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2552 [ Redirect-Host ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2553 [ Redirect-Host-Usage ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2554 [ Redirect-Max-Cache-Time ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2555 * [ Proxy-Info ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2556 * [ Route-Record ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2557 * [ AVP ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2558 */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2559 struct dict_object * cmd;
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2560 struct dict_cmd_data data = {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2561 285, /* Code */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2562 "Location-Info-Answer", /* Name */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2563 CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2564 CMD_FLAG_PROXIABLE /* Fixed flag values */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2565 };
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2566 struct local_rules_definition rules[] =
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2567 { { "Session-Id", RULE_FIXED_HEAD, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2568 ,{ "Auth-Application-Id", RULE_REQUIRED, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2569 ,{ "Result-Code", RULE_REQUIRED, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2570 ,{ "Auth-Session-State", RULE_REQUIRED, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2571 ,{ "Origin-Host", RULE_REQUIRED, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2572 ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2573 ,{ "SIP-Server-URI", RULE_OPTIONAL, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2574 ,{ "SIP-Server-Capabilities", RULE_OPTIONAL, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2575 ,{ "Auth-Grace-Period", RULE_OPTIONAL, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2576 ,{ "Authorization-Lifetime", RULE_OPTIONAL, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2577 ,{ "Redirect-Host", RULE_OPTIONAL, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2578 ,{ "Redirect-Host-Usage", RULE_OPTIONAL, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2579 ,{ "Redirect-Max-Cache-Time", RULE_OPTIONAL, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2580 ,{ "Proxy-Info", RULE_OPTIONAL, -1, -1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2581 ,{ "Route-Record", RULE_OPTIONAL, -1, -1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2582
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2583 };
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2584
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2585 CHECK_dict_new( DICT_COMMAND, &data , sip, &cmd);
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2586 PARSE_loc_rules( rules, cmd );
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2587 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2588 /* Registration-Termination-Request (RTR) Command */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2589 {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2590 /*
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2591 The Registration-Termination-Request (RTR) command is indicated by
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2592 the Command-Code set to 287 and the Command Flags' 'R' bit set. The
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2593 Diameter server sends this command to the Diameter client in a SIP
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2594 server to indicate to the SIP server that one or more SIP AORs have
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2595 to be deregistered. The command allows an operator to
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2596 administratively cancel the registration of a user from a centralized
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2597 Diameter server.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2598
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2599 The Diameter server has the capability to initiate the deregistration
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2600 of a user and inform the SIP server by means of the Diameter RTR
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2601 command. The Diameter server can decide whether only one SIP AOR is
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2602 going to be deregistered, a list of SIP AORs, or all the SIP AORs
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2603 allocated to the user.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2604
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2605 The absence of a SIP-AOR AVP in the Diameter RTR message indicates
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2606 that all the SIP AORs allocated to the user identified by the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2607 User-Name AVP are being deregistered.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2608
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2609 The Diameter server MUST include a SIP-Deregistration-Reason AVP
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2610 value to indicate the reason for the deregistration.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2611
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2612 The Message Format of the RTR command is as follows:
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2613
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2614 <RTR> ::= < Diameter Header: 287, REQ, PXY >
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2615 < Session-Id >
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2616 { Auth-Application-Id }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2617 { Auth-Session-State }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2618 { Origin-Host }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2619 { Origin-Realm }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2620 { Destination-Host }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2621 { SIP-Deregistration-Reason }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2622 [ Destination-Realm ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2623 [ User-Name ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2624 * [ SIP-AOR ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2625 * [ Proxy-Info ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2626 * [ Route-Record ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2627 * [ AVP ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2628
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2629
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2630
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2631
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2632
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2633 */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2634 struct dict_object * cmd;
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2635 struct dict_cmd_data data = {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2636 287, /* Code */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2637 "Registration-Termination-Request", /* Name */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2638 CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2639 CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE /* Fixed flag values */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2640 };
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2641 struct local_rules_definition rules[] =
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2642 { { "Session-Id", RULE_FIXED_HEAD, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2643 ,{ "Auth-Application-Id", RULE_REQUIRED, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2644 ,{ "Auth-Session-State", RULE_REQUIRED, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2645 ,{ "Origin-Host", RULE_REQUIRED, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2646 ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2647 ,{ "Destination-Host", RULE_REQUIRED, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2648 ,{ "SIP-Deregistration-Reason",RULE_REQUIRED, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2649 ,{ "Destination-Realm", RULE_OPTIONAL, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2650 ,{ "User-Name", RULE_OPTIONAL, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2651 ,{ "SIP-AOR", RULE_REQUIRED, -1, -1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2652 ,{ "Proxy-Info", RULE_OPTIONAL, -1, -1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2653 ,{ "Route-Record", RULE_OPTIONAL, -1, -1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2654
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2655 };
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2656
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2657 CHECK_dict_new( DICT_COMMAND, &data , sip, &cmd);
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2658 PARSE_loc_rules( rules, cmd );
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2659 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2660 /* Registration-Termination-Answer (RTA) Command */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2661 {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2662 /*
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2663 The Registration-Termination-Answer (RTA) is indicated by the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2664 Command-Code set to 287 and the Command Flags' 'R' bit cleared. The
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2665 Diameter client sends this command in response to a previously
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2666 received Diameter Registration-Termination-Request (RTR) command.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2667
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2668 In addition to the values already defined in RFC 3588 [RFC3588], the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2669 Result-Code AVP may contain one of the values defined in
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2670 Section 10.1.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2671
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2672 If the SIP server (Diameter client) requires a User-Name AVP value to
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2673 process the Diameter RTR request, but the Diameter RTR message did
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2674 not contain a User-Name AVP value, the Diameter client MUST set the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2675 Result-Code AVP value to DIAMETER_USER_NAME_REQUIRED (see Section
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2676 10.1.2) and return it in a Diameter RTA message.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2677
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2678 The SIP server (Diameter client) applies the administrative
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2679 deregistration to each of the URIs included in each of the SIP-AOR
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2680 AVP values, or, if there is no SIP-AOR AVP present in the Diameter
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2681 RTR request, to all the URIs allocated to the User-Name AVP value.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2682
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2683 The value of the SIP-Deregistration-Reason AVP in the Diameter RTR
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2684 command has an effect on the actions performed at the SIP server
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2685 (Diameter client):
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2686
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2687 o If the value is set to PERMANENT_TERMINATION, then the user has
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2688 terminated his/her registration to the realm. If informing the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2689 interested parties (e.g., subscribers to the "reg" event
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2690 [RFC3680]) about the administrative deregistration is supported
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2691 through SIP procedures, the SIP server (Diameter client) will do
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2692 so. The Diameter Client in the SIP Server SHOULD NOT request a
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2693 new user registration. The SIP server clears the registration
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2694 state of the deregistered AORs.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2695
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2696 o If the value is set to NEW_SIP_SERVER_ASSIGNED, the Diameter
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2697 server informs the SIP server (Diameter client) that a new SIP
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2698 server has been allocated to the user, due to some reason. The
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2699 SIP server, if supported through SIP procedures, will inform the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2700 interested parties (e.g., subscribers to the "reg" event
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2701 [RFC3680]) about the administrative deregistration at this SIP
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2702 server. The Diameter client in the SIP server SHOULD NOT request
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2703 a new user registration. The SIP server clears the registration
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2704 state of the deregistered SIP AORs.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2705
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2706 o If the value is set to SIP_SERVER_CHANGE, the Diameter server
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2707 informs the SIP server (Diameter client) that a new SIP server has
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2708 to be allocated to the user, e.g., due to user's capabilities
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2709 requiring a new SIP server, or not enough resources in the current
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2710 SIP server. If informing the interested parties about the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2711 administrative deregistration is supported through SIP procedures
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2712 (e.g., subscriptions to the "reg" event [RFC3680]), the SIP server
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2713 will do so. The Diameter client in the SIP Server SHOULD NOT
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2714 request a new user registration. The SIP server clears the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2715 registration state of the deregistered SIP AORs.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2716
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2717 o If the value is set to REMOVE_SIP_SERVER, the Diameter server
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2718 informs the SIP server (Diameter client) that the SIP server will
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2719 no longer be bound in the Diameter server with that user. The SIP
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2720 server can delete all data related to the user.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2721
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2722 The Message Format of the RTA command is as follows:
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2723
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2724 <RTA> ::= < Diameter Header: 287, PXY >
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2725 < Session-Id >
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2726 { Auth-Application-Id }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2727 { Result-Code }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2728 { Auth-Session-State }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2729 { Origin-Host }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2730 { Origin-Realm }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2731 [ Authorization-Lifetime ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2732 [ Auth-Grace-Period ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2733 [ Redirect-Host ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2734 [ Redirect-Host-Usage ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2735 [ Redirect-Max-Cache-Time ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2736 * [ Proxy-Info ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2737 * [ Route-Record ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2738 * [ AVP ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2739
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2740 */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2741 struct dict_object * cmd;
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2742 struct dict_cmd_data data = {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2743 287, /* Code */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2744 "Registration-Termination-Answer", /* Name */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2745 CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2746 CMD_FLAG_PROXIABLE /* Fixed flag values */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2747 };
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2748 struct local_rules_definition rules[] =
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2749 { { "Session-Id", RULE_FIXED_HEAD, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2750 ,{ "Auth-Application-Id", RULE_REQUIRED, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2751 ,{ "Result-Code", RULE_REQUIRED, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2752 ,{ "Auth-Session-State", RULE_REQUIRED, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2753 ,{ "Origin-Host", RULE_REQUIRED, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2754 ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2755 ,{ "Authorization-Lifetime", RULE_OPTIONAL, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2756 ,{ "Auth-Grace-Period", RULE_OPTIONAL, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2757 ,{ "Redirect-Host", RULE_OPTIONAL, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2758 ,{ "Redirect-Host-Usage", RULE_OPTIONAL, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2759 ,{ "Redirect-Max-Cache-Time", RULE_OPTIONAL, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2760 ,{ "Proxy-Info", RULE_OPTIONAL, -1, -1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2761 ,{ "Route-Record", RULE_OPTIONAL, -1, -1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2762
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2763 };
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2764
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2765 CHECK_dict_new( DICT_COMMAND, &data , sip, &cmd);
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2766 PARSE_loc_rules( rules, cmd );
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2767 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2768
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2769 /* Push-Profile-Request (PPR) Command */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2770 {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2771 /*
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2772 The Push-Profile-Request (PPR) command is indicated by the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2773 Command-Code set to 288 and the Command Flags' 'R' bit set. The
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2774 Diameter server sends this command to the Diameter client in a SIP
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2775 server to update either the user profile of an already registered
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2776 user in that SIP server or the SIP accounting information. This
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2777 allows an operator to modify the data of a user profile or the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2778 accounting information and push it to the SIP server where the user
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2779 is registered.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2780
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2781 Each user has a user profile associated with him/her and other
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2782 accounting information. The profile or the accounting information
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2783 may change with time, e.g., due to addition of new services to the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2784 user. When the user profile or the accounting information changes,
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2785 the Diameter server sends a Diameter Push-Profile-Request (PPR)
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2786 command to the Diameter client in a SIP server, in order to start
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2787 applying those new services.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2788
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2789 A PPR command MAY contain a SIP-Accounting-Information AVP that
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2790 updates the addresses of the accounting servers. Changes in the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2791 addresses of the accounting servers take effect immediately. The
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2792 Diameter client SHOULD close any existing accounting session with the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2793 existing server and start providing accounting information to the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2794 newly acquired accounting server.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2795
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2796 A PPR command MAY contain zero or more SIP-User-Data AVP values
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2797 containing the new user profile. On selecting the type of user data,
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2798 the Diameter server SHOULD take into account the supported formats at
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2799 the SIP server (SIP-Supported-User-Data-Type AVP sent in a previous
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2800 SAR message) and the local policy.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2801
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2802 The User-Name AVP indicates the user to whom the profile is
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2803 applicable.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2804
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2805 The Message Format of the PPR command is as follows:
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2806
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2807 <PPR> ::= < Diameter Header: 288, REQ, PXY >
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2808 < Session-Id >
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2809 { Auth-Application-Id }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2810 { Auth-Session-State }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2811 { Origin-Host }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2812 { Origin-Realm }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2813 { Destination-Realm }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2814 { User-Name }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2815 * [ SIP-User-Data ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2816 [ SIP-Accounting-Information ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2817 [ Destination-Host ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2818 [ Authorization-Lifetime ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2819 [ Auth-Grace-Period ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2820 * [ Proxy-Info ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2821 * [ Route-Record ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2822 * [ AVP ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2823
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2824 */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2825 struct dict_object * cmd;
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2826 struct dict_cmd_data data = {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2827 288, /* Code */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2828 "Push-Profile-Request", /* Name */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2829 CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2830 CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE /* Fixed flag values */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2831 };
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2832 struct local_rules_definition rules[] =
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2833 { { "Session-Id", RULE_FIXED_HEAD, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2834 ,{ "Auth-Application-Id", RULE_REQUIRED, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2835 ,{ "Auth-Session-State", RULE_REQUIRED, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2836 ,{ "Origin-Host", RULE_REQUIRED, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2837 ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2838 ,{ "Destination-Realm", RULE_REQUIRED, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2839 ,{ "User-Name", RULE_REQUIRED, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2840 ,{ "SIP-User-Data", RULE_OPTIONAL, -1, -1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2841 ,{ "SIP-Accounting-Information", RULE_OPTIONAL, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2842 ,{ "Destination-Host", RULE_OPTIONAL, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2843 ,{ "Authorization-Lifetime", RULE_OPTIONAL, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2844 ,{ "Auth-Grace-Period", RULE_OPTIONAL, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2845 ,{ "Proxy-Info", RULE_OPTIONAL, -1, -1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2846 ,{ "Route-Record", RULE_OPTIONAL, -1, -1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2847
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2848 };
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2849
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2850 CHECK_dict_new( DICT_COMMAND, &data , sip, &cmd);
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2851 PARSE_loc_rules( rules, cmd );
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2852 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2853 /* Push-Profile-Answer (PPA) Command */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2854 {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2855 /*
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2856
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2857
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2858 The Push-Profile-Answer (PPA) is indicated by the Command-Code set to
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2859 288 and the Command Flags' 'R' bit cleared. The Diameter client
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2860 sends this command in response to a previously received Diameter
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2861 Push-Profile-Request (PPR) command.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2862
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2863 In addition to the values already defined in RFC 3588 [RFC3588], the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2864 Result-Code AVP may contain one of the values defined in
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2865 Section 10.1.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2866
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2867 If there is no error when processing the received Diameter PPR
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2868 message, the SIP server (Diameter client) MUST download the received
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2869 user profile from the SIP-User-Data AVP values in the Diameter PPR
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2870 message and store it associated with the user specified in the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2871 User-Name AVP value.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2872
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2873 If the SIP server does not recognize or does not support some of the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2874 data transferred in the SIP-User-Data AVP values, the Diameter client
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2875 in the SIP server MUST return a Diameter PPA message that includes a
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2876 Result-Code AVP set to the value DIAMETER_ERROR_NOT_SUPPORTED_USER_DATA.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2877
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2878 If the SIP server (Diameter client) receives a Diameter PPR message
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2879 with a User-Name AVP that is unknown, the Diameter client MUST set
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2880 the Result-Code AVP value to DIAMETER_ERROR_USER_UNKNOWN and MUST
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2881 return it to the Diameter server in a Diameter PPA message.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2882
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2883 If the SIP server (Diameter client) receives in the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2884 SIP-User-Data-Content AVP value (of the grouped SIP-User-Data AVP)
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2885 more data than it can accept, it MUST set the Result-Code AVP value
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2886 to DIAMETER_ERROR_TOO_MUCH_DATA and MUST return it to the Diameter
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2887 server in a Diameter PPA message. The SIP server MUST NOT override
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2888 the existing user profile with the one received in the PPR message.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2889
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2890 If the Diameter server receives the Result-Code AVP value set to
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2891 DIAMETER_ERROR_TOO_MUCH_DATA in a Diameter PPA message, it SHOULD
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2892 force a new re-registration of the user by sending to the Diameter
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2893 client a Diameter Registration-Termination-Request (RTR) with the
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2894 SIP-Deregistration-Reason AVP value set to SIP_SERVER_CHANGE. This
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2895 will force a re-registration of the user and will trigger a selection
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2896 of a new SIP server.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2897
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2898 If the Diameter client is not able to honor the command, for any
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2899 other reason, it MUST set the Result-Code AVP value to
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2900 DIAMETER_UNABLE_TO_COMPLY and it MUST return it in a Diameter PPA
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2901 message.
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2902
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2903 The Message Format of the PPA command is as follows:
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2904
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2905 <PPA> ::= < Diameter Header: 288, PXY >
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2906 < Session-Id >
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2907 { Auth-Application-Id }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2908 { Result-Code }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2909 { Auth-Session-State }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2910 { Origin-Host }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2911 { Origin-Realm }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2912 [ Redirect-Host ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2913 [ Redirect-Host-Usage ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2914 [ Redirect-Max-Cache-Time ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2915 * [ Proxy-Info ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2916 * [ Route-Record ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2917 * [ AVP ]
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2918
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2919
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2920
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2921 */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2922 struct dict_object * cmd;
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2923 struct dict_cmd_data data = {
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2924 288, /* Code */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2925 "Push-Profile-Answer", /* Name */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2926 CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2927 CMD_FLAG_PROXIABLE /* Fixed flag values */
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2928 };
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2929 struct local_rules_definition rules[] =
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2930 { { "Session-Id", RULE_FIXED_HEAD, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2931 ,{ "Auth-Application-Id", RULE_REQUIRED, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2932 ,{ "Result-Code", RULE_REQUIRED, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2933 ,{ "Auth-Session-State", RULE_REQUIRED, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2934 ,{ "Origin-Host", RULE_REQUIRED, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2935 ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2936 ,{ "Redirect-Host", RULE_OPTIONAL, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2937 ,{ "Redirect-Host-Usage", RULE_OPTIONAL, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2938 ,{ "Redirect-Max-Cache-Time", RULE_OPTIONAL, -1, 1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2939 ,{ "Proxy-Info", RULE_OPTIONAL, -1, -1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2940 ,{ "Route-Record", RULE_OPTIONAL, -1, -1 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2941
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2942 };
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2943
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2944 CHECK_dict_new( DICT_COMMAND, &data , sip, &cmd);
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2945 PARSE_loc_rules( rules, cmd );
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2946 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2947 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2948
1120
c473581adff2 Cleanup some traces
Sebastien Decugis <sdecugis@freediameter.net>
parents: 614
diff changeset
2949 LOG_D( "Extension 'Dictionary definitions for SIP' initialized");
331
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2950 return 0;
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2951 }
ac6e9cc9c3ba Added dict_sip contributed by Alexandre
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2952 EXTENSION_ENTRY("dict_sip", ds_dict_init);
"Welcome to our mercurial repository"