Re: [OpenSIPS-Users] reject 3xx code

2016-08-19 Thread Denis
Hello, Bogdan

I understand, thank you very much.

mailto:denis7...@mail.ru


Hi Denis,

3xx is a final response and it cannot be simply drop (as will let the 
transaction state machine in an ambiguous state). Not to mention that you will 
de-syncronize the callee side (which rejected the call) and the caller side 
(still waiting for a final answer).

What you can do is to replace the 3xx with another final negative reply. Use a 
failure_route to do that:

failure_route[block_redirect]
{
if (t_check_status("3[0-9][0-9]))
t_reply("404","Not Found");
}

Regards,
 
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 18.08.2016 11:58, Denis wrote:

reject 3xx code Hello

I am using Opensips 2.1.2.
I want to block sending 3xx codes to caller.

In reply route i wrote such code 
if (status=~"30[1,2]") {
 drop();
}

but i see that 302, for example, still process successfully.

Thank you for any help.

-- 
mailto:denis7...@mail.ru 

___

Users mailing list

Users@lists.opensips.org

http://lists.opensips.org/cgi-bin/mailman/listinfo/users

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] reject 3xx code

2016-08-19 Thread Bogdan-Andrei Iancu

Hi Denis,

3xx is a final response and it cannot be simply drop (as will let the 
transaction state machine in an ambiguous state). Not to mention that 
you will de-syncronize the callee side (which rejected the call) and the 
caller side (still waiting for a final answer).


What you can do is to replace the 3xx with another final negative reply. 
Use a failure_route to do that:


failure_route[block_redirect]
{
if (t_check_status("3[0-9][0-9]))
t_reply("404","Not Found");
}

Regards,

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

On 18.08.2016 11:58, Denis wrote:

reject 3xx code Hello

I am using Opensips 2.1.2.
I want to block sending 3xx codes to caller.

In reply route i wrote such code
if (status=~"30[1,2]") {
 drop();
}

but i see that 302, for example, still process successfully.

Thank you for any help.

/--
/mailto:denis7...@mail.ru


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] reject 3xx code

2016-08-18 Thread Newlin, Ben
I see now that status is a global parameter that should also be the reply 
status.

I would still recommend using t_check_status().


Ben Newlin

From: <users-boun...@lists.opensips.org> on behalf of "Newlin, Ben" 
<ben.new...@inin.com>
Reply-To: OpenSIPS users mailling list <users@lists.opensips.org>
Date: Thursday, August 18, 2016 at 8:49 AM
To: OpenSIPS users mailling list <users@lists.opensips.org>
Subject: Re: [OpenSIPS-Users] reject 3xx code

The comma in your regex is unnecessary; it allows a match for “30,”. It should 
just be “30[12]”.

Also, where is the status variable being set from? There are two places to get 
the return code: $rs and $T_reply_code.

Or you could use t_check_status() like so:

if (t_check_status(“30[12]”)) {
  drop();
}


Ben Newlin

From: <users-boun...@lists.opensips.org> on behalf of Denis <denis7...@mail.ru>
Reply-To: OpenSIPS users mailling list <users@lists.opensips.org>
Date: Thursday, August 18, 2016 at 4:58 AM
To: "users@lists.opensips.org" <users@lists.opensips.org>
Subject: [OpenSIPS-Users] reject 3xx code

Hello

I am using Opensips 2.1.2.
I want to block sending 3xx codes to caller.

In reply route i wrote such code
if (status=~"30[1,2]") {
 drop();
}

but i see that 302, for example, still process successfully.

Thank you for any help.

--
mailto:denis7...@mail.ru
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] reject 3xx code

2016-08-18 Thread Newlin, Ben
The comma in your regex is unnecessary; it allows a match for “30,”. It should 
just be “30[12]”.

Also, where is the status variable being set from? There are two places to get 
the return code: $rs and $T_reply_code.

Or you could use t_check_status() like so:

if (t_check_status(“30[12]”)) {
  drop();
}


Ben Newlin

From: <users-boun...@lists.opensips.org> on behalf of Denis <denis7...@mail.ru>
Reply-To: OpenSIPS users mailling list <users@lists.opensips.org>
Date: Thursday, August 18, 2016 at 4:58 AM
To: "users@lists.opensips.org" <users@lists.opensips.org>
Subject: [OpenSIPS-Users] reject 3xx code

Hello

I am using Opensips 2.1.2.
I want to block sending 3xx codes to caller.

In reply route i wrote such code
if (status=~"30[1,2]") {
 drop();
}

but i see that 302, for example, still process successfully.

Thank you for any help.

--
mailto:denis7...@mail.ru
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] reject 3xx code

2016-08-18 Thread Denis
Alex, and how can i do it replay route?
exit, drop, t_relay something else?



-- 
mailto:denis7...@mail.ru

> It can certainly be done in the onreply_route. 

> Conceptually, doing it there makes more sense. The failure_route is
> not triggered by any particular SIP reply per se, but rather a
> branch failure event on a transaction. That can be the result of a
> timeout (e.g. fr_timer) or something else that doesn't gather message form.

> In contrast, onreply_route is for actual reply messages. 


> -- Alex

> --
> Principal, Evariste Systems LLC (www.evaristesys.com)

> Sent from my Google Nexus.


> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] reject 3xx code

2016-08-18 Thread Alex Balashov
It can certainly be done in the onreply_route. 

Conceptually, doing it there makes more sense. The failure_route is not 
triggered by any particular SIP reply per se, but rather a branch failure event 
on a transaction. That can be the result of a timeout (e.g. fr_timer) or 
something else that doesn't gather message form. 

In contrast, onreply_route is for actual reply messages. 


-- Alex

--
Principal, Evariste Systems LLC (www.evaristesys.com)

Sent from my Google Nexus.


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] reject 3xx code

2016-08-18 Thread Denis
Hello

I am using Opensips 2.1.2.
I want to block sending 3xx codes to caller.

In reply route i wrote such code 
 if (status=~"30[1,2]") {
  drop();
 }

but i see that 302, for example, still process successfully.

Thank you for any help.

-- 
mailto:denis7...@mail.ru___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users