I am trying to make a dial plan to block incoming calls from any number starting with 88
Here is my dial plan
exten => _X.,1,NoOp(${CALLERID(num)})
same => n,Set(regx=^(88)[0-9]$)
same => n,GotoIf($[${REGEX("${regx}" ${CALLERID(num)})} = 1]?blocked,s,1)
same => n,Dial(SIP/8.8.8.8/${EXTEN}
[blocked]
exten => s,1,Wait(9)
At the moment if I test call with Caller ID 88 it blocks the call successfully but if the call comes from 88XXXXXXX it does not.
Asterisk dialplan is regexp itself. Why you use other regexp?