- Timestamp:
- Dec 24, 2015 12:25:58 PM (9 years ago)
- Location:
- pjproject/trunk/pjsip
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/include/pjsua-lib/pjsua_internal.h
r5128 r5217 609 609 /* acc use stun? */ 610 610 pj_bool_t pjsua_sip_acc_is_using_stun(pjsua_acc_id acc_id); 611 pj_bool_t pjsua_media_acc_is_using_stun(pjsua_acc_id acc_id); 611 612 612 613 /* Get local transport address suitable to be used for Via or Contact address -
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_acc.c
r5188 r5217 2481 2481 2482 2482 return acc->cfg.sip_stun_use != PJSUA_STUN_USE_DISABLED && 2483 pjsua_var.ua_cfg.stun_srv_cnt != 0; 2483 pjsua_var.ua_cfg.stun_srv_cnt != 0; 2484 } 2485 2486 pj_bool_t pjsua_media_acc_is_using_stun(pjsua_acc_id acc_id) 2487 { 2488 pjsua_acc *acc = &pjsua_var.acc[acc_id]; 2489 2490 return acc->cfg.media_stun_use != PJSUA_STUN_USE_DISABLED && 2491 pjsua_var.ua_cfg.stun_srv_cnt != 0; 2484 2492 } 2485 2493 -
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_media.c
r5205 r5217 254 254 255 255 /* Make sure STUN server resolution has completed */ 256 if (!use_ipv6 && pjsua_ sip_acc_is_using_stun(call_med->call->acc_id)) {256 if (!use_ipv6 && pjsua_media_acc_is_using_stun(call_med->call->acc_id)) { 257 257 status = resolve_stun_server(PJ_TRUE); 258 258 if (status != PJ_SUCCESS) { … … 351 351 * and make sure that the mapped RTCP port is adjacent with the RTP. 352 352 */ 353 if (!use_ipv6 && pjsua_sip_acc_is_using_stun(call_med->call->acc_id) && 353 if (!use_ipv6 && 354 pjsua_media_acc_is_using_stun(call_med->call->acc_id) && 354 355 pjsua_var.stun_srv.addr.sa_family != 0) 355 356 { … … 748 749 749 750 /* Make sure STUN server resolution has completed */ 750 status = resolve_stun_server(PJ_TRUE); 751 if (status != PJ_SUCCESS) { 752 pjsua_perror(THIS_FILE, "Error resolving STUN server", status); 753 return status; 751 if (pjsua_media_acc_is_using_stun(call_med->call->acc_id)) { 752 status = resolve_stun_server(PJ_TRUE); 753 if (status != PJ_SUCCESS) { 754 pjsua_perror(THIS_FILE, "Error resolving STUN server", status); 755 return status; 756 } 754 757 } 755 758 … … 766 769 767 770 /* Configure STUN settings */ 768 if (pj_sockaddr_has_addr(&pjsua_var.stun_srv)) { 771 if (pj_sockaddr_has_addr(&pjsua_var.stun_srv) && 772 pjsua_media_acc_is_using_stun(call_med->call->acc_id)) 773 { 769 774 pj_sockaddr_print(&pjsua_var.stun_srv, stunip, sizeof(stunip), 0); 770 775 ice_cfg.stun.server = pj_str(stunip);
Note: See TracChangeset
for help on using the changeset viewer.