<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<font face="monospace">Hi Mark,<br>
<br>
The drouting module does prefix based routing, while your
suggestion is about a variable part at the end of the number. If
you do not like the idea of expanding the rule into multiple
prefixes, maybe take a look at the dialplan module which does
regexp based matching (but take care, this is highly inefficient
for medium, large number of records, as it has to check all the
records, one by one, there is no optimization in terms of
searching the matching records) <br>
<br>
Best regards,<br>
</font>
<pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="moz-txt-link-freetext" href="https://www.opensips-solutions.com">https://www.opensips-solutions.com</a>
OpenSIPS eBootcamp 2021
<a class="moz-txt-link-freetext" href="https://opensips.org/training/OpenSIPS_eBootcamp_2021/">https://opensips.org/training/OpenSIPS_eBootcamp_2021/</a></pre>
<div class="moz-cite-prefix">On 8/5/21 3:54 PM, Mark Farmer wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAOvQDeud6HFNc5bv-Om=ftuxhEbg-JyjjEH0H144-2J_HnWN5A@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">Hi everyone<br clear="all">
<div><br>
</div>
<div>I am using drouting() which is working well but I am
finding the prefix matching a little limited. It would be
really useful to be able to match mid-range prefixes.
For example, in Asterisk you can do do things like:</div>
<div><br>
</div>
<div>_+44123456789[2,3]</div>
<div>Which only matches prefixes ending 2 or 3.</div>
<div><br>
</div>
<div>Or:</div>
<div>_+44123456789[2-5]</div>
<div>Which matches prefixes ending 2,3,4 or 5</div>
<div><br>
</div>
<div>Would it be feasible to add this ability to drouting()?</div>
<div><br>
</div>
<div>Thanks and regards</div>
<div>Mark.</div>
<div><br>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
</body>
</html>