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

Brian West brian at freeswitch.org
Sun Feb 9 20:07:08 MSK 2014


What values do you have in ext-sip-ip and ext-rtp-ip? 
--
Brian West
brian at freeswitch.org
FreeSWITCH Solutions, LLC
PO BOX 2531
Brookfield, WI 53008-2531
Twitter: @FreeSWITCH , @briankwest
http://www.freeswitchbook.com
http://www.freeswitchcookbook.com

T: +1.918.420.9001  |  F: +1.918.420.9002  |  M: +1.918.424.WEST
iNUM: +883 5100 1420 9001
ISN: 410*543
Skype:briankwest
PGP Key: http://www.bkw.org/key.txt (AB93356707C76CED)


On Feb 9, 2014, at 9:09 AM, Andrew Paul <andrew.paul85 at gmail.com> wrote:

> Hi all,
> 
> 
> ------------------FREESWITCH--------------(bridge=sofia/external/sip:outbound-opensip.com:5060)-----------OPENSIP----------------------
> 
> 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:outbound-opensip.com:5060"
> 
> 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 FROM Header, 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.c 
> 
> SWITCH_DECLARE(switch_status_t) 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.
> 
> Regards
> 
> Andrew 




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