<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Aptos;
panose-1:2 11 0 4 2 2 2 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:10.0pt;
font-family:"Aptos",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;
mso-ligatures:none;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style>
</head>
<body lang="EN-US" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt">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.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">[1] - <a href="https://www.opensips.org/Documentation/Script-Tran-3-4#toc90">
https://www.opensips.org/Documentation/Script-Tran-3-4#toc90</a><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">Ben Newlin</span><span style="font-size:11.0pt"><o:p></o:p></span></p>
</div>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<div id="mail-editor-reference-message-container">
<div>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="margin-bottom:12.0pt"><b><span style="font-size:12.0pt;color:black">From:
</span></b><span style="font-size:12.0pt;color:black">Users <users-bounces@lists.opensips.org> on behalf of Alexey <slackway2me@gmail.com><br>
<b>Date: </b>Wednesday, February 19, 2025 at 6:35</span><span style="font-size:12.0pt;font-family:"Arial",sans-serif;color:black"> </span><span style="font-size:12.0pt;color:black">AM<br>
<b>To: </b>users@lists.opensips.org <users@lists.opensips.org><br>
<b>Subject: </b>Re: [OpenSIPS-Users] In opensips config I wanted to match a source IP in a CIDR range .<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-size:11.0pt"> EXTERNAL EMAIL - Please use caution with links and attachments <br>
<br>
Moreover, you can filter requests using plain text files<br>
consisting of pairs (e.g. uri - from address) and filter<br>
REGISTERs/INVITEs this way [1] , [2] , [3] .<br>
<br>
And if you need some real-world examples,<br>
you may have a look at these erticles either [4] , [5] .<br>
<br>
<br>
[1] <a href="https://opensips.org/docs/modules/3.4.x/permissions.html#sec-call-routing">
https://url.us.m.mimecastprotect.com/s/MD5hCgJQkWflwRMzLINf1T44YSj?domain=opensips.org</a><br>
[2] <a href="https://opensips.org/docs/modules/3.4.x/permissions.html#sec-registration-permissions">
https://url.us.m.mimecastprotect.com/s/LnXNCjROnWSjGXWx7iRhBTmcx94?domain=opensips.org</a><br>
[2] <a href="https://opensips.org/docs/modules/3.4.x/permissions.html#sec-uri-permissions">
https://url.us.m.mimecastprotect.com/s/zCVyCkROoWSnXjxJMCQiyTGVWEd?domain=opensips.org</a><br>
<br>
[4] <a href="https://alexeyka.zantsev.com/?p=1109">
https://url.us.m.mimecastprotect.com/s/jie5ClYMpWfoP8QYBUqsVTzMmsd?domain=alexeyka.zantsev.com</a><br>
[5] <a href="https://alexeyka.zantsev.com/?p=1348">
https://url.us.m.mimecastprotect.com/s/ZNdWCmZMEWU5P3OQmfQtJTRJUTv?domain=alexeyka.zantsev.com</a><br>
<br>
-- <br>
best regards, Alexey<br>
<a href="https://alexeyka.zantsev.com">https://alexeyka.zantsev.com</a><br>
<br>
_______________________________________________<br>
Users mailing list<br>
Users@lists.opensips.org<br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><o:p></o:p></span></p>
</div>
</div>
</div>
</div>
</div>
</body>
</html>