[Freeswitch-users] Registration to FreeSWITCH through multiple proxy problem
Stanislav Sinyagin
ssinyagin at gmail.com
Mon Jul 18 11:03:24 MSD 2016
if you relay the REGISTER messages through a proxy, it needs to insert
the "Path" header, then FreeSWITCH will recognize how to reach the
client. In Kamailio, it's done by add_path_received();
here's my proof-of-concept configuration for such a relay:
https://github.com/xlab1/sipfe_kamailio
I haven't tested it with two consecutive proxies though.
Also watch out for UDP packet length, maybe you need to switch to TCP
transport on the way between proxies and the server.
On Sun, Jul 17, 2016 at 10:55 AM, Dmitry Saratsky <simpot at simpot.com> wrote:
> 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.
>
>
>
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://confluence.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users
mailing list