[OpenSIPS-Users] Check IP Prefix

Ali Alawi goatolina at gmail.com
Fri Dec 10 20:05:54 UTC 2021


Dear Bin,
I got it, thanks for your reply.

On Fri, Dec 10, 2021 at 10:23 PM Ben Newlin <Ben.Newlin at genesys.com> wrote:

> Ali,
>
>
>
> You can use the regex operator [1]. For example,
>
>
>
> If (src_ip =~ “^192*”)
>
>
>
> [1] https://www.opensips.org/Documentation/Script-Statements-3-2#toc1
>
>
>
>
>
> Ben Newlin
>
>
>
> *From: *Users <users-bounces at lists.opensips.org> on behalf of Ali Alawi <
> goatolina at gmail.com>
> *Date: *Friday, December 10, 2021 at 2:00 PM
> *To: *OpenSIPS users mailling list <users at lists.opensips.org>
> *Subject: *[OpenSIPS-Users] Check IP Prefix
>
> Hello everyone,
>
>
>
> Is there a way to conditionally check only the first byte of the IP?
>
> for example, can I have something like if(src_ip==192.x.x.x)
>
>
>
> Regards,
>
> Ali
>
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20211210/71928cc5/attachment.html>


More information about the Users mailing list