[asterisk-users] Dial cmd help

DHAVAL INDRODIYA dhaval.it01034 at gmail.com
Mon Jul 6 00:00:20 CDT 2009


hi
joshep  try this in your macro

*exten => s,1,Noop(${ARG1:1}=========)
exten => s,n,ExecIf($["${ARG1}" = "1${ARG1:1}"
]?Set(Dialnum=${ARG1:1}):Set(Dialnum=${ARG1}))
exten => s,n,NooP(${Dialnum})
exten => s,n,Dial(SIP/1${Dialnum}@sip_peer,60,T)
exten => s,n,hangup()


please arrange second line

regards
dhaval
*
On Mon, Jul 6, 2009 at 9:27 AM, Joseph L. Casale
<JCasale at activenetwerx.com>wrote:

> 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
>
> _______________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20090706/89ecd4e3/attachment.htm 


More information about the asterisk-users mailing list