Thanks all. Apologies for my confusion and misunderstanding.
I have now tried it, and it does indeed work in the way I want. On Wed, 9 Oct 2019 at 14:33, David Villasmil <[email protected]> wrote: > 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. > > On Wed, 9 Oct 2019 at 14:26, Ben Newlin <[email protected]> wrote: > >> 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. >> >> >> >> 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. >> >> >> >> [1] https://www.opensips.org/Documentation/Script-Routes-2-4#toc4 >> >> [2] https://opensips.org/html/docs/modules/2.4.x/tm.html#func_t_on_reply >> >> [3] >> https://opensips.org/html/docs/modules/2.4.x/tm.html#func_t_check_status >> >> >> >> >> >> Ben Newlin >> >> >> >> *From: *Users <[email protected]> on behalf of David >> Villasmil <[email protected]> >> *Reply-To: *OpenSIPS users mailling list <[email protected]> >> *Date: *Wednesday, October 9, 2019 at 5:42 AM >> *To: *OpenSIPS users mailling list <[email protected]> >> *Subject: *Re: [OpenSIPS-Users] Convert 183 to 180? >> >> >> >> That’s exactly what it does. You might want to check for the absence of >> sdp with >> >> >> >> if(has_body("application/sdp")) >> >> >> >> On Wed, 9 Oct 2019 at 10:03, solarmon <[email protected]> wrote: >> >> Hi, >> >> >> >> 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. >> >> >> >> 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. >> >> >> >> 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. >> >> >> >> Will this change_reply_status() function allow us to do that? >> >> >> >> On Mon, 7 Oct 2019 at 14:23, solarmon <[email protected]> wrote: >> >> Hi, >> >> >> >> Thanks. I forgot to say that I'm using openSIPS 2.4.x, but the same >> function is available for it too: >> >> >> >> >> https://opensips.org/html/docs/modules/2.4.x/sipmsgops.html#change_reply_status >> >> >> >> >> Thanks for the tip! >> >> >> >> >> >> [image: Image removed by sender.] >> <http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail> >> >> Virus-free. www.avg.com >> <http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail> >> >> >> >> On Mon, 7 Oct 2019 at 14:00, Ben Newlin <[email protected]> wrote: >> >> I think you are looking for this: >> https://opensips.org/html/docs/modules/3.0.x/sipmsgops.html#change_reply_status >> >> >> >> Ben Newlin >> >> >> >> *From: *Users <[email protected]> on behalf of solarmon < >> [email protected]> >> *Reply-To: *OpenSIPS users mailling list <[email protected]> >> *Date: *Monday, October 7, 2019 at 5:15 AM >> *To: *OpenSIPS users mailling list <[email protected]> >> *Subject: *[OpenSIPS-Users] Convert 183 to 180? >> >> >> >> Hi, >> >> >> >> 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. >> >> >> >> 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? >> >> >> >> Thank you in advance for any help. >> >> >> >> *Error! Filename not specified.* >> <http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail> >> >> Virus-free. www.avg.com >> <http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail> >> >> >> >> _______________________________________________ >> Users mailing list >> [email protected] >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users >> >> _______________________________________________ >> Users mailing list >> [email protected] >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users >> >> -- >> >> Regards, >> >> >> >> David Villasmil >> >> email: [email protected] >> >> phone: +34669448337 >> _______________________________________________ >> Users mailing list >> [email protected] >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users >> > -- > Regards, > > David Villasmil > email: [email protected] > phone: +34669448337 > _______________________________________________ > Users mailing list > [email protected] > http://lists.opensips.org/cgi-bin/mailman/listinfo/users >
_______________________________________________ Users mailing list [email protected] http://lists.opensips.org/cgi-bin/mailman/listinfo/users
