<div dir="ltr">Hello,<div><br></div><div>The next destination(s) should be decided based on Contact Header(s) of 3xx Responses. You can configure one or more destinations based on priority and fail-over enabled to multiple destinations. But in your case I found, Contact Header is malformed i.e. <b>Contact: <sip:16317918378>. </b></div><div><br></div><div><div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div>Thanks & Regards</div><div dir="ltr"><b>Diptesh Patel</b><div>Software Developer </div><div>Ecosmob Technologies Ltd, </div><div>Ahmedabad</div><div>Mo:<b>+919898962659</b></div></div></div></div></div></div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, May 30, 2020 at 5:47 PM Saint Michael <<a href="mailto:venefax@gmail.com">venefax@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">I need to add a new SIP header to the response below.<span class="gmail_default" style="font-size:small"></span><br><br><br>if ($rm=="INVITE") {<br>    /* add the redirect destinations as branches */<br>    $branch = "<a href="mailto:sip%3Abatman@gotham.com" target="_blank">sip:batman@gotham.com</a>";<br>    $branch = $avp(my_custom_uri);<br>    /* sending a 3xx reply will automatically push all<br>     * existing branches as Contact URIs */<br>    send_reply("302","Moved Temporarily");<br>    exit;<br>}<div><div class="gmail_default" style="font-size:small">the final result should be:</div><br></div><div><div class="gmail_default" style="font-size:small">SIP/2.0 302 Moved Temporarily</div>Via: SIP/2.0/UDP 172.16.7.254:52169;rport=52169;received=47.205.172.89;branch=z9hG4bK-524287-1---129f4244aaba9f04<br>Call-ID: 102650Mzg4NmFiNTQzOGY5NDJmNjM3OTYzNmE5MzNlZDIwZmI<br>From: "<span class="gmail_default" style="font-size:small">XXXXX</span>" <sip:<span class="gmail_default" style="font-size:small">XXX</span>4433019@<span class="gmail_default" style="font-size:small">XXX</span>.124.224.87>;tag=81a25c36<br>To: <sip:16317918378@<span class="gmail_default" style="font-size:small">XXX</span>.124.224.87>;tag=9e198dc4-7ce8-433d-ae23-05b9bc14d55a</div><div><div class="gmail_default" style="font-size:small">Identity:eyJhbGciOiJFUzI1NiIsInR5cCI6InBhc3Nwb3J0IiwicHB0Ijoic2hha2VuIiwieDV1IjoiaHR0cHM6Ly9jZXJ0LmV4YW1wbGUub3JnL3Bhc3Nwb3J0LmNlciJ9.eyJhdHRlc3QiOiJBIiwiZGVzdCI6eyJ0biI6WyI2MzE3OTE4Mzc4Il19LCJpYXQiOjE1OTA4MTEyMzgsIm9yaWciOnsidG4iOiI3Mjc0NDMzMDE5In0sIm9yaWdpZCI6IjEyM2U0NTY3LWU4OWItMTJkMy1hNDU2LTQyNjY1NTQ0MDAwMCJ9.AKViDWA3uonP6tt5cKBh0FUPY5zBuJnwZLQNTrp9LCWJ-vLY1Xx5i3_oXGh1ERL4tnD-KK5wsP3FdByDa_cjGw;info=<<a href="https://cert.example.org/passport.cer" target="_blank">https://cert.example.org/passport.cer</a>>;alg=ES256;ppt=shaken</div>CSeq: 1 INVITE<br>Server: Asterisk PBX 16.10.0<br>Contact: <sip:16317918378><br>Reason: Q.850;cause=0<br><div class="gmail_default" style="font-size:small">Content-Length:  0</div><br></div><div><div class="gmail_default" style="font-size:small">also if I get that packet at my end, how do I extract the Identity header and apply it to the next INVITE?</div><div class="gmail_default" style="font-size:small">Is this even doable?</div><div class="gmail_default" style="font-size:small"></div><br></div><div><br></div><div><br></div></div>
_______________________________________________<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" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</blockquote></div>

<br>
<div><font face="Arial" size="2" style="background-color:white" color="#808080"><b>Disclaimer</b></font></div><div><div><span style="background-color:white;color:rgb(128,128,128);font-family:Arial;font-size:small">In addition to generic Disclaimer which you have agreed on our website, any views or opinions presented in this email are solely those of the originator and do not necessarily represent those of the Company or its sister concerns. Any liability (in negligence, contract or otherwise) arising from any third party taking any action, or refraining from taking any action on the basis of any of the information contained in this email is hereby excluded.</span></div></div><div><span style="background-color:white;color:rgb(128,128,128);font-family:Arial;font-size:small"><br></span></div><div><font face="Arial" size="2" style="background-color:white" color="#808080"><b>Confidentiality</b></font></div><div><font face="Arial" size="2" style="background-color:white" color="#808080">This communication (including any attachment/s) is intended only for the use of the addressee(s) and contains information that is PRIVILEGED AND CONFIDENTIAL. Unauthorized reading, dissemination, distribution, or copying of this communication is prohibited. Please inform originator if you have received it in error.</font></div><div><font face="Arial" size="2" style="background-color:white" color="#808080"><br></font></div><div><span style="background-color:white;color:rgb(128,128,128);font-family:Arial;font-size:small"><b>Caution for viruses, malware etc.</b></span></div><div><font face="Arial" size="2" style="background-color:white" color="#808080">This communication, including any attachments, may not be free of viruses, trojans, similar or new contaminants/malware, interceptions or interference, and may not be compatible with your systems. You shall carry out virus/malware scanning on your own before opening any attachment to this e-mail. The sender of this e-mail and Company including its sister concerns shall not be liable for any damage that may incur to you as a result of viruses, incompleteness of this message, a delay in receipt of this message or any other computer problems. </font></div>