]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
enable nat mode for verto when ext-rtp-ip is set
authorAnthony Minessale <anthm@freeswitch.org>
Fri, 23 Jan 2015 20:53:00 +0000 (20:53 +0000)
committerroot <root@freeswitch-instance-agent-01.c.nifty-rex-736.internal>
Fri, 23 Jan 2015 20:53:00 +0000 (20:53 +0000)
src/mod/endpoints/mod_verto/mod_verto.c
src/switch_core_media.c

index 58b66a9b6146942a6050db2f4a5a8cfd6f52e14c..9c5272bad9ae5d9befd1b7ddf6e648681ae406e0 100644 (file)
@@ -2203,7 +2203,7 @@ static void verto_set_media_options(verto_pvt_t *tech_pvt, verto_profile_t *prof
                profile->rtpip_cur = 0;
        }
 
-       tech_pvt->mparams->extrtpip = profile->extrtpip;
+       tech_pvt->mparams->extrtpip = tech_pvt->mparams->extsipip = profile->extrtpip;
 
        //tech_pvt->mparams->dtmf_type = tech_pvt->profile->dtmf_type;
        switch_channel_set_flag(tech_pvt->channel, CF_TRACKABLE);
index 445e8771e9729be9e5f711991bcd7da556dc6a79..e16b681583f4791a325907a5e3802017a653af36 100644 (file)
@@ -2926,6 +2926,11 @@ static void check_ice(switch_media_handle_t *smh, switch_media_type_t type, sdp_
 
                engine->cur_payload_map->remote_sdp_ip = switch_core_session_strdup(smh->session, (char *) engine->ice_in.cands[engine->ice_in.chosen[0]][0].con_addr);
                engine->cur_payload_map->remote_sdp_port = (switch_port_t) engine->ice_in.cands[engine->ice_in.chosen[0]][0].con_port;
+               
+               if (!smh->mparams->remote_ip) {
+                       smh->mparams->remote_ip = engine->cur_payload_map->remote_sdp_ip;
+               }
+
                if (engine->remote_rtcp_port) {
                        engine->remote_rtcp_port = engine->cur_payload_map->remote_sdp_port;
                }