<div dir="ltr">Thanks all.<div><br></div><div>Apologies for my confusion and misunderstanding.</div><div><br></div><div>I have now tried it, and it does indeed work in the way I want.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 9 Oct 2019 at 14:33, David Villasmil <<a href="mailto:david.villasmil.work@gmail.com">david.villasmil.work@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><div dir="auto">I think he’s just confused thinking that would change the reply TO THE provider. But this is not the case, the reply 183 comes FROM the provider and by “intercepting” it and changing it to 180, it’s the 180 what goes to the caller.</div></div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 9 Oct 2019 at 14:26, Ben Newlin <<a href="mailto:Ben.Newlin@genesys.com" target="_blank">Ben.Newlin@genesys.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 lang="EN-US">
<div>
<p class="MsoNormal">You are trying to change a reply because the 183 response is a reply to the INVITE. It is not the final reply, but it is still a reply. In fact, the change_reply_status function explicitly does not allow you to change final replies, only
provisional replies like 1xx.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">You need to use an onreply_route [1], either the global one or a transaction one using t_on_reply [2], and the in that reply route you will check if the response is 183 (t_check_status [3]) and if it is use change_reply_status to change
it to a 180.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">[1] <a href="https://www.opensips.org/Documentation/Script-Routes-2-4#toc4" target="_blank">
https://www.opensips.org/Documentation/Script-Routes-2-4#toc4</a><u></u><u></u></p>
<p class="MsoNormal">[2] <a href="https://opensips.org/html/docs/modules/2.4.x/tm.html#func_t_on_reply" target="_blank">
https://opensips.org/html/docs/modules/2.4.x/tm.html#func_t_on_reply</a><u></u><u></u></p>
<p class="MsoNormal">[3] <a href="https://opensips.org/html/docs/modules/2.4.x/tm.html#func_t_check_status" target="_blank">
https://opensips.org/html/docs/modules/2.4.x/tm.html#func_t_check_status</a><u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal"><span style="color:black">Ben Newlin </span><u></u><u></u></p>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div style="border-right:none;border-bottom:none;border-left:none;border-top:1pt solid rgb(181,196,223);padding:3pt 0in 0in">
<p class="MsoNormal"><b><span style="font-size:12pt;color:black">From: </span></b><span style="font-size:12pt;color:black">Users <<a href="mailto:users-bounces@lists.opensips.org" target="_blank">users-bounces@lists.opensips.org</a>> on behalf of David Villasmil <<a href="mailto:david.villasmil.work@gmail.com" target="_blank">david.villasmil.work@gmail.com</a>><br>
<b>Reply-To: </b>OpenSIPS users mailling list <<a href="mailto:users@lists.opensips.org" target="_blank">users@lists.opensips.org</a>><br>
<b>Date: </b>Wednesday, October 9, 2019 at 5:42 AM<br>
<b>To: </b>OpenSIPS users mailling list <<a href="mailto:users@lists.opensips.org" target="_blank">users@lists.opensips.org</a>><br>
<b>Subject: </b>Re: [OpenSIPS-Users] Convert 183 to 180?<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<div>
<p class="MsoNormal">That’s exactly what it does. You might want to check for the absence of sdp with <u></u><u></u></p>
</div>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<div style="border:1pt solid rgb(153,204,204);padding:0in 0in 0in 15pt;background:rgb(252,255,252)">
<pre style="background:rgb(252,255,252);border:none;padding:0in;border-radius:2.5px;overflow:auto"><span style="color:black">if(has_body("application/sdp"))</span><u></u><u></u></pre>
</div>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">On Wed, 9 Oct 2019 at 10:03, solarmon <<a href="mailto:solarmon@one-n.co.uk" target="_blank">solarmon@one-n.co.uk</a>> wrote:<u></u><u></u></p>
</div>
<blockquote style="border-top:none;border-right:none;border-bottom:none;border-left:1pt solid rgb(204,204,204);padding:0in 0in 0in 6pt;margin-left:4.8pt;margin-right:0in">
<div>
<p class="MsoNormal">Hi, <u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Had a quick look at the change_reply_status() function and I'm a bit unsure as it suitability for what I am wanting to do.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Our setup has opensips sitting between our system and a SIP provider. The 183 is coming from SIP provider and I would like to convert this to 180 before passing it on to our system.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">The documentation for change_reply_status() suggest it is used to "Intercept a SIP reply". I am not looking to change a 'reply' to the SIP provider, or to our system. I want to convert the 183 message from the SIP provider and pass it on
as 180 to our system.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Will this change_reply_status() function allow us to do that?<u></u><u></u></p>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">On Mon, 7 Oct 2019 at 14:23, solarmon <<a href="mailto:solarmon@one-n.co.uk" target="_blank">solarmon@one-n.co.uk</a>> wrote:<u></u><u></u></p>
</div>
<blockquote style="border-top:none;border-right:none;border-bottom:none;border-left:1pt solid rgb(204,204,204);padding:0in 0in 0in 6pt;margin-left:4.8pt;margin-right:0in">
<div>
<p class="MsoNormal">Hi, <u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Thanks. I forgot to say that I'm using openSIPS 2.4.x, but the same function is available for it too:<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"><a href="https://opensips.org/html/docs/modules/2.4.x/sipmsgops.html#change_reply_status" target="_blank">https://opensips.org/html/docs/modules/2.4.x/sipmsgops.html#change_reply_status</a> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Thanks for the tip!<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
</div>
<div id="gmail-m_6245657239378441444m_4104139945446999537m_1222389664913481817gmail-m_-6109930205533376420DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2">
<p class="MsoNormal"><u></u> <u></u></p>
<table border="1" cellpadding="0" style="border-right:none;border-bottom:none;border-left:none;border-top:1pt solid rgb(211,212,222)">
<tbody>
<tr>
<td width="55" style="width:41.25pt;border:none;padding:9.75pt 0.75pt 0.75pt">
<p class="MsoNormal"><a href="http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail" target="_blank"><span style="color:windowtext;text-decoration:none"><span style="color:blue;border:1pt solid windowtext;padding:0in"><img border="0" width="46" height="29" style="width: 0.4791in; height: 0.302in;" id="gmail-m_6245657239378441444m_4104139945446999537_x0000_i1025" alt="Image removed by sender."></span></span></a><u></u><u></u></p>
</td>
<td width="470" style="width:352.5pt;border:none;padding:9pt 0.75pt 0.75pt">
<p class="MsoNormal" style="line-height:13.5pt"><span style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(65,66,78)">Virus-free.
<a href="http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail" target="_blank">
<span style="color:rgb(68,83,234)">www.avg.com</span></a> <u></u><u></u></span></p>
</td>
</tr>
</tbody>
</table>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">On Mon, 7 Oct 2019 at 14:00, Ben Newlin <<a href="mailto:Ben.Newlin@genesys.com" target="_blank">Ben.Newlin@genesys.com</a>> wrote:<u></u><u></u></p>
</div>
<blockquote style="border-top:none;border-right:none;border-bottom:none;border-left:1pt solid rgb(204,204,204);padding:0in 0in 0in 6pt;margin-left:4.8pt;margin-right:0in">
<div>
<div>
<p class="MsoNormal">I think you are looking for this:
<a href="https://opensips.org/html/docs/modules/3.0.x/sipmsgops.html#change_reply_status" target="_blank">
https://opensips.org/html/docs/modules/3.0.x/sipmsgops.html#change_reply_status</a><u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<div>
<p class="MsoNormal"><span style="color:black">Ben Newlin
</span><u></u><u></u></p>
</div>
<p class="MsoNormal"> <u></u><u></u></p>
<div style="border-right:none;border-bottom:none;border-left:none;border-top:1pt solid rgb(181,196,223);padding:3pt 0in 0in">
<p class="MsoNormal"><b><span style="font-size:12pt;color:black">From:
</span></b><span style="font-size:12pt;color:black">Users <<a href="mailto:users-bounces@lists.opensips.org" target="_blank">users-bounces@lists.opensips.org</a>> on behalf of solarmon <<a href="mailto:solarmon@one-n.co.uk" target="_blank">solarmon@one-n.co.uk</a>><br>
<b>Reply-To: </b>OpenSIPS users mailling list <<a href="mailto:users@lists.opensips.org" target="_blank">users@lists.opensips.org</a>><br>
<b>Date: </b>Monday, October 7, 2019 at 5:15 AM<br>
<b>To: </b>OpenSIPS users mailling list <<a href="mailto:users@lists.opensips.org" target="_blank">users@lists.opensips.org</a>><br>
<b>Subject: </b>[OpenSIPS-Users] Convert 183 to 180?</span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Hi,
<u></u><u></u></p>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Our system connected to openSIPS is not handling 183 (with and without SDP) very well and is non-trivial for us to try to change the behavior. If we receive an initial 183 without
SDP, it does not processed a subsequent 183 with SDP.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">We would like to explore how 183 (with and without SDP) can be converted to 180 (with and without SDP) see if this can resolve our issues. Can this be achieved and are there any
examples of how this could be done?<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Thank you in advance for any help.<u></u><u></u></p>
</div>
</div>
<div id="gmail-m_6245657239378441444m_4104139945446999537m_1222389664913481817gmail-m_-6109930205533376420gmail-m_2423867242150397947DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2">
<p class="MsoNormal"> <u></u><u></u></p>
<table border="1" cellpadding="0" style="border-right:none;border-bottom:none;border-left:none;border-top:1pt solid rgb(211,212,222)">
<tbody>
<tr>
<td width="55" style="width:41.25pt;border:none;padding:9.75pt 0.75pt 0.75pt">
<p class="MsoNormal"><a href="http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail" target="_blank"><span style="border:1pt solid windowtext;padding:0in;text-decoration:none"><b>Error!
Filename not specified.</b></span></a><u></u><u></u></p>
</td>
<td width="470" style="width:352.5pt;border:none;padding:9pt 0.75pt 0.75pt">
<p class="MsoNormal" style="line-height:13.5pt">
<span style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(65,66,78)">Virus-free.
<a href="http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail" target="_blank">
<span style="color:rgb(68,83,234)">www.avg.com</span></a> </span><u></u><u></u></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><span style="color:white"> </span><u></u><u></u></p>
</div>
</div>
</div></blockquote></div></blockquote></div></blockquote></div></div></div></div><div lang="EN-US"><div><div><div><blockquote style="border-top:none;border-right:none;border-bottom:none;border-left:1pt solid rgb(204,204,204);padding:0in 0in 0in 6pt;margin-left:4.8pt;margin-right:0in"><div><blockquote style="border-top:none;border-right:none;border-bottom:none;border-left:1pt solid rgb(204,204,204);padding:0in 0in 0in 6pt;margin-left:4.8pt;margin-right:0in"><div><blockquote style="border-top:none;border-right:none;border-bottom:none;border-left:1pt solid rgb(204,204,204);padding:0in 0in 0in 6pt;margin-left:4.8pt;margin-right:0in">
<p class="MsoNormal">_______________________________________________<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" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><u></u><u></u></p>
</blockquote>
</div>
</blockquote>
</div>
<p class="MsoNormal">_______________________________________________<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" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><u></u><u></u></p>
</blockquote>
</div>
</div>
<p class="MsoNormal">-- <u></u><u></u></p>
<div>
<div>
<div>
<p class="MsoNormal">Regards,<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<p class="MsoNormal">David Villasmil <u></u><u></u></p>
<div>
<p class="MsoNormal">email: <a href="mailto:david.villasmil.work@gmail.com" target="_blank">
david.villasmil.work@gmail.com</a><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">phone: +34669448337<u></u><u></u></p>
</div>
</div>
</div>
</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></div>-- <br><div dir="ltr"><div dir="ltr"><div>Regards,</div><div><br></div>David Villasmil<div>email: <a href="mailto:david.villasmil.work@gmail.com" target="_blank">david.villasmil.work@gmail.com</a></div><div>phone: +34669448337</div></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>