<div dir="ltr">If you are not doing registration with opensips, you could route back calls to opensips from FreeSWITCH using fs_path. </div><div class="gmail_extra"><br><div class="gmail_quote">On 15 December 2016 at 17:10, Răzvan Crainea <span dir="ltr"><<a href="mailto:razvan@opensips.org" target="_blank">razvan@opensips.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<tt>So as far as I understand, you receive a request and you want
Freeswitch to route it back to OpenSIPS. There is no SIP mechanism
that can achieve this - you need to configure Freeswitch so that when
it gets a message from OpenSIPS, determine the gateway, and send
it back. Note that you need to set opensips's IP in the
destination URI, not the request URI, otherwise OpenSIPS will not
know the destination GW.<br>
<br>
Best regards,<br>
</tt><span class="">
<pre class="m_3344673940111363571moz-signature" cols="72">Răzvan Crainea
OpenSIPS Solutions
<a class="m_3344673940111363571moz-txt-link-abbreviated" href="http://www.opensips-solutions.com" target="_blank">www.opensips-solutions.com</a></pre>
</span><div><div class="h5"><div class="m_3344673940111363571moz-cite-prefix">On 12/15/2016 01:33 PM, M. Salman
wrote:<br>
</div>
<blockquote type="cite">
<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_3344673940111363571m_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_3344673940111363571m_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_3344673940111363571m_2449680679571630528bloop_sign_1481800137599180032" class="m_3344673940111363571m_2449680679571630528bloop_sign">
<div style="font-family:helvetica,arial;font-size:13px">-- <br>
<br>
Sent with Airmail</div>
</div>
<div class="m_3344673940111363571m_2449680679571630528airmail_ext_on" style="color:black"><span><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="m_3344673940111363571h5"><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="m_3344673940111363571h5"><br>
<blockquote type="cite" class="m_3344673940111363571m_2449680679571630528clean_bq"><span>
<div bgcolor="#FFFFFF" text="#000000">
<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_3344673940111363571m_2449680679571630528moz-signature" cols="72">Răzvan Crainea
OpenSIPS Solutions
<a class="m_3344673940111363571m_2449680679571630528moz-txt-link-abbreviated" href="http://www.opensips-solutions.com" target="_blank">www.opensips-solutions.com</a></pre>
<div class="m_3344673940111363571m_2449680679571630528moz-cite-prefix">On
12/14/2016 07:53 PM, Muhammad
Naseer Bhatti wrote:<br>
</div>
<blockquote type="cite">
<div id="m_3344673940111363571m_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_3344673940111363571m_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_3344673940111363571m_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_3344673940111363571m_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_3344673940111363571m_2449680679571630528bloop_customfont" style="margin:0px"><br>
</div>
<div id="m_3344673940111363571m_2449680679571630528bloop_customfont" style="margin:0px">…</div>
<div id="m_3344673940111363571m_2449680679571630528bloop_customfont" style="margin:0px">if
(is_method("INVITE")) {</div>
<div id="m_3344673940111363571m_2449680679571630528bloop_customfont" style="margin:0px">record_route();</div>
<div id="m_3344673940111363571m_2449680679571630528bloop_customfont" style="margin:0px">}</div>
<div id="m_3344673940111363571m_2449680679571630528bloop_customfont" style="margin:0px">…</div>
<div id="m_3344673940111363571m_2449680679571630528bloop_customfont" style="margin:0px"><br>
</div>
<div id="m_3344673940111363571m_2449680679571630528bloop_customfont" style="margin:0px">On the media server I
see the Via header,</div>
<div id="m_3344673940111363571m_2449680679571630528bloop_customfont" style="margin:0px"><br>
</div>
<div id="m_3344673940111363571m_2449680679571630528bloop_customfont" style="margin:0px">
<div id="m_3344673940111363571m_2449680679571630528bloop_customfont" style="margin:0px"> INVITE
<a href="http://sip:6054775550@64.58.228.102:3333" target="_blank">sip:6054775550@64.58.228.102:3<wbr>333</a>
SIP/2.0</div>
<div id="m_3344673940111363571m_2449680679571630528bloop_customfont" style="margin:0px">
Record-Route:
<sip:64.58.228.102:3333;lr=on;<wbr>ftag=CT60RBHd.BRAp6IAQSKwtAN3M<wbr>jj2bPKL></div>
<div id="m_3344673940111363571m_2449680679571630528bloop_customfont" style="margin:0px"> Via:
SIP/2.0/UDP
64.58.228.102:3333;branch=z9hG<wbr>4bK31d2.b8fe57fe9c7545e354a93f<wbr>391a1d0704.0</div>
<div id="m_3344673940111363571m_2449680679571630528bloop_customfont" style="margin:0px"> Via:
SIP/2.0/UDP
172.16.0.101:52207;received=17<wbr>2.16.0.101;rport=52207;branch=<wbr>z9hG4bKPjyGufepGSH2zMGfp6J.CIK<wbr>vEgl87YIPFN</div>
<div id="m_3344673940111363571m_2449680679571630528bloop_customfont" style="margin:0px"><br>
</div>
<div id="m_3344673940111363571m_2449680679571630528bloop_customfont" style="margin:0px">but when the media
server sends </div>
<div id="m_3344673940111363571m_2449680679571630528bloop_customfont" style="margin:0px"><br>
</div>
<div id="m_3344673940111363571m_2449680679571630528bloop_customfont" style="margin:0px">
<div id="m_3344673940111363571m_2449680679571630528bloop_customfont" style="margin:0px">recv 1432 bytes
from
udp/[64.58.228.89]:3333 at
12:44:12.709234:</div>
<div id="m_3344673940111363571m_2449680679571630528bloop_customfont" style="margin:0px">
-----------------------------<wbr>------------------------------<wbr>-------------</div>
<div id="m_3344673940111363571m_2449680679571630528bloop_customfont" style="margin:0px"> INVITE
<a href="http://sip:6054775550@23.29.112.144:15080" target="_blank">sip:6054775550@23.29.112.144:1<wbr>5080</a>
SIP/2.0</div>
<div id="m_3344673940111363571m_2449680679571630528bloop_customfont" style="margin:0px"> Via:
SIP/2.0/UDP
64.58.228.89:3333;rport;branch<wbr>=z9hG4bKF8jFHt4maUBeQ</div>
<div id="m_3344673940111363571m_2449680679571630528bloop_customfont" style="margin:0px">
Max-Forwards: 68</div>
<div id="m_3344673940111363571m_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=45<wbr>yZ9S13S47HF</div>
<div id="m_3344673940111363571m_2449680679571630528bloop_customfont" style="margin:0px"><br>
</div>
<div id="m_3344673940111363571m_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/Cm<wbr>nxnf4c</a></div>
<div id="m_3344673940111363571m_2449680679571630528bloop_customfont" style="margin:0px"><br>
</div>
</div>
</div>
</div>
<br>
<div id="m_3344673940111363571m_2449680679571630528bloop_sign_1481736925575387904" class="m_3344673940111363571m_2449680679571630528bloop_sign">
<div style="font-family:helvetica,arial;font-size:13px">
-- <br>
<br>
Sent with Airmail</div>
</div>
<div class="m_3344673940111363571m_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_3344673940111363571m_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_3344673940111363571m_2449680679571630528moz-signature" cols="72"><span>Răzvan Crainea
OpenSIPS Solutions
<a class="m_3344673940111363571m_2449680679571630528moz-txt-link-abbreviated" href="http://www.opensips-solutions.com" target="_blank">www.opensips-solutions.com</a></span></pre>
<div class="m_3344673940111363571m_2449680679571630528moz-cite-prefix"><span>On
12/14/2016 06:39 PM, Muhammad
Naseer Bhatti wrote:<br>
</span></div>
<blockquote type="cite">
<div id="m_3344673940111363571m_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_3344673940111363571m_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_3344673940111363571m_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>
<span><br>
</span>
<div id="m_3344673940111363571m_2449680679571630528bloop_sign_1481732893972313856" class="m_3344673940111363571m_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_3344673940111363571m_2449680679571630528mimeAttachmentHeader"></fieldset>
<span><br>
</span>
<pre><span>______________________________<wbr>_________________
Users mailing list
<a class="m_3344673940111363571m_2449680679571630528moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a class="m_3344673940111363571m_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>
______________________________<wbr>_________________
Users mailing list
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-<wbr>bin/mailman/listinfo/users</a>
</span></div>
</div>
</blockquote>
<fieldset class="m_3344673940111363571m_2449680679571630528mimeAttachmentHeader"></fieldset>
<pre>______________________________<wbr>_________________
Users mailing list
<a class="m_3344673940111363571m_2449680679571630528moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a class="m_3344673940111363571m_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>
______________________________<wbr>_________________
Users mailing list
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-<wbr>bin/mailman/listinfo/users</a>
</div></div></span></blockquote></div></div></div>
______________________________<wbr>_________________
Users mailing list
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<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>
</blockquote></div>
--
<div class="m_3344673940111363571gmail_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">
</font><div><pre cols="72"><font face="'times new roman', serif">M. Salman
VoIP Professional
</font>
</pre></div></div></div></div></div></div>
</div>
<fieldset class="m_3344673940111363571mimeAttachmentHeader"></fieldset>
<pre>______________________________<wbr>_________________
Users mailing list
<a class="m_3344673940111363571moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a class="m_3344673940111363571moz-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>
</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>