[SR-Users] Regular exepression issue in permissions module

Daniel-Constantin Mierla miconda at gmail.com
Fri Feb 9 13:36:22 CET 2018


On 09.02.18 12:25, Paulo Ferreira wrote:
> Hi list,
> I'm testing permissions module with kamailio 5.1.1 and I was struggling
> with regular expressions in trusted requests part of module.
> I noticed that 9[0-9]{4} doesn't work as expected so I had to change it
> for 9[0-9][0-9][0-9][0-9] to work.
> Is it supposed to be like that? 
> Is there other way in this module to simplify the expression since it
> is not accepting the POSIX way?
it should be postfix regexp, at a matter of fact, the input is passed to
the regexp implementation in libc, it is not written from scratch by
kamailio. I have seen in the past some situations that a regexp didn't
work as expect on various versions of operating systems.

Can you try and see if 9([0-9]){4} works?

Otherwise, try with debug=3 in kamailio.cfg and see if you can spot some
useful debug messages.


Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - March 5-7, 2018, Berlin - www.asipto.com
Kamailio World Conference - May 14-16, 2018 - www.kamailioworld.com

More information about the sr-users mailing list