[SR-Users] Regular Expression Evaluation
Mack Hendricks
mack at dopensource.com
Wed Sep 9 21:47:26 CEST 2020
Cool...I will use that
Thanks
On Wed, Sep 9, 2020 at 3:45 PM Fred Posner <fred at palner.com> wrote:
> +1: is_in_subnet is phenomenal...
>
>
>
> --fred
>
>
>
> On Wed, 2020-09-09 at 19:40 +0000, Henning Westerholt wrote:
>
> > Hi Mack,
>
> >
>
> > This might be easier:
>
> >
> https://kamailio.org/docs/modules/devel/modules/ipops.html#ipops.f.is_in_subnet
>
> >
>
> > Cheers,
>
> >
>
> > Henning
>
> >
>
> > --
>
> > Henning Westerholt – https://skalatan.de/blog/
>
> > Kamailio services – https://gilawa.com
>
> >
>
> > -----Original Message-----
>
> > From: sr-users <sr-users-bounces at lists.kamailio.org> On Behalf Of
>
> > Mack Hendricks
>
> > Sent: Wednesday, September 9, 2020 9:35 PM
>
> > To: Kamailio - Users Mailing List <sr-users at lists.kamailio.org>
>
> > Subject: [SR-Users] Regular Expression Evaluation
>
> >
>
> > I already run into issues with this. If I want to only execute a
>
> > statement if it’s an INVITE with a request domain of 10.10.*.* how
>
> > do I format? Below is what I have. I always have to play with it
>
> > a bit. Looking to get a better understanding. The regular
>
> > expression tester I’m using states that it’s valid. What am I doing
>
> > wrong?
>
> >
>
> > if ((is_method("INVITE")) && ($rd =~ "10\.10\..+")) {
>
> >
>
> > # Do something
>
> > xlog("fix got a 10.10 address");
>
> >
>
> > }
>
> >
>
> > Thanks
>
> > _______________________________________________
>
> > Kamailio (SER) - Users Mailing List
>
> > sr-users at lists.kamailio.org
>
> > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
> > _______________________________________________
>
> > Kamailio (SER) - Users Mailing List
>
> > sr-users at lists.kamailio.org
>
> > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
>
>
>
>
> _______________________________________________
>
> Kamailio (SER) - Users Mailing List
>
> sr-users at lists.kamailio.org
>
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20200909/e0d3f9b0/attachment.htm>
More information about the sr-users
mailing list