How to change SIP response code?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

How to change SIP response code?

Самусенко Андрей
Hello. OpenSIPs 2.2.2

Continue http://www.opensips.org/pipermail/users/2009-September/008294.html

"failure_route[1] {

        if (t_check_status("500")) {
                if (  $(<reply>hdr(Disconnected)) != NULL )  {
                        t_reply("480", "Temporarily Unavailable");
                        break;
                }
        }

}" - does not work. Because "$(<reply>hdr(Disconnected))" equal NULL.



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to change SIP response code?

Bogdan-Andrei Iancu-2
Hi Andrej,

Is there any parallel forking ? And, are you sure that the 500 reply has
a Disconnected header ?

Best regards,

Bogdan-Andrei Iancu
   OpenSIPS Founder and Developer
   http://www.opensips-solutions.com

OpenSIPS Summit May 2017 Amsterdam
   http://www.opensips.org/events/Summit-2017Amsterdam.html

On 04/13/2017 01:19 PM, Самусенко Андрей wrote:

> Hello. OpenSIPs 2.2.2
>
> Continue http://www.opensips.org/pipermail/users/2009-September/008294.html
>
> "failure_route[1] {
>
>          if (t_check_status("500")) {
>                  if (  $(<reply>hdr(Disconnected)) != NULL )  {
>                          t_reply("480", "Temporarily Unavailable");
>                          break;
>                  }
>          }
>
> }" - does not work. Because "$(<reply>hdr(Disconnected))" equal NULL.
>
>
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to change SIP response code?

Bogdan-Andrei Iancu-2
I meant "SIP parallel forking" :)

Anyhow, looking at the Python code, the "Disconnect" is not a header,
but the reply reason phrase, so try:
     if ( $(<reply>rr)=="Disconnected" )

Regards,

Bogdan-Andrei Iancu
   OpenSIPS Founder and Developer
   http://www.opensips-solutions.com

OpenSIPS Summit May 2017 Amsterdam
   http://www.opensips.org/events/Summit-2017Amsterdam.html

On 04/13/2017 06:19 PM, Самусенко Андрей wrote:

>> Is there any parallel forking ?
> What is parallel forking? children != 0
>> And, are you sure that the 500 reply has a Disconnected header ?
> Yes, SIP/2.0 500 Disconnected - from sippy/b2bua
> https://github.com/sippy/b2bua/blob/master/sippy/UasStateRinging.py line 107
>
> On четверг, 13 апреля 2017 г. 17:03:48 MSK you wrote:
>> Hi Andrej,
>>
>> Is there any parallel forking ? And, are you sure that the 500 reply has
>> a Disconnected header ?
>>
>> Best regards,
>>
>> Bogdan-Andrei Iancu
>>     OpenSIPS Founder and Developer
>>     http://www.opensips-solutions.com
>>
>> OpenSIPS Summit May 2017 Amsterdam
>>     http://www.opensips.org/events/Summit-2017Amsterdam.html
>>
>> On 04/13/2017 01:19 PM, Самусенко Андрей wrote:
>>> Hello. OpenSIPs 2.2.2
>>>
>>> Continue
>>> http://www.opensips.org/pipermail/users/2009-September/008294.html
>>>
>>> "failure_route[1] {
>>>
>>>           if (t_check_status("500")) {
>>>          
>>>                   if (  $(<reply>hdr(Disconnected)) != NULL )  {
>>>                  
>>>                           t_reply("480", "Temporarily Unavailable");
>>>                           break;
>>>                  
>>>                   }
>>>          
>>>           }
>>>
>>> }" - does not work. Because "$(<reply>hdr(Disconnected))" equal NULL.
>>>
>>>
>>>
>>> _______________________________________________
>>> Users mailing list
>>> [hidden email]
>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Loading...