Hi all,

I work on Kazoo system.
I have NAT problem when configure Freeswitch and Kamailio.

As the old network diagram:

I configure dispatcher to FS 1,2 with IP private and map IP public <-> IP private for each server via Router.
This work fine.
Then now, I want to improve FS performance so that I set up new FS with IP public:

I configure dispatcher FS3 with IP public, connection between FS3 & ecallmgr via public IP is Okay but have problem with NAT:
When Kamailio foward SIP INVITE message to FS3 then FS3 response 200 OK message but it send to Ip private of Kamailio not IP public.
As Kamailio I have already configure advertise IP public:
local.cfg
listen
=UDP_SIP advertise 125.212.212.40:5060
listen
=TCP_SIP advertise 125.212.212.40:5060

View console log on Freeswitch, I see the ecallmgr response to FS3:
  1. bridge({outbound_redirect_fatal="false",call_timeout=20,originate_timeout=20,local_var_clobber="true"}[ecallmgr_Authorizing-ID="71310939684a2c8acc4e0e6dff1be6c2",ecallmgr_Owner-ID="188cd101dcea060d080261b328fdf1ca",ecallmgr_Account-ID="3f221d1ce6959ec04acd372923e253b9",sdp_secure_savp_only="false",sip_invite_domain="hahai1412.anttel-pro.ab-kz-02.antbuddy.com",presence_id="sharklasers@hahai1412.anttel-pro.ab-kz-02.antbuddy.com",sip_h_X-KAZOO-AOR=sip:sharklasers@hahai1412.anttel-pro.ab-kz-02.antbuddy.com,absolute_codec_string="^^:PCMU:VP8",leg_timeout="20",effective_callee_id_number="sharklasers",effective_callee_id_name="sharklasers  ",origination_callee_id_number="sharklasers",origination_callee_id_name="sharklasers  ",ecallmgr_Realm="hahai1412.anttel-pro.ab-kz-02.antbuddy.com",ecallmgr_Username="sharklasers"]sofia/sipinterface_1/sharklasers@113.161.89.159:5914;transport=ws;fs_path=sip:10.127.15.36:5060;lr;received="sip:113.161.89.159:5914;transport=ws")
I research fs_path parameter: https://wiki.freeswitch.org/wiki/Sofia-SIP#Specifying_SIP_Proxy_With_fs_path
I guess this is broken It should be Public IP: fs_path=sip:125.212.212.40:5060. But I don't know how I can change this parameter ! 
Anybody faced that problem ? Any solution ?

Regards,
Hai Bui
--
Hai Bui
VoIP engineer, Cvoice team, HTK-HCM Office
Mobile: +84-165-618-9876