<div dir="ltr">I also suggest use topology_hiding(), i saw some equipments ignoring Via/record-route order.</div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Dec 14, 2016 at 3:53 PM, Muhammad Naseer Bhatti <span dir="ltr"><<a href="mailto:nbhatti@gmail.com" target="_blank">nbhatti@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div id="m_8842828569868326714bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto"><br></div><div id="m_8842828569868326714bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto">Hi Razvan,</div><div id="m_8842828569868326714bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto">I am not using REGISTER, but I guess add_path() wont’ work for me, I am using record_route() for the INVITE though. </div><div id="m_8842828569868326714bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto"><div id="m_8842828569868326714bloop_customfont" style="margin:0px"><br></div><div id="m_8842828569868326714bloop_customfont" style="margin:0px">…</div><div id="m_8842828569868326714bloop_customfont" style="margin:0px"><span class="m_8842828569868326714Apple-tab-span" style="white-space:pre-wrap">     </span>if (is_method("INVITE")) {</div><div id="m_8842828569868326714bloop_customfont" style="margin:0px"><span class="m_8842828569868326714Apple-tab-span" style="white-space:pre-wrap">             </span>record_route();</div><div id="m_8842828569868326714bloop_customfont" style="margin:0px"><span class="m_8842828569868326714Apple-tab-span" style="white-space:pre-wrap">  </span>}</div><div id="m_8842828569868326714bloop_customfont" style="margin:0px">…</div><div id="m_8842828569868326714bloop_customfont" style="margin:0px"><br></div><div id="m_8842828569868326714bloop_customfont" style="margin:0px">On the media server I see the Via header,</div><div id="m_8842828569868326714bloop_customfont" style="margin:0px"><br></div><div id="m_8842828569868326714bloop_customfont" style="margin:0px"><div id="m_8842828569868326714bloop_customfont" style="margin:0px">   INVITE <a href="http://sip:6054775550@64.58.228.102:3333" target="_blank">sip:6054775550@64.58.228.102:<wbr>3333</a> SIP/2.0</div><div id="m_8842828569868326714bloop_customfont" style="margin:0px">   Record-Route: <sip:64.58.228.102:3333;lr=on;<wbr>ftag=CT60RBHd.<wbr>BRAp6IAQSKwtAN3Mjj2bPKL></div><div id="m_8842828569868326714bloop_customfont" style="margin:0px">   Via: SIP/2.0/UDP 64.58.228.102:3333;branch=<wbr>z9hG4bK31d2.<wbr>b8fe57fe9c7545e354a93f391a1d07<wbr>04.0</div><div id="m_8842828569868326714bloop_customfont" style="margin:0px">   Via: SIP/2.0/UDP 172.16.0.101:52207;received=<wbr>172.16.0.101;rport=52207;<wbr>branch=<wbr>z9hG4bKPjyGufepGSH2zMGfp6J.<wbr>CIKvEgl87YIPFN</div><div id="m_8842828569868326714bloop_customfont" style="margin:0px"><br></div><div id="m_8842828569868326714bloop_customfont" style="margin:0px">but when the media server sends </div><div id="m_8842828569868326714bloop_customfont" style="margin:0px"><br></div><div id="m_8842828569868326714bloop_customfont" style="margin:0px"><div id="m_8842828569868326714bloop_customfont" style="margin:0px">recv 1432 bytes from udp/[64.58.228.89]:3333 at 12:44:12.709234:</div><div id="m_8842828569868326714bloop_customfont" style="margin:0px">   -----------------------------<wbr>------------------------------<wbr>-------------</div><div id="m_8842828569868326714bloop_customfont" style="margin:0px">   INVITE <a href="http://sip:6054775550@23.29.112.144:15080" target="_blank">sip:6054775550@23.29.112.144:<wbr>15080</a> SIP/2.0</div><div id="m_8842828569868326714bloop_customfont" style="margin:0px">   Via: SIP/2.0/UDP 64.58.228.89:3333;rport;<wbr>branch=z9hG4bKF8jFHt4maUBeQ</div><div id="m_8842828569868326714bloop_customfont" style="margin:0px">   Max-Forwards: 68</div><div id="m_8842828569868326714bloop_customfont" style="margin:0px">   From: "Naseer" <<a href="mailto:sip%3A1234@64.58.228.89" target="_blank">sip:1234@64.58.228.89</a>>;tag=<wbr>45yZ9S13S47HF</div><div id="m_8842828569868326714bloop_customfont" style="margin:0px"><br></div><div id="m_8842828569868326714bloop_customfont" style="margin:0px">Not sure what I am doing wrong. Here is my script, <a href="http://pastebin.com/Cmnxnf4c" target="_blank">http://pastebin.com/<wbr>Cmnxnf4c</a></div><span class="HOEnZb"><font color="#888888"><div id="m_8842828569868326714bloop_customfont" style="margin:0px"><br></div></font></span></div></div></div><span class="HOEnZb"><font color="#888888"> <br> <div id="m_8842828569868326714bloop_sign_1481736925575387904" class="m_8842828569868326714bloop_sign"><div style="font-family:helvetica,arial;font-size:13px">-- <br><br>Sent with Airmail</div>
</div> <div class="m_8842828569868326714airmail_ext_on" style="color:black"><br>From: <span style="color:black">Răzvan Crainea</span> <a href="mailto:razvan@opensips.org" target="_blank"><razvan@opensips.org></a><br>Reply: <span style="color:black">OpenSIPS users mailling list</span> <a href="mailto:users@lists.opensips.org" target="_blank"><users@lists.opensips.org></a><br>Date: <span style="color:black">December 14, 2016 at 8:34:22 PM</span><br>To: <span style="color:black"><a href="mailto:users@lists.opensips.org" target="_blank">users@lists.opensips.org</a></span> <a href="mailto:users@lists.opensips.org" target="_blank"><users@lists.opensips.org></a><br>Subject: <span style="color:black"> Re: [OpenSIPS-Users] How to Keep OpenSIPS in reverse path <br></span></div></font></span><div><div class="h5"><br> <blockquote type="cite" class="m_8842828569868326714clean_bq"><span><div bgcolor="#FFFFFF" text="#000000"><div></div><div>






<tt>Hi, Muhammad!<br>
<br>
The add_path() function should only be called on REGISTER messages,
and it adds a Path header (not a Via). Do you see this header in
your REGISTER message?<br>
For sequential requests, you should use the record_route()
mechanism.<br>
<br>
Best regards,<br></tt>
<pre class="m_8842828569868326714moz-signature" cols="72">Răzvan Crainea
OpenSIPS Solutions
<a class="m_8842828569868326714moz-txt-link-abbreviated" href="http://www.opensips-solutions.com" target="_blank">www.opensips-solutions.com</a></pre>
<div class="m_8842828569868326714moz-cite-prefix">On 12/14/2016 06:39 PM, Muhammad
Naseer Bhatti wrote:<br></div>
<blockquote type="cite">

<div id="m_8842828569868326714bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto">
<br></div>
<div id="m_8842828569868326714bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto">
I am using dispatcher to distribute calls to multiple media
servers, but also want the reply to go through OpenSIPS. So far I
have tried add_path() function which add the Via header but
FreeSWITCH sends the call directly to the gateway not sending the
call back through OpenSIPS. I am not sure if I am doing something
wrong, how can I achieve that?</div>
<div id="m_8842828569868326714bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto">
<br></div>
<div class="m_8842828569868326714bloop_container">
<div class="m_8842828569868326714bloop_frame"></div>
</div>
<br>
<div id="m_8842828569868326714bloop_sign_1481732893972313856" class="m_8842828569868326714bloop_sign">
<div style="font-family:helvetica,arial;font-size:13px">
-- <br>
<br>
Sent with Airmail</div>
</div>
<br>
<fieldset class="m_8842828569868326714mimeAttachmentHeader"></fieldset>
<br>
<pre>______________________________<wbr>_________________
Users mailing list
<a class="m_8842828569868326714moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a class="m_8842828569868326714moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-<wbr>bin/mailman/listinfo/users</a>
</pre></blockquote>
<br>


______________________________<wbr>_________________<br>Users mailing list<br><a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br><a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-<wbr>bin/mailman/listinfo/users</a><br></div></div></span></blockquote></div></div></div>
<br>______________________________<wbr>_________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-<wbr>bin/mailman/listinfo/users</a><br>
<br></blockquote></div><br></div>