Changeset 3222
- Timestamp:
- Jun 24, 2010 12:33:18 PM (14 years ago)
- Location:
- pjproject/trunk/pjsip
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/include/pjsip-ua/sip_inv.h
r2869 r3222 296 296 PJSIP_INV_SUPPORT_UPDATE = 4, 297 297 298 /** 299 * Indicate support for ICE 300 */ 301 PJSIP_INV_SUPPORT_ICE = 8, 302 303 /** 304 * Require ICE support. 305 */ 306 PJSIP_INV_REQUIRE_ICE = 16, 307 298 308 /** 299 309 * Require reliable provisional response extension. … … 310 320 * support/want session timer. 311 321 */ 312 PJSIP_INV_ALWAYS_USE_TIMER = 128 ,322 PJSIP_INV_ALWAYS_USE_TIMER = 128 313 323 314 324 }; -
pjproject/trunk/pjsip/include/pjsua-lib/pjsua.h
r3216 r3222 305 305 306 306 #endif 307 308 /** 309 * Controls whether PJSUA-LIB should add ICE media feature tag 310 * parameter (the ";+sip.ice" parameter) to Contact header if ICE 311 * is enabled in the config. 312 * 313 * Default: 1 314 */ 315 #ifndef PJSUA_ADD_ICE_TAGS 316 # define PJSUA_ADD_ICE_TAGS 1 317 #endif 318 307 319 308 320 /** -
pjproject/trunk/pjsip/src/pjsip-ua/sip_inv.c
r3217 r3222 778 778 if (*options & PJSIP_INV_REQUIRE_TIMER) 779 779 *options |= PJSIP_INV_SUPPORT_TIMER; 780 if (*options & PJSIP_INV_REQUIRE_ICE) 781 *options |= PJSIP_INV_SUPPORT_ICE; 780 782 781 783 /* Get the message in rdata */ … … 949 951 const pj_str_t STR_100REL = { "100rel", 6}; 950 952 const pj_str_t STR_TIMER = { "timer", 5}; 953 const pj_str_t STR_ICE = { "ice", 3 }; 951 954 952 955 for (i=0; i<sup_hdr->count; ++i) { 953 956 if (pj_stricmp(&sup_hdr->values[i], &STR_100REL)==0) 954 957 rem_option |= PJSIP_INV_SUPPORT_100REL; 955 if (pj_stricmp(&sup_hdr->values[i], &STR_TIMER)==0)958 else if (pj_stricmp(&sup_hdr->values[i], &STR_TIMER)==0) 956 959 rem_option |= PJSIP_INV_SUPPORT_TIMER; 960 else if (pj_stricmp(&sup_hdr->values[i], &STR_ICE)==0) 961 rem_option |= PJSIP_INV_SUPPORT_ICE; 957 962 } 958 963 } … … 966 971 const pj_str_t STR_REPLACES = { "replaces", 8 }; 967 972 const pj_str_t STR_TIMER = { "timer", 5 }; 973 const pj_str_t STR_ICE = { "ice", 3 }; 968 974 unsigned unsupp_cnt = 0; 969 975 pj_str_t unsupp_tags[PJSIP_GENERIC_ARRAY_MAX_COUNT]; … … 987 993 if (!supp) 988 994 unsupp_tags[unsupp_cnt++] = req_hdr->values[i]; 995 } else if ((*options & PJSIP_INV_SUPPORT_ICE) && 996 pj_stricmp(&req_hdr->values[i], &STR_ICE)==0) 997 { 998 rem_option |= PJSIP_INV_REQUIRE_ICE; 989 999 990 1000 } else if (!pjsip_endpt_has_capability(endpt, PJSIP_H_SUPPORTED, -
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_acc.c
r3216 r3222 237 237 acc->cred[acc->cred_cnt++] = pjsua_var.ua_cfg.cred_info[i]; 238 238 } 239 240 /* If ICE is enabled, add "+sip.ice" media feature tag in account's 241 * contact params. 242 */ 243 #if PJSUA_ADD_ICE_TAGS 244 if (pjsua_var.media_cfg.enable_ice) { 245 unsigned new_len; 246 pj_str_t new_prm; 247 248 new_len = acc_cfg->contact_params.slen + 10; 249 new_prm.ptr = (char*)pj_pool_alloc(acc->pool, new_len); 250 pj_strcpy(&new_prm, &acc_cfg->contact_params); 251 pj_strcat2(&new_prm, ";+sip.ice"); 252 acc_cfg->contact_params = new_prm; 253 } 254 #endif 239 255 240 256 status = pjsua_pres_init_acc(acc_id); -
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c
r3219 r3222 841 841 if (pjsua_var.acc[acc_id].cfg.require_timer) 842 842 options |= PJSIP_INV_REQUIRE_TIMER; 843 if (pjsua_var.media_cfg.enable_ice) 844 options |= PJSIP_INV_SUPPORT_ICE; 843 845 844 846 status = pjsip_inv_verify_request2(rdata, &options, offer, answer, NULL,
Note: See TracChangeset
for help on using the changeset viewer.