Dear Bin, I got it, thanks for your reply. On Fri, Dec 10, 2021 at 10:23 PM Ben Newlin <[email protected]> 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 <[email protected]> on behalf of Ali Alawi < > [email protected]> > *Date: *Friday, December 10, 2021 at 2:00 PM > *To: *OpenSIPS users mailling list <[email protected]> > *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 > [email protected] > http://lists.opensips.org/cgi-bin/mailman/listinfo/users >
_______________________________________________ Users mailing list [email protected] http://lists.opensips.org/cgi-bin/mailman/listinfo/users
