]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
not sure how this flag was removed but its required in auto nat mode
authorBrian West <brian@freeswitch.org>
Wed, 3 Jun 2009 22:16:43 +0000 (22:16 +0000)
committerBrian West <brian@freeswitch.org>
Wed, 3 Jun 2009 22:16:43 +0000 (22:16 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@13598 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_sofia/sofia_glue.c

index c305a2efd541148deb98f71ff54f1633b994dd06..e2d5e29976b2026eb65cd4df8a1ce7939a3825ba 100644 (file)
@@ -644,13 +644,14 @@ switch_status_t sofia_glue_tech_choose_port(private_object_t *tech_pvt, int forc
 
 
        tech_pvt->local_sdp_audio_ip = ip;
+
        if (!(tech_pvt->local_sdp_audio_port = switch_rtp_request_port(tech_pvt->profile->rtpip))) {
                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "No RTP ports available!\n");
                return SWITCH_STATUS_FALSE;
        }
        sdp_port = tech_pvt->local_sdp_audio_port;
 
-       if (!(use_ip = switch_channel_get_variable(tech_pvt->channel, "rtp_adv_audio_ip"))) {
+       if (!(use_ip = switch_channel_get_variable(tech_pvt->channel, "rtp_adv_audio_ip")) && !sofia_test_pflag(tech_pvt->profile, PFLAG_AUTO_NAT)) {
                if (tech_pvt->profile->extrtpip) {
                        use_ip = tech_pvt->profile->extrtpip;
                }
@@ -705,8 +706,8 @@ switch_status_t sofia_glue_tech_choose_video_port(private_object_t *tech_pvt, in
 
 
        if (tech_pvt->profile->extrtpip) {
-               if (sofia_glue_ext_address_lookup(tech_pvt->profile, tech_pvt, &ip, &sdp_port, tech_pvt->profile->extrtpip, switch_core_session_get_pool(tech_pvt->session)) !=
-                       SWITCH_STATUS_SUCCESS) {
+               if (sofia_glue_ext_address_lookup(tech_pvt->profile, tech_pvt, &ip, &sdp_port, tech_pvt->profile->extrtpip,
+                                                                                 switch_core_session_get_pool(tech_pvt->session)) != SWITCH_STATUS_SUCCESS) {
                        return SWITCH_STATUS_FALSE;
                }
        }