<div dir="ltr"><div>You check for BUSY. Check for IN_USE instead. That&#39;s what I do here (on 1.4, but I guess that 1.6 behaves similarly).</div>
<div> </div>
<div>When an extension is in IN_USE state I have a decision tree after consulting a database:</div>
<div> </div>
<ul>
<li>If the user wants waiting call - dial him/her/</li>
<li>If the user doesn;t want waiting call but wants voicemail answer - send to voicemail with B prefix.</li>
<li>If niether is wanted - play busy.</li></ul>
<div>                      Regards, __Yehavi:</div>
<div> </div>
<div class="gmail_quote">2009/5/15 sean darcy <span dir="ltr">&lt;<a href="mailto:seandarcy2@gmail.com">seandarcy2@gmail.com</a>&gt;</span><br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">I have two internal analogue extensions off a TDM400P. If the first is<br>busy, I&#39;d like to ring the second. So:<br>
<br>[incoming]<br>exten =&gt;s,1,Answer()<br>exten =&gt;s,n,Dial(${mainline},60)<br>exten =&gt;s,n,ExecIf($[&quot;${DIALSTATUS}&quot; = &quot;BUSY&quot;]?Dial(${secondline},30))<br><br>But it doesn&#39;t work because * first tries Call Waiting on the main line.<br>
Here I dial out:<br><br>    -- Starting simple switch on &#39;DAHDI/1-1&#39;<br>    -- Executing [140@internal:1] Answer(&quot;DAHDI/1-1&quot;, &quot;&quot;) in new stack<br>    -- Executing [140@internal:2] Set(&quot;DAHDI/1-1&quot;, &quot;CALLERID=&quot;house&quot;<br>
&lt;2127873453&gt;&quot;) in new stack<br>    -- Executing [140@internal:3] Dial(&quot;DAHDI/1-1&quot;,<br>.............................<br><br>And now an incoming call:<br><br>    -- Executing [s@incoming:1] Answer(&quot;IAX2/nhi-10929&quot;, &quot;&quot;) in new stack<br>
    -- Executing [s@incoming:2] Dial(&quot;IAX2/nhi-10929&quot;, &quot;DAHDI/1,60&quot;) in<br>new stack<br>    -- Called 1<br>    -- IAX2/nhi-10929 requested special control 20, passing it to DAHDI/1-2<br>    -- IAX2/nhi-10929 requested special control 20, passing it to DAHDI/1-2<br>
    -- IAX2/nhi-10929 requested special control 20, passing it to DAHDI/1-2<br>    -- DAHDI/1-2 is ringing<br>    -- IAX2/nhi-10929 requested special control 20, passing it to DAHDI/1-2<br>    -- IAX2/nhi-10929 requested special control 20, passing it to DAHDI/1-2<br>
    -- CPE supports Call Waiting Caller*ID.  Sending &#39;Seandarcy/212 573<br>1432&#39;<br><br><br>Is there a way to check the status of a dahdi channel _before_ dialing it?<br><br>exten =&gt;s,n,ExecIf($[&quot;DAHDI/1${DIALSTATUS}&quot; =<br>
&quot;BUSY&quot;]?Dial(${secondline},30)) ??<br><br>What&#39;s special control 20  ??<br><br>Any help appreciated.<br><br>sean<br><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></div>