Changeset 5995 for pjproject/trunk/pjsip-apps/src/pjsua/pjsua_app.c
- Timestamp:
- May 17, 2019 9:37:18 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip-apps/src/pjsua/pjsua_app.c
r5994 r5995 1231 1231 { 1232 1232 pjsua_transport_id transport_id = -1; 1233 pjsua_transport_id udp6_tp_id = -1, tcp6_tp_id = -1, tls6_tp_id = -1; 1233 1234 pjsua_transport_config tcp_cfg; 1234 1235 unsigned i; … … 1259 1260 return status; 1260 1261 } 1262 1263 if (app_config.ipv6) 1264 app_config.cfg.stun_try_ipv6 = PJ_TRUE; 1261 1265 1262 1266 /* Initialize application callbacks */ … … 1585 1589 if (status != PJ_SUCCESS) 1586 1590 goto on_error; 1591 udp6_tp_id = transport_id; 1587 1592 1588 1593 /* Add local account */ … … 1650 1655 if (status != PJ_SUCCESS) 1651 1656 goto on_error; 1657 tcp6_tp_id = transport_id; 1652 1658 1653 1659 /* Add local account */ … … 1689 1695 if (status != PJ_SUCCESS) 1690 1696 goto on_error; 1697 tls6_tp_id = transport_id; 1691 1698 1692 1699 /* Add local account */ … … 1751 1758 app_config.acc_cfg[i].reg_retry_interval = 300; 1752 1759 app_config.acc_cfg[i].reg_first_retry_interval = 60; 1760 if (app_config.ipv6) { 1761 pj_str_t *dst_uri = NULL; 1762 pj_str_t tmp; 1763 pjsip_uri *uri; 1764 1765 // Uncomment this for testing in a NAT64 network 1766 // app_config.acc_cfg[i].nat64_opt = PJSUA_NAT64_ENABLED; 1767 app_config.acc_cfg[i].ipv6_media_use = PJSUA_IPV6_ENABLED; 1768 1769 if ((app_config.cfg.outbound_proxy_cnt > 0) && 1770 (app_config.acc_cfg[i].reg_use_proxy == 1 /* outbound */ || 1771 app_config.acc_cfg[i].reg_use_proxy == 3 /* all */)) 1772 { 1773 dst_uri = &app_config.cfg.outbound_proxy[0]; 1774 } else if ((app_config.acc_cfg[i].proxy_cnt > 0) && 1775 (app_config.acc_cfg[i].reg_use_proxy == 2 /* acc */ || 1776 app_config.acc_cfg[i].reg_use_proxy == 3 /* all */)) 1777 { 1778 dst_uri = &app_config.acc_cfg[i].proxy[0]; 1779 } else if (app_config.acc_cfg[i].reg_uri.slen > 0) { 1780 dst_uri = &app_config.acc_cfg[i].reg_uri; 1781 } 1782 1783 pj_strdup_with_null(app_config.pool, &tmp, dst_uri); 1784 1785 uri = pjsip_parse_uri(app_config.pool, tmp.ptr, tmp.slen, 0); 1786 if (uri != NULL) { 1787 pjsip_sip_uri *sip_uri; 1788 pjsip_transport_type_e tp_type = PJSIP_TRANSPORT_UNSPECIFIED; 1789 1790 sip_uri = (pjsip_sip_uri*)pjsip_uri_get_uri(uri); 1791 1792 /* Get transport type of the URI */ 1793 if (PJSIP_URI_SCHEME_IS_SIPS(sip_uri)) { 1794 tp_type = PJSIP_TRANSPORT_TLS; 1795 } else if (sip_uri->transport_param.slen == 0) { 1796 tp_type = PJSIP_TRANSPORT_UDP; 1797 } else { 1798 tp_type = pjsip_transport_get_type_from_name( 1799 &sip_uri->transport_param); 1800 tp_type &= ~ PJSIP_TRANSPORT_IPV6; 1801 } 1802 1803 if (tp_type == PJSIP_TRANSPORT_UDP) { 1804 app_config.acc_cfg[i].transport_id = udp6_tp_id; 1805 } else if (tp_type == PJSIP_TRANSPORT_TCP) { 1806 app_config.acc_cfg[i].transport_id = tcp6_tp_id; 1807 } else if (tp_type == PJSIP_TRANSPORT_TLS) { 1808 app_config.acc_cfg[i].transport_id = tls6_tp_id; 1809 } 1810 } 1811 } 1753 1812 1754 1813 app_config_init_video(&app_config.acc_cfg[i]);
Note: See TracChangeset
for help on using the changeset viewer.