- Timestamp:
- Jun 26, 2007 8:23:18 AM (17 years ago)
- Location:
- pjproject/trunk/pjsip
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/include/pjsip/sip_config.h
r1389 r1390 159 159 160 160 /** 161 * Send Allow header in dialog establishing requests? 162 * RFC 3261 Allow header SHOULD be included in dialog establishing 163 * requests to inform remote agent about which SIP requests are 164 * allowed within dialog. 165 * 166 * Note that there is also an undocumented variable defined in sip_dialog.c 167 * to control whether Allow header should be included. The default value 168 * of this variable is PJSIP_INCLUDE_ALLOW_HDR_IN_DLG. 169 * To change PJSIP behavior during run-time, application can use the 170 * following construct: 171 * 172 \verbatim 173 extern pj_bool_t pjsip_include_allow_hdr_in_dlg; 174 175 // do not transmit Allow header 176 pjsip_include_allow_hdr_in_dlg = PJ_FALSE; 177 \endverbatim 178 * 179 * Default is 1 (Yes) 180 */ 181 #ifndef PJSIP_INCLUDE_ALLOW_HDR_IN_DLG 182 # define PJSIP_INCLUDE_ALLOW_HDR_IN_DLG 1 183 #endif 184 185 186 /** 161 187 * Allow SIP modules removal or insertions during operation? 162 188 * If yes, then locking will be employed when endpoint need to -
pjproject/trunk/pjsip/src/pjsip-ua/sip_inv.c
r1379 r1390 114 114 }; 115 115 116 /* Config */ 117 extern pj_bool_t pjsip_include_allow_hdr_in_dlg; 116 118 117 119 /* … … 1154 1156 1155 1157 /* Add Allow header. */ 1156 hdr = pjsip_endpt_get_capability(inv->dlg->endpt, PJSIP_H_ALLOW, NULL); 1157 if (hdr) { 1158 pjsip_msg_add_hdr(tdata->msg, (pjsip_hdr*) 1159 pjsip_hdr_shallow_clone(tdata->pool, hdr)); 1158 if (pjsip_include_allow_hdr_in_dlg) { 1159 hdr = pjsip_endpt_get_capability(inv->dlg->endpt, PJSIP_H_ALLOW, NULL); 1160 if (hdr) { 1161 pjsip_msg_add_hdr(tdata->msg, (pjsip_hdr*) 1162 pjsip_hdr_shallow_clone(tdata->pool, hdr)); 1163 } 1160 1164 } 1161 1165 -
pjproject/trunk/pjsip/src/pjsip/sip_dialog.c
r1340 r1390 40 40 long pjsip_dlg_lock_tls_id; 41 41 42 /* Config */ 43 pj_bool_t pjsip_include_allow_hdr_in_dlg = PJSIP_INCLUDE_ALLOW_HDR_IN_DLG; 44 45 42 46 PJ_DEF(pj_bool_t) pjsip_method_creates_dialog(const pjsip_method *m) 43 47 { … … 1197 1201 1198 1202 /* Add Allow header in 2xx and 405 response. */ 1199 if ((st_class==2 || st_code==405) && 1203 if (((st_class==2 && pjsip_include_allow_hdr_in_dlg) 1204 || st_code==405) && 1200 1205 pjsip_msg_find_hdr(tdata->msg, PJSIP_H_ALLOW, NULL)==NULL) 1201 1206 {
Note: See TracChangeset
for help on using the changeset viewer.