Changeset 6044 for pjproject/trunk/pjsip-apps/src/pjsua/pjsua_app.c
- Timestamp:
- Jul 26, 2019 5:40:42 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip-apps/src/pjsua/pjsua_app.c
r6035 r6044 1255 1255 { 1256 1256 pjsua_transport_id transport_id = -1; 1257 pjsua_transport_id udp6_tp_id = -1, tcp6_tp_id = -1, tls6_tp_id = -1;1258 1257 pjsua_transport_config tcp_cfg; 1259 1258 unsigned i; … … 1284 1283 return status; 1285 1284 } 1286 1287 if (app_config.ipv6)1288 app_config.cfg.stun_try_ipv6 = PJ_TRUE;1289 1285 1290 1286 /* Initialize application callbacks */ … … 1613 1609 if (status != PJ_SUCCESS) 1614 1610 goto on_error; 1615 udp6_tp_id = transport_id;1616 1611 1617 1612 /* Add local account */ … … 1679 1674 if (status != PJ_SUCCESS) 1680 1675 goto on_error; 1681 tcp6_tp_id = transport_id;1682 1676 1683 1677 /* Add local account */ … … 1719 1713 if (status != PJ_SUCCESS) 1720 1714 goto on_error; 1721 tls6_tp_id = transport_id;1722 1715 1723 1716 /* Add local account */ … … 1782 1775 app_config.acc_cfg[i].reg_retry_interval = 300; 1783 1776 app_config.acc_cfg[i].reg_first_retry_interval = 60; 1784 if (app_config.ipv6) {1785 pj_str_t *dst_uri = NULL;1786 pj_str_t tmp;1787 pjsip_uri *uri;1788 1789 // Uncomment this for testing in a NAT64 network1790 // app_config.acc_cfg[i].nat64_opt = PJSUA_NAT64_ENABLED;1791 app_config.acc_cfg[i].ipv6_media_use = PJSUA_IPV6_ENABLED;1792 1793 if ((app_config.cfg.outbound_proxy_cnt > 0) &&1794 (app_config.acc_cfg[i].reg_use_proxy == 1 /* outbound */ ||1795 app_config.acc_cfg[i].reg_use_proxy == 3 /* all */))1796 {1797 dst_uri = &app_config.cfg.outbound_proxy[0];1798 } else if ((app_config.acc_cfg[i].proxy_cnt > 0) &&1799 (app_config.acc_cfg[i].reg_use_proxy == 2 /* acc */ ||1800 app_config.acc_cfg[i].reg_use_proxy == 3 /* all */))1801 {1802 dst_uri = &app_config.acc_cfg[i].proxy[0];1803 } else if (app_config.acc_cfg[i].reg_uri.slen > 0) {1804 dst_uri = &app_config.acc_cfg[i].reg_uri;1805 }1806 1807 pj_strdup_with_null(app_config.pool, &tmp, dst_uri);1808 1809 uri = pjsip_parse_uri(app_config.pool, tmp.ptr, tmp.slen, 0);1810 if (uri != NULL) {1811 pjsip_sip_uri *sip_uri;1812 pjsip_transport_type_e tp_type = PJSIP_TRANSPORT_UNSPECIFIED;1813 1814 sip_uri = (pjsip_sip_uri*)pjsip_uri_get_uri(uri);1815 1816 /* Get transport type of the URI */1817 if (PJSIP_URI_SCHEME_IS_SIPS(sip_uri)) {1818 tp_type = PJSIP_TRANSPORT_TLS;1819 } else if (sip_uri->transport_param.slen == 0) {1820 tp_type = PJSIP_TRANSPORT_UDP;1821 } else {1822 tp_type = pjsip_transport_get_type_from_name(1823 &sip_uri->transport_param);1824 tp_type &= ~ PJSIP_TRANSPORT_IPV6;1825 }1826 1827 if (tp_type == PJSIP_TRANSPORT_UDP) {1828 app_config.acc_cfg[i].transport_id = udp6_tp_id;1829 } else if (tp_type == PJSIP_TRANSPORT_TCP) {1830 app_config.acc_cfg[i].transport_id = tcp6_tp_id;1831 } else if (tp_type == PJSIP_TRANSPORT_TLS) {1832 app_config.acc_cfg[i].transport_id = tls6_tp_id;1833 }1834 }1835 }1836 1777 1837 1778 app_config_init_video(&app_config.acc_cfg[i]);
Note: See TracChangeset
for help on using the changeset viewer.