hi <br>joshep try this in your macro<br><br><b>exten => s,1,Noop(${ARG1:1}=========)<br>exten => s,n,ExecIf($["${ARG1}" = "1${ARG1:1}" ]?Set(Dialnum=${ARG1:1}):Set(Dialnum=${ARG1}))<br>exten => s,n,NooP(${Dialnum})<br>
exten => s,n,Dial(SIP/1${Dialnum}@sip_peer,60,T)<br>exten => s,n,hangup()<br><br><br>please arrange second line <br><br>regards<br>dhaval<br></b><br><div class="gmail_quote">On Mon, Jul 6, 2009 at 9:27 AM, Joseph L. Casale <span dir="ltr"><<a href="mailto:JCasale@activenetwerx.com">JCasale@activenetwerx.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I have a dial cmd buried amongst a series of others in a macro<br>
like so: exten => s,n,Dial(SIP/1${ARG1}@sip_peer,60,T)<br>
<br>
Reason for adding a "1" is all the others in the macro don't<br>
want the "1" so this was easiest at the time. Now I need to<br>
send NA long distance through this macro. All the other dial<br>
cmds will just work, but this one is going to try to dial<br>
11NXXNXXXXXX instead of 1NXXNXXXXXX.<br>
<br>
Is there some way to simply add some logic above it such that<br>
if the EXTEN coming in starts with a "1", remove it so I don't<br>
have to hack this extensions.conf all to heck?<br>
<br>
Thanks!<br>
jlc<br>
<br>
_______________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br>
</blockquote></div><br>