[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")) {

On the media server I see the Via header,

   INVITE sip:6054775550 at SIP/2.0
   Record-Route: <sip:
   Via: SIP/2.0/UDP
   Via: SIP/2.0/UDP

but when the media server sends

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

Not sure what I am doing wrong. Here is my script,


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
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
-------------- 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