[Freeswitch-users] Freeswitch not putting external IP in SD and From Header when dialing out SIPURI by external profile

Andrew Paul andrew.paul85 at gmail.com
Sun Feb 9 18:09:26 MSK 2014

Hi all,


I am facing NAT problem when i am dialing SIP URI via sip profile. When i
am dialing the SIP uri with Gateway trunk NAT is working properly.

Dialing SIP URI

<action application="bridge"  data="sofia/external/sip:

In external profile setting I made the setting for ext-rtp-ip and
ext-sip-ip. In freeswitch cli "sofia status profile external" i am able to
see the external rtp and sip ip correctly.

But when freeswitch sending INVITE external IPs are not set in SDP and
FROMHeader, instead it is using local IP. When i tried to debug the
problem in
switch_core_media.c freeswitch failed to check the NAT settings.


switch_core_media_choose_port(switch_core_session_t *session,
switch_media_type_t type, int force)

/* Check if NAT is detected  */
    if (!zstr(smh->mparams->remote_ip) && switch_core_media_check_nat(smh,
smh->mparams->remote_ip)) {
        /* Yes, map the port through switch_nat */
        /* Code */
    } else {
        /* No NAT traversal required, use the profile's rtp ip */
        use_ip = smh->mparams->rtpip;

Here remote IP is NULL always when i am dialing URI with external profile.
When I tried to make call  by "sofia/gateway/trunk/sip:
outbound-opensip.com:5060" i can see the remote ip as "oubound-opensip.com"
and its able to external IP in SDP.

Can any body tell how to solve this problem ? Is there any configuration to
set relam in dialplan ?

I am using freeswitch version 1.5.6.

Hopping the earliest response.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20140209/0b78e49f/attachment.html 

Join us at ClueCon 2013 Aug 6-8, 2013
More information about the FreeSWITCH-users mailing list