[Freeswitch-users] Registration to FreeSWITCH through multiple proxy problem

Dmitry Saratsky simpot at simpot.com
Sun Jul 17 12:55:46 MSD 2016


Hi,

I have a scenario, where I need to register to freeswitch through 2 or more stateless forwarding kamailio proxies.

<User> => <Proxy1> => <Proxy2> => <FreeSWITCH>

Registration packet which comes to freeswitch have 3 VIA Headers (please see below):

REGISTER sip:146.148.54.153 SIP/2.0
Via: SIP/2.0/TCP 159.203.230.115:5060;branch=z9hG4bKea26.3936c0f1c658d2da02a7c46a86186077.0;i=1;rport
Via: SIP/2.0/TCP 188.166.22.58:5060;received=188.166.22.58;branch=z9hG4bKea26.98aaf5f1397dccdf6f103ae4150d3ce0.0;i=14;rport=36525
Via: SIP/2.0/TCP 216.72.41.53:63675;branch=z9hG4bK-524287-1---e991c17828928028
Max-Forwards: 68
Contact: <sip:219 at 216.72.41.53:63675;rinstance=e6186ad594e06aa9;transport=tcp>
To: "219"<sip:219 at 146.148.54.153>
From: "219"<sip:219 at 146.148.54.153>;tag=8c8fc855
Call-ID: NTE1OWIwNjYyODg0YTNiNDVkZDZkNjQxMjlhM2IxYzE
CSeq: 1 REGISTER
Allow: INVITE, ACK, CANCEL, BYE, REFER, INFO, NOTIFY, OPTIONS, UPDATE, PRACK, MESSAGE, SUBSCRIBE
User-Agent: Bria iOS release 3.6.5 stamp 34728
Content-Length: 0
Expires: 120
P-hint: outbound
P-hint: outbound

User register to freeswitch successfully, however back calling to end-user is impossible bcz it is not going to reach end-phone using VIA haeder from REGISTER.

If I use aggressive-nat: freeswitch send invite calls to end-user to proxy2, which have then no idea where where to send the call (no route haeder in invite from freeswitch)
If I do not use aggressive-nat - freeswitch sends it's invite directly to end-user phone(((

In this example I'm using SIP over TCP, however the same is happened over UDP...

So, the question is how to register correctly to FS and preserve all VIA headers with fs_nat in contact db or some other way, so I could reach the end-user phone in same patch it is registering?

Thanks a lot,
Dmitry.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20160717/66c1ab80/attachment.html 


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