[OpenSIPS-Users] In opensips config I wanted to match a source IP in a CIDR range .

Ben Newlin Ben.Newlin at genesys.com
Wed Feb 19 14:38:31 UTC 2025


You can also use the ip.matches transformation [1]. It accepts a variable for the CIDR so you can source it from anywhere you would like – DB, cache, hard code it, whatever.

[1] - https://www.opensips.org/Documentation/Script-Tran-3-4#toc90

Ben Newlin

From: Users <users-bounces at lists.opensips.org> on behalf of Alexey <slackway2me at gmail.com>
Date: Wednesday, February 19, 2025 at 6:35 AM
To: users at lists.opensips.org <users at lists.opensips.org>
Subject: Re: [OpenSIPS-Users] In opensips config I wanted to match a source IP in a CIDR range .
 EXTERNAL EMAIL - Please use caution with links and attachments

Moreover, you can filter requests using plain text files
consisting of pairs (e.g. uri - from address) and filter
REGISTERs/INVITEs this way [1] , [2] , [3] .

And if you need some real-world examples,
you may have a look at these erticles either [4] , [5] .


[1] https://opensips.org/docs/modules/3.4.x/permissions.html#sec-call-routing
[2] https://opensips.org/docs/modules/3.4.x/permissions.html#sec-registration-permissions
[2] https://opensips.org/docs/modules/3.4.x/permissions.html#sec-uri-permissions

[4] https://alexeyka.zantsev.com/?p=1109
[5] https://alexeyka.zantsev.com/?p=1348

--
best regards, Alexey
https://alexeyka.zantsev.com

_______________________________________________
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/20250219/419596b8/attachment.html>


More information about the Users mailing list