<div dir="ltr"><div><div><div>Hi,<br><br>Generally there are three ways of doing this:<br><br></div>1) Use SIP sever as an Edge Proxy (check rfc5626, should be a quick read)<br></div>2) Create spiral, route SIP call from proxy to your media-server and then back to proxy from media server.<br></div>3) Use SIP sever as a registrar and then forward registrations to media sever and maintaining it. (cheap way though)<br><div><div><div><div><br><br></div><div>Regards,<br></div><div>Salman<br></div></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Dec 15, 2016 at 4:12 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_2449680679571630528bloop_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_2449680679571630528bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto">So the call hits the proxy and dispatched to the media server. Media server makes the gateway selection and now need to send the call to the provider. Instead of the signaling to be sent directly from the media server and the provider I and trying to pass the signaling back through the proxy so the outgoing connections to the provider will be seen by the proxy IP address not the media server. Both the proxy and media servers are not behind nat.</div> <br> <div id="m_2449680679571630528bloop_sign_1481800137599180032" class="m_2449680679571630528bloop_sign"><div style="font-family:helvetica,arial;font-size:13px">-- <br><br>Sent with Airmail</div>
</div> <div class="m_2449680679571630528airmail_ext_on" style="color:black"><span class=""><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></span>Date: <span style="color:black">December 15, 2016 at 12:55:18 PM</span><div><div class="h5"><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></div></div><div><div class="h5"><br> <blockquote type="cite" class="m_2449680679571630528clean_bq"><span><div bgcolor="#FFFFFF" text="#000000"><div></div><div>
<tt>I am sorry, but I don't understand your call flow. Please
present here the call flow you have now, and the expected
one.<br>
<br>
PS: not sure why you are looking at the Via header, that's only
used for replies, not for requests.<br>
<br>
Best regards,<br></tt>
<pre class="m_2449680679571630528moz-signature" cols="72">Răzvan Crainea
OpenSIPS Solutions
<a class="m_2449680679571630528moz-txt-link-abbreviated" href="http://www.opensips-solutions.com" target="_blank">www.opensips-solutions.com</a></pre>
<div class="m_2449680679571630528moz-cite-prefix">On 12/14/2016 07:53 PM, Muhammad
Naseer Bhatti wrote:<br></div>
<blockquote type="cite">
<div id="m_2449680679571630528bloop_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_2449680679571630528bloop_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_2449680679571630528bloop_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_2449680679571630528bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto">
<div id="m_2449680679571630528bloop_customfont" style="margin:0px"><br></div>
<div id="m_2449680679571630528bloop_customfont" style="margin:0px">…</div>
<div id="m_2449680679571630528bloop_customfont" style="margin:0px">if
(is_method("INVITE")) {</div>
<div id="m_2449680679571630528bloop_customfont" style="margin:0px">record_route();</div>
<div id="m_2449680679571630528bloop_customfont" style="margin:0px">}</div>
<div id="m_2449680679571630528bloop_customfont" style="margin:0px">…</div>
<div id="m_2449680679571630528bloop_customfont" style="margin:0px"><br></div>
<div id="m_2449680679571630528bloop_customfont" style="margin:0px">On the media server I
see the Via header,</div>
<div id="m_2449680679571630528bloop_customfont" style="margin:0px"><br></div>
<div id="m_2449680679571630528bloop_customfont" style="margin:0px">
<div id="m_2449680679571630528bloop_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_2449680679571630528bloop_customfont" style="margin:0px">
Record-Route:
<sip:64.58.228.102:3333;lr=on;<wbr>ftag=CT60RBHd.<wbr>BRAp6IAQSKwtAN3Mjj2bPKL></div>
<div id="m_2449680679571630528bloop_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_2449680679571630528bloop_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_2449680679571630528bloop_customfont" style="margin:0px"><br></div>
<div id="m_2449680679571630528bloop_customfont" style="margin:0px">but when the media
server sends </div>
<div id="m_2449680679571630528bloop_customfont" style="margin:0px"><br></div>
<div id="m_2449680679571630528bloop_customfont" style="margin:0px">
<div id="m_2449680679571630528bloop_customfont" style="margin:0px">recv 1432 bytes from
udp/[64.58.228.89]:3333 at 12:44:12.709234:</div>
<div id="m_2449680679571630528bloop_customfont" style="margin:0px">
-----------------------------<wbr>------------------------------<wbr>-------------</div>
<div id="m_2449680679571630528bloop_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_2449680679571630528bloop_customfont" style="margin:0px"> Via:
SIP/2.0/UDP
64.58.228.89:3333;rport;<wbr>branch=z9hG4bKF8jFHt4maUBeQ</div>
<div id="m_2449680679571630528bloop_customfont" style="margin:0px">
Max-Forwards: 68</div>
<div id="m_2449680679571630528bloop_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_2449680679571630528bloop_customfont" style="margin:0px"><br></div>
<div id="m_2449680679571630528bloop_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>
<div id="m_2449680679571630528bloop_customfont" style="margin:0px"><br></div>
</div>
</div>
</div>
<br>
<div id="m_2449680679571630528bloop_sign_1481736925575387904" class="m_2449680679571630528bloop_sign">
<div style="font-family:helvetica,arial;font-size:13px">
-- <br>
<br>
Sent with Airmail</div>
</div>
<div class="m_2449680679571630528airmail_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>
<br>
<blockquote type="cite" class="m_2449680679571630528clean_bq">
<div bgcolor="#FFFFFF" text="#000000">
<div><span><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></span>
<pre class="m_2449680679571630528moz-signature" cols="72"><span>Răzvan Crainea
OpenSIPS Solutions
<a class="m_2449680679571630528moz-txt-link-abbreviated" href="http://www.opensips-solutions.com" target="_blank">www.opensips-solutions.com</a></span></pre>
<div class="m_2449680679571630528moz-cite-prefix"><span>On 12/14/2016 06:39 PM, Muhammad
Naseer Bhatti wrote:<br></span></div>
<blockquote type="cite">
<div id="m_2449680679571630528bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto">
<span><br></span></div>
<div id="m_2449680679571630528bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto">
<span>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?</span></div>
<div id="m_2449680679571630528bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto">
<span><br></span></div>
<div class="m_2449680679571630528bloop_container"></div>
<span><br></span>
<div id="m_2449680679571630528bloop_sign_1481732893972313856" class="m_2449680679571630528bloop_sign">
<div style="font-family:helvetica,arial;font-size:13px">
<span>-- <br>
<br>
Sent with Airmail</span></div>
</div>
<span><br></span>
<fieldset class="m_2449680679571630528mimeAttachmentHeader"></fieldset>
<span><br></span>
<pre><span>______________________________<wbr>_________________
Users mailing list
<a class="m_2449680679571630528moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a class="m_2449680679571630528moz-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>
</span></pre></blockquote>
<span><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>
</span></div>
</div>
</blockquote>
<br>
<fieldset class="m_2449680679571630528mimeAttachmentHeader"></fieldset>
<br>
<pre>______________________________<wbr>_________________
Users mailing list
<a class="m_2449680679571630528moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a class="m_2449680679571630528moz-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><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><font face="'times new roman', serif">Regards</font><div><font face="'times new roman', serif"><br></font><div><pre cols="72"><font face="'times new roman', serif">M. Salman<br>VoIP Professional<br></font><br></pre></div></div></div></div></div></div>
</div>