<div class="gmail_quote">On Tue, Dec 21, 2010 at 6:59 PM, Stephen Reese <span dir="ltr">&lt;<a href="mailto:rsreese@gmail.com">rsreese@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im">On Tue, Dec 21, 2010 at 7:58 PM, Stephen Reese &lt;<a href="mailto:rsreese@gmail.com">rsreese@gmail.com</a>&gt; wrote:<br>
&gt; Is there a way to include:<br>
&gt;<br>
&gt; _NXXNXXXXXX<br>
&gt; _NXXXXXX<br>
&gt; _011.<br>
&gt; _911<br>
&gt;<br>
&gt; into my current plan:<br>
&gt;<br>
<br>
</div>Sorry, here&#39;s the rest.<br>
<br>
exten =&gt; _1NXXNXXXXXX,1,Set(Outgoing=${CUT(CHANNEL,/,2)})<br>
exten =&gt; _1NXXNXXXXXX,n,Set(Outgoing=${CUT(Outgoing,-,1)})<br>
exten =&gt; _1NXXNXXXXXX,n,GotoIf($[&quot;${Outgoing}&quot; = &quot;201&quot;]?20:10)<br>
exten =&gt; _1NXXNXXXXXX,10,Set(CALLERID(all)=${EXTERNAL_CALLERID})<br>
exten =&gt; _1NXXNXXXXXX,n,Dial(SIP/${EXTEN}@vitel-outbound)<br>
exten =&gt; _1NXXNXXXXXX,n,Goto(h,1)<br>
exten =&gt; _1NXXNXXXXXX,20,Set(CALLERID(all)=${EXTERNAL_CALLERID})<br>
exten =&gt; _1NXXNXXXXXX,n,Dial(SIP/${EXTEN}@vitel-outbound2)<br>
exten =&gt; _1NXXNXXXXXX,n,Goto(h,1)<br>
<br></blockquote></div><br>Why not make a Macro (or GoSub) to handle this block of code, and then your outbound dial lines are just one line calling the Macro?  Saves a lot of repeating blocks of code. Something like this (not tested):<br>
<br>[macro-OutboundDial]<br>; ${ARG1} = CHANNEL<br>; ${ARG2} = EXTERNAL_CALLERID<br>exten =&gt; s,1,Set(Outgoing=${CUT(${ARG1},/,2)})<br>exten =&gt; s,n,Set(Outgoing=${CUT(Outgoing,-,1)})<br>exten =&gt; s,n,GotoIf($[&quot;${Outgoing}&quot; = &quot;201&quot;]?outbound2:outbound1)<br>
exten =&gt; s,n(outbound1),Set(CALLERID(all)=${ARG2})<br>exten =&gt; s,n,Dial(SIP/${MACRO_EXTEN}@vitel-outbound)<br>exten =&gt; s,n,Goto(h,1)<br>exten =&gt; s,n(outbound2),Set(CALLERID(all)=${ARG2})<br>exten =&gt; s,n,Dial(SIP/${MACRO_EXTEN}@vitel-outbound2)<br>
exten =&gt; s,n,Goto(h,1)<br><br>[outbound-context]<br><br>exten =&gt; _NXXNXXXXXX,1,Macro(OutboundDial,${CHANNEL},${EXTERNAL_CALLERID})<br>exten =&gt; _NXXXXXX,1,Macro(OutboundDial,${CHANNEL},${EXTERNAL_CALLERID})<br>exten =&gt; _011.,1,Macro(OutboundDial,${CHANNEL},${EXTERNAL_CALLERID})<br>
exten =&gt; _911,1,Macro(OutboundDial,${CHANNEL},${EXTERNAL_CALLERID})<br><br clear="all"><br>-- <br>Thanks,<br>--Warren Selby, dCAP<br><a href="http://www.selbytech.com" target="_blank">http://www.selbytech.com</a><br>