[OpenSIPS-Users] reject 3xx code

Newlin, Ben Ben.Newlin at inin.com
Thu Aug 18 14:49:57 CEST 2016


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/eb5644df/attachment.htm>


More information about the Users mailing list