I want your opinions then your suggestions about this.
I’m using Asterisk 13.4 and “Freepbx as GUI” (It’s an obligation, I really want to work without it because I want to manipulate directly Asterisk).
My object: Block Specific "Caller IDs " using “Inbound Route Module”.
The problem here is That I can’t use “Blacklist” module because I want to block "Specific Caller Ids " on “Specific DIDs”. So, I’m obliged to use “Inbound Route Module” in Freepbx. But, this module is very limited when you want to specify “REGEX” on “Caller ID” field. And from my researches , this limit on “Regex” is in Asterisk also, because for example it allows you to specify if caller id “START with: _89XXXX” or “END with: _XXXX89” but for example can’t allow you to specify “number1 | number2 | number3” (for caller ids which don’t have pattern in between) like the normal regex allows you in “Shell Scripts for example”…
Might be I understood quite good how “Pattern” work in “Asterisk Language” or something else. So, I want some advices here about:
If I keep using Freepbx GUI: I must create “Inbound Route” for each “Caller ID” , which is in my opinion very very very bad workaround; because If I had 1000 different DIDs and in each DID I want to block 1000 "Caller ID "===> it ends with 1000000 In Rules !!!
** If so, this won’t affect “Asterisk performance” ? and if so, How can I prevent this ? (sorry to ask this Freepbx Related problem here , because I’m certain that Freepbx Stuff can’t understand the limit of Asterisk code or instructions).
** If not affecting it’s performance, I want to know what is the difference between putting “All extensions tests” in one context in the dialplan and trying to divide dialplan in “multi contexts” like doing this Freepbx (for example “InRoule1”, “InRoule2”…) on “Asterisk performance” level.
If I want to develop an asterisk code doing what I want, I need to optimize my dialplan using “REGEX” function to test if "Caller Id " matches one of “list Numbers” instead of doing a context for each “Caller ID”.
So can you help me understanding how “REGX” function works in “ASterisk” and how can I use it in the Dialplan through examples , if it’s possible of course.
-And I want to know if “Regx” has side effects on Asterisk performance?
Thanks in advance.