Hi Mark,

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)

Best regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  https://www.opensips-solutions.com
OpenSIPS eBootcamp 2021
  https://opensips.org/training/OpenSIPS_eBootcamp_2021/

On 8/5/21 3:54 PM, Mark Farmer wrote:
Hi everyone

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:

_+44123456789[2,3]
Which only matches prefixes ending 2 or 3.

Or:
_+44123456789[2-5]
Which matches prefixes ending 2,3,4 or 5

Would it be feasible to add this ability to drouting()?

Thanks and regards
Mark.


_______________________________________________
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

Reply via email to