[OpenSIPS-Users] Does sl_send_reply auto-generated a Contact Header in it's response?

mwb mwbazdarich at yahoo.com
Mon Feb 22 21:38:28 EST 2021


 Thank you John,I appreciate the help. I will look into the $ds variable to see if I can manipulate it prior to the sl_send_reply. Currently we're constructing our own Contact header with the redirect information and using an append_to_reply (thus we end up with multiple contacts) but I will see if we can scrap that and manipulate $ds instead.
Thanks for the help!
    On Monday, February 22, 2021, 05:36:57 AM PST, John Quick <john.quick at smartvox.co.uk> wrote:  
 
 Hello mwb,

I used OpenSIPS as a redirect server many years ago.
Back then, the destination set ($ds) was used to generate Contact addresses
when you use sl_send_reply() to return 302.

302 is a redirect. The 302 response must tell the UAC where the request is
to be redirected. That is done using the Contact header (see section 8.3 of
RFC3261).
OpenSIPS did this by taking addresses it found in the destination set. I am
not certain if the latest versions of OpenSIPS still do it this way.

You may have to use append_branch() or $branch now, but it should be clear
if you look at this blog article:
https://blog.opensips.org/2018/07/05/handling-sip-redirect-requests-in-realt
ime/
Look for the section headed "Using OpenSIPS as a redirect server".

John Quick
Smartvox Limited
Web: www.smartvox.co.uk


  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20210222/b599c00d/attachment.html>


More information about the Users mailing list