<div dir="ltr"><div><div><div><div>Hi all,<br><br><br></div><div>------------------FREESWITCH--------------(bridge=sofia/external/sip:outbound-opensip.com:5060)-----------OPENSIP----------------------<br></div><div><br></div>
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.<br><br></div>Dialing SIP URI <br><br><action application="bridge" data="sofia/external/sip:<a href="http://outbound-opensip.com:5060">outbound-opensip.com:5060</a>"<br>
<br></div>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.<br><br>But when freeswitch sending INVITE external IPs are not set in<span style="background-color:rgb(204,0,0)"> SDP and FROM</span> 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.<br>
<br></div><div>switch_core_media.c <br><br>SWITCH_DECLARE(switch_status_t) switch_core_media_choose_port(switch_core_session_t *session, switch_media_type_t type, int force)<br></div><div><br><span style="background-color:rgb(204,0,0)">/* Check if NAT is detected */<br>
if (!zstr(smh->mparams->remote_ip) && switch_core_media_check_nat(smh, smh->mparams->remote_ip)) {<br> /* Yes, map the port through switch_nat */<br></span></div><span style="background-color:rgb(204,0,0)"> /* Code */<br>
</span><div><span style="background-color:rgb(204,0,0)"> } else {<br> /* No NAT traversal required, use the profile's rtp ip */<br> use_ip = smh->mparams->rtpip;<br> } </span><br><br></div>
<div>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:<a href="http://outbound-opensip.com:5060">outbound-opensip.com:5060</a>" i can see the remote ip as "<a href="http://oubound-opensip.com">oubound-opensip.com</a>" and its able to external IP in SDP. <br>
<br></div><div>Can any body tell how to solve this problem ? Is there any configuration to set relam in dialplan ? <br><br></div><div>I am using freeswitch version 1.5.6. <br><br></div><div>Hopping the earliest response.<br>
<br>Regards<br><br></div><div>Andrew <br></div></div>