I am facing a problem regarding dial plan of Asterisk. Currently, my dial plan inside a context is –
exten => 43148161/09818123456, 1, dial(dahdi/1/009999790061)
it means, if caller (09818123456) call 43148161 then asterisk forward it to 009999790061. And for your information it is working fine. The problem is, if CID number is come like 919818123456 instead of 09818123456, it means prefix is changed; then our dial will not work.
I think, for solving this problem, I should used regular expression so that only match the last 10 digits and ignore prefix (it can be single zero ‘0’ or ‘91’, like in our case). But I don’t know the implementation of this solution.
So, please suggest me that how should I implement it or other solution, if exist of this problem.