<html><head><style>body{font-family:Helvetica,Arial;font-size:13px}</style></head><body style="word-wrap:break-word"><div id="bloop_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="bloop_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="bloop_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="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto"><div id="bloop_customfont" style="margin:0px"><br></div><div id="bloop_customfont" style="margin:0px">…</div><div id="bloop_customfont" style="margin:0px"><span class="Apple-tab-span" style="white-space:pre">  </span>if (is_method("INVITE")) {</div><div id="bloop_customfont" style="margin:0px"><span class="Apple-tab-span" style="white-space:pre">            </span>record_route();</div><div id="bloop_customfont" style="margin:0px"><span class="Apple-tab-span" style="white-space:pre"> </span>}</div><div id="bloop_customfont" style="margin:0px">…</div><div id="bloop_customfont" style="margin:0px"><br></div><div id="bloop_customfont" style="margin:0px">On the media server I see the Via header,</div><div id="bloop_customfont" style="margin:0px"><br></div><div id="bloop_customfont" style="margin:0px"><div id="bloop_customfont" style="margin:0px">   INVITE <a href="http://sip:6054775550@64.58.228.102:3333">sip:6054775550@64.58.228.102:3333</a> SIP/2.0</div><div id="bloop_customfont" style="margin:0px">   Record-Route: <sip:64.58.228.102:3333;lr=on;ftag=CT60RBHd.BRAp6IAQSKwtAN3Mjj2bPKL></div><div id="bloop_customfont" style="margin:0px">   Via: SIP/2.0/UDP 64.58.228.102:3333;branch=z9hG4bK31d2.b8fe57fe9c7545e354a93f391a1d0704.0</div><div id="bloop_customfont" style="margin:0px">   Via: SIP/2.0/UDP 172.16.0.101:52207;received=172.16.0.101;rport=52207;branch=z9hG4bKPjyGufepGSH2zMGfp6J.CIKvEgl87YIPFN</div><div id="bloop_customfont" style="margin:0px"><br></div><div id="bloop_customfont" style="margin:0px">but when the media server sends </div><div id="bloop_customfont" style="margin:0px"><br></div><div id="bloop_customfont" style="margin:0px"><div id="bloop_customfont" style="margin:0px">recv 1432 bytes from udp/[64.58.228.89]:3333 at 12:44:12.709234:</div><div id="bloop_customfont" style="margin:0px">   ------------------------------------------------------------------------</div><div id="bloop_customfont" style="margin:0px">   INVITE <a href="http://sip:6054775550@23.29.112.144:15080">sip:6054775550@23.29.112.144:15080</a> SIP/2.0</div><div id="bloop_customfont" style="margin:0px">   Via: SIP/2.0/UDP 64.58.228.89:3333;rport;branch=z9hG4bKF8jFHt4maUBeQ</div><div id="bloop_customfont" style="margin:0px">   Max-Forwards: 68</div><div id="bloop_customfont" style="margin:0px">   From: "Naseer" <<a href="mailto:sip%3A1234@64.58.228.89">sip:1234@64.58.228.89</a>>;tag=45yZ9S13S47HF</div><div id="bloop_customfont" style="margin:0px"><br></div><div id="bloop_customfont" style="margin:0px">Not sure what I am doing wrong. Here is my script, <a href="http://pastebin.com/Cmnxnf4c">http://pastebin.com/Cmnxnf4c</a></div><div id="bloop_customfont" style="margin:0px"><br></div></div></div></div> <br> <div id="bloop_sign_1481736925575387904" class="bloop_sign"><div style="font-family:helvetica,arial;font-size:13px">-- <br><br>Sent with Airmail</div>
</div> <div class="airmail_ext_on" style="color:black"><br>From: <span style="color:black">Răzvan Crainea</span> <a href="mailto:razvan@opensips.org"><razvan@opensips.org></a><br>Reply: <span style="color:black">OpenSIPS users mailling list</span> <a href="mailto:users@lists.opensips.org"><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">users@lists.opensips.org</a></span> <a href="mailto:users@lists.opensips.org"><users@lists.opensips.org></a><br>Subject: <span style="color:black"> Re: [OpenSIPS-Users] How to Keep OpenSIPS in reverse path <br></span></div><br> <blockquote type="cite" class="clean_bq"><span><div bgcolor="#FFFFFF" text="#000000"><div></div><div>



<title></title>


<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="moz-signature" cols="72">Răzvan Crainea
OpenSIPS Solutions
<a class="moz-txt-link-abbreviated" href="http://www.opensips-solutions.com">www.opensips-solutions.com</a></pre>
<div class="moz-cite-prefix">On 12/14/2016 06:39 PM, Muhammad
Naseer Bhatti wrote:<br></div>
<blockquote cite="mid:CACak_ywiVJ0GHw66bteg_XiTcA07xk1jJ911JCjqZG6Jtn8mhQ@mail.gmail.com" type="cite">

<div id="bloop_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="bloop_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="bloop_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="bloop_container">
<div class="bloop_frame"></div>
</div>
<br>
<div id="bloop_sign_1481732893972313856" class="bloop_sign">
<div style="font-family:helvetica,arial;font-size:13px">
-- <br>
<br>
Sent with Airmail</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre>_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre></blockquote>
<br>


_______________________________________________<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">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br></div></div></span></blockquote></body></html>