[SR-Users] regular expression question
Satish Patel
satish.txt at gmail.com
Tue Dec 13 21:25:12 CET 2016
It works! but it doesn't work when i tried to use with wildcard (*) like
if(!($ua =~ "*Foo")){
On Sat, Dec 10, 2016 at 1:24 AM, Brandon Armstead <brandon at cryy.com> wrote:
> 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
>
> _______________________________________________
> 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
>
More information about the sr-users
mailing list