[OpenSIPS-Users] Check IP Prefix

Ben Newlin Ben.Newlin at genesys.com
Fri Dec 10 19:20:54 UTC 2021


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)


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20211210/ccbfd203/attachment.html>

More information about the Users mailing list