[asterisk-users] Dial cmd help

Joseph L. Casale JCasale at activenetwerx.com
Sun Jul 5 22:57:57 CDT 2009


I have a dial cmd buried amongst a series of others in a macro
like so: exten => s,n,Dial(SIP/1${ARG1}@sip_peer,60,T)

Reason for adding a "1" is all the others in the macro don't
want the "1" so this was easiest at the time. Now I need to
send NA long distance through this macro. All the other dial
cmds will just work, but this one is going to try to dial
11NXXNXXXXXX instead of 1NXXNXXXXXX.

Is there some way to simply add some logic above it such that
if the EXTEN coming in starts with a "1", remove it so I don't
have to hack this extensions.conf all to heck?

Thanks!
jlc



More information about the asterisk-users mailing list