[Freeswitch-users] FS uses external IP address for Contact in 200 to internal server

M Yudkowsky speech at pobox.com
Fri May 25 12:46:51 UTC 2018


Hi,

Thanks for your response, quite helpful.

> On May 25, 2018, at 03:56 , Vallimamod Abdullah <vma at vallimamod.org> wrote:
> 
>> 
>> <param name="inbound-proxy-media" value="true"/>
>> <param name="local-network-acl" value="localnet.auto"/>
>> <param name="ext-rtp-ip" value="$${external_rtp_ip}"/>
>> <param name="ext-sip-ip" value="$${external_sip_ip}"/>
> 
> These are not channel variables but profile params. So they have to be set on the profile configuration file under sip_profiles.

I expect I was not clear: the params are set in sip_profiles/(profile name).xml, where "profile name" is a valid profile name.


> And for your case, if all your traffic is internal on this profile, remove the last 2 params (ext-sip-ip and est-rtp-ip) as freeswitch use them to set the public ip on the contact and SDP if your server is nated.

Going back to my original diagram, let me add the external leg explicitly:

IS (internal IP)  == INVITE ==> FS (internal IP)
IS (internal IP)  <== 100 == FS (internal IP)
IS (internal IP)  <== 183 == FS (internal IP)

  FS starts a call to the external provider:

                                 FS (external IP) == INVITE ==> SIP PROVIDER
                                 FS (external IP) <== 200 OK == SIP PROVIDER
                                 FS (external IP) == ACK ==> SIP PROVIDER

  FS continues the internal call:
             
IS (internal IP)  <== 200 OK == FS (internal IP)

  But the 200 OK from FS contains, in the Contact field, the *external* IP address:
  Contact: <sip:xxxxx@(external IP):5060;transport=udp>
  As a result, the IS sends a response to the *external* IP address:

IS (external IP)  == ACK ==> FS (external IP)

  FS resends several 200's, which IS properly ignores.
  Eventually FS gives up on hearing from IS and sends a 
  BYE with a Reason of 408 ACK Timeout.


Just to check, then: is the ext-rtp-ip and ext-sip-ip somehow too aggressive, and I should rely on NAT and localnet.auto and other automatic discovery mechanisms instead? Or is this configuration correct, and I have a different problem?



-- 
  Moshe Yudkowsky
  Disaggregate Corporation
  2952 W Fargo
  Chicago, IL 60645 USA

  +1 773 764 8727
   speech at pobox.com

   http://www.Disaggregate.com
   http://www.PebbleAndAvalanche.com









More information about the FreeSWITCH-users mailing list