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