Hi
Understood now, yes your system will be slightly different, and I have spotted some errors in the dialplan I gave you.
Try this:-
Code:
; For standard inbound call
[a2billing]
exten => _x.,1,DeadAgi(a2billing.php|1)
exten => _x.,n,Hangup
exten => _7775,1,VoicemailMain(${CDR(accountcode)})
exten => _NXXNXXXXXX,1,Goto(a2billing-USA,1${EXTEN},1)
[a2billing-USA]
exten => _x.,1,DeadAgi(a2billing.php|1)
exten => _x.,n,Hangup
What happens is if there is a pattern match of 10 digits, then it will call a2billing.php, and pre-pend a 1, in the a2billing-USA context, otherwise the call will proceed as normal.
I hope this clarifies. Don't forget to reload asterisk.
Joe