Is there a way to access only certain positions in the $EXTEN variable?
I'd like to filter my international calls based on the destination country:
My dialplan looks like this (1XX0. is the international calling
convention for Chile)
exten => _1XX0.,1,Dial(SIP/${EXTEN:[EMAIL PROTECTED])
But, I'd like to, depending on the destination country (digits 5 and
eventually 6 of EXTEN), route my calls for another provider, something like:
exten => _1XX0.,1,GotoIf(${EXTEN[5-6]} == certain_pattern)?2,3)
exten => _1XX0.,2,Dial(SIP/${EXTEN:[EMAIL PROTECTED])
exten => _1XX0.,3,Dial(SIP/${EXTEN:[EMAIL PROTECTED])
How can I do that? I was looking the documentation, but it only speaks
of stripping digits from the extension, not to selecting a range.
Thanks a lot for your help.
--
Atly.
Álvaro Palma
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --
Asterisk-Users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users