Changeset 1501 for pjproject/trunk/pjsip/src/pjsua-lib/pjsua_media.c
- Timestamp:
- Oct 16, 2007 1:34:14 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_media.c
r1482 r1501 195 195 PJ_ASSERT_RETURN(status == PJ_SUCCESS, status); 196 196 197 /* Perform NAT detection */ 198 pjsua_detect_nat_type(); 199 197 200 return PJ_SUCCESS; 198 201 } … … 759 762 if (status != PJ_SUCCESS) 760 763 goto on_error; 764 765 /* Add NAT info in the SDP */ 766 if (pjsua_var.ua_cfg.nat_type_in_sdp) { 767 pjmedia_sdp_attr *a; 768 pj_str_t value; 769 char nat_info[80]; 770 771 value.ptr = nat_info; 772 if (pjsua_var.ua_cfg.nat_type_in_sdp == 1) { 773 value.slen = pj_ansi_snprintf(nat_info, sizeof(nat_info), 774 "%d", pjsua_var.nat_type); 775 } else { 776 const char *type_name = pj_stun_get_nat_name(pjsua_var.nat_type); 777 value.slen = pj_ansi_snprintf(nat_info, sizeof(nat_info), 778 "%d %s", 779 pjsua_var.nat_type, 780 type_name); 781 } 782 783 a = pjmedia_sdp_attr_create(pool, "X-nat", &value); 784 785 pjmedia_sdp_attr_add(&sdp->attr_count, sdp->attr, a); 786 787 } 761 788 762 789 if (pjsua_var.media_cfg.enable_ice) {
Note: See TracChangeset
for help on using the changeset viewer.