[SR-Users] regular expression question

Brandon Armstead brandon at cryy.com
Sat Dec 10 07:24:47 CET 2016


if(!($ua =~ "")){
On Fri, Dec 9, 2016 at 7:04 AM Satish Patel <satish.txt at gmail.com> wrote:

> I am trying to block SIP scanner so i am trying to use following logic
>
> only allow "My-UserAgent" and block rest but its throwing error, but
>
> if i use  =~ regular expression which works! why negative match
>
> doesn't work?
>
>
>
> if($ua !~ "(My-UserAgent") {
>
>                    xlog("L_INFO","On more scriptkiddie, coming from
>
> $si, blocking");
>
>                    exit;
>
>                 }
>
>
>
>
>
> what could be wrong here?
>
>
>
> _______________________________________________
>
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>
> sr-users at lists.sip-router.org
>
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
> --
Sent from Gmail Mobile
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20161210/a648617d/attachment.html>


More information about the sr-users mailing list