[OpenSIPS-Users] How to Keep OpenSIPS in reverse path

Muhammad Naseer Bhatti nbhatti at gmail.com
Wed Dec 14 12:53:14 EST 2016


Hi Razvan,
I am not using REGISTER, but I guess add_path() wont’ work for me, I am
using record_route() for the INVITE though.

…
if (is_method("INVITE")) {
record_route();
}
…

On the media server I see the Via header,

   INVITE sip:6054775550 at 64.58.228.102:3333 SIP/2.0
   Record-Route: <sip:64.58.228.102:3333
;lr=on;ftag=CT60RBHd.BRAp6IAQSKwtAN3Mjj2bPKL>
   Via: SIP/2.0/UDP 64.58.228.102:3333
;branch=z9hG4bK31d2.b8fe57fe9c7545e354a93f391a1d0704.0
   Via: SIP/2.0/UDP 172.16.0.101:52207
;received=172.16.0.101;rport=52207;branch=z9hG4bKPjyGufepGSH2zMGfp6J.CIKvEgl87YIPFN

but when the media server sends

recv 1432 bytes from udp/[64.58.228.89]:3333 at 12:44:12.709234:
   ------------------------------------------------------------------------
   INVITE sip:6054775550 at 23.29.112.144:15080 SIP/2.0
   Via: SIP/2.0/UDP 64.58.228.89:3333;rport;branch=z9hG4bKF8jFHt4maUBeQ
   Max-Forwards: 68
   From: "Naseer" <sip:1234 at 64.58.228.89>;tag=45yZ9S13S47HF

Not sure what I am doing wrong. Here is my script,
http://pastebin.com/Cmnxnf4c


-- 

Sent with Airmail

From: Răzvan Crainea <razvan at opensips.org> <razvan at opensips.org>
Reply: OpenSIPS users mailling list <users at lists.opensips.org>
<users at lists.opensips.org>
Date: December 14, 2016 at 8:34:22 PM
To: users at lists.opensips.org <users at lists.opensips.org>
<users at lists.opensips.org>
Subject:  Re: [OpenSIPS-Users] How to Keep OpenSIPS in reverse path

Hi, Muhammad!

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?
For sequential requests, you should use the record_route() mechanism.

Best regards,

Răzvan Crainea
OpenSIPS Solutionswww.opensips-solutions.com

On 12/14/2016 06:39 PM, Muhammad Naseer Bhatti wrote:


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?


-- 

Sent with Airmail


_______________________________________________
Users mailing listUsers at lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
Users at lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20161214/c89f46d4/attachment.html>


More information about the Users mailing list