[OpenSIPS-Users] reject 3xx code

Newlin, Ben Ben.Newlin at inin.com
Thu Aug 18 14:56:07 CEST 2016


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-bounces at lists.opensips.org> on behalf of "Newlin, Ben" <Ben.Newlin at inin.com>
Reply-To: OpenSIPS users mailling list <users at lists.opensips.org>
Date: Thursday, August 18, 2016 at 8:49 AM
To: OpenSIPS users mailling list <users at 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-bounces at lists.opensips.org> on behalf of Denis <denis7979 at mail.ru>
Reply-To: OpenSIPS users mailling list <users at lists.opensips.org>
Date: Thursday, August 18, 2016 at 4:58 AM
To: "users at lists.opensips.org" <users at 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:denis7979 at mail.ru
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20160818/836580ef/attachment.htm>


More information about the Users mailing list