<div dir="ltr"><div><div>Hi,<br><br></div>I have similar set-up and it works perfectly, but I'm using statefull Kamailio. Check path module of Kamailio, it might help you.<br><br></div>With kind regards,<br></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Jurijs<br></div></div></div>
<br><div class="gmail_quote">On Sun, Jul 17, 2016 at 11:55 AM, Dmitry Saratsky <span dir="ltr"><<a href="mailto:simpot@simpot.com" target="_blank">simpot@simpot.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div link="#0563C1" vlink="#954F72" lang="EN-US">
<div>
<p class="MsoNormal">Hi,<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I have a scenario, where I need to register to freeswitch through 2 or more stateless forwarding kamailio proxies.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><User> => <Proxy1> => <Proxy2> => <FreeSWITCH><u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Registration packet which comes to freeswitch have 3 VIA Headers (please see below):<u></u><u></u></p>
<div style="border:none;border-bottom:solid windowtext 1.0pt;padding:0cm 0cm 1.0pt 0cm">
<p class="MsoNormal" style="border:none;padding:0cm"><u></u> <u></u></p>
</div>
<p class="MsoNormal">REGISTER sip:146.148.54.153 SIP/2.0<u></u><u></u></p>
<p class="MsoNormal">Via: SIP/2.0/TCP 159.203.230.115:5060;branch=z9hG4bKea26.3936c0f1c658d2da02a7c46a86186077.0;i=1;rport<u></u><u></u></p>
<p class="MsoNormal">Via: SIP/2.0/TCP 188.166.22.58:5060;received=188.166.22.58;branch=z9hG4bKea26.98aaf5f1397dccdf6f103ae4150d3ce0.0;i=14;rport=36525<u></u><u></u></p>
<p class="MsoNormal">Via: SIP/2.0/TCP 216.72.41.53:63675;branch=z9hG4bK-524287-1---e991c17828928028<u></u><u></u></p>
<p class="MsoNormal">Max-Forwards: 68<u></u><u></u></p>
<p class="MsoNormal">Contact: <sip:219@216.72.41.53:63675;rinstance=e6186ad594e06aa9;transport=tcp><u></u><u></u></p>
<p class="MsoNormal">To: "219"<<a href="mailto:sip%3A219@146.148.54.153" target="_blank">sip:219@146.148.54.153</a>><u></u><u></u></p>
<p class="MsoNormal">From: "219"<<a href="mailto:sip%3A219@146.148.54.153" target="_blank">sip:219@146.148.54.153</a>>;tag=8c8fc855<u></u><u></u></p>
<p class="MsoNormal">Call-ID: NTE1OWIwNjYyODg0YTNiNDVkZDZkNjQxMjlhM2IxYzE<u></u><u></u></p>
<p class="MsoNormal">CSeq: 1 REGISTER<u></u><u></u></p>
<p class="MsoNormal">Allow: INVITE, ACK, CANCEL, BYE, REFER, INFO, NOTIFY, OPTIONS, UPDATE, PRACK, MESSAGE, SUBSCRIBE<u></u><u></u></p>
<p class="MsoNormal">User-Agent: Bria iOS release 3.6.5 stamp 34728<u></u><u></u></p>
<p class="MsoNormal">Content-Length: 0<u></u><u></u></p>
<p class="MsoNormal">Expires: 120<u></u><u></u></p>
<p class="MsoNormal">P-hint: outbound<u></u><u></u></p>
<div style="border:none;border-bottom:solid windowtext 1.0pt;padding:0cm 0cm 1.0pt 0cm">
<p class="MsoNormal" style="border:none;padding:0cm">P-hint: outbound<u></u><u></u></p>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">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.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">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)<u></u><u></u></p>
<p class="MsoNormal">If I do not use aggressive-nat – freeswitch sends it’s invite directly to end-user phone(((<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">In this example I’m using SIP over TCP, however the same is happened over UDP…<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">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?<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Thanks a lot,<u></u><u></u></p>
<p class="MsoNormal">Dmitry.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
<br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" rel="noreferrer" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" rel="noreferrer" target="_blank">http://confluence.freeswitch.org</a><br>
<a href="http://www.cluecon.com" rel="noreferrer" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br></blockquote></div><br></div>