<span style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt"><span style="font-family: tahoma,arial,sans-serif; font-size: 10pt;"><hr width="100%" size="2" align="center" />
<b>From</b>: "Paolo Supino" &lt;paolo.supino@gmail.com&gt;<br />
<b>Sent</b>: Wednesday, March 21, 2012 3:40 PM<br />
<b>To</b>: "Asterisk Users Mailing List - Non-Commercial Discussion" &lt;asterisk-users@lists.digium.com&gt;<br />
<b>Subject</b>: Re: [asterisk-users] fallback to default extension</span><br />
<br />
Hi<br />
<br />
I've pretty much have it setup properly with the following:<br />
exten =&gt; _24XX,1,Dial(SIP/${EXTEN},30)<br />
exten =&gt; _24XX,n,GotoIf($${DIALSTATUS}"="CHANUNAVAIL?noconn:conn)<br />
exten =&gt; _24XX,n(noconn),GotoIf($["${EXTEN}"="2400"?conn:force)<br />
exten =&gt; _24XX,n(force),Dial(SIP/2400)<br />
exten =&gt; _24XX,n(conn),hangup()<br />
<br />
The only problem is that if 2400 rejects the call asterisk tries to<br />
call extension 2400 again...<br />
What am I doing wrong and how do I fix it?<br />
<br />
<br />
<br />
TIA<br />
Paolo<br />
<br />
On Wed, Mar 21, 2012 at 1:44 PM, Phil Frost &lt;phil@macprofessionals.com&gt; wrote:<br />
&gt; On Mar 21, 2012, at 08:36 , Andrew Latham wrote:<br />
&gt;&gt; On Wed, Mar 21, 2012 at 8:27 AM, Paolo Supino &lt;paolo.supino@gmail.com&gt; wrote:<br />
&gt;&gt;&gt; Hi<br />
&gt;&gt;&gt;<br />
&gt;&gt;&gt; &nbsp;I was asked by our development departement to setup asterisk in a<br />
&gt;&gt;&gt; manner that if someone calls an extension in the department that was<br />
&gt;&gt;&gt; was only configured, but a handset was never attached to it to fall<br />
&gt;&gt;&gt; back to a default extension. For example: Someone calls extension<br />
&gt;&gt;&gt; 2408, but there's no phone attached to 2408 it should fall back and<br />
&gt;&gt;&gt; ring at 2400..<br />
&gt;&gt;&gt;<br />
&gt;&gt;&gt; How do I setup asterisk to find out if there's a phone attached to an<br />
&gt;&gt;&gt; internal number if not ring another extension?<br />
&gt;&gt;&gt;<br />
&gt;&gt;<br />
&gt;&gt; Just add a dial(SIP/2400) at a later priority or any of the other many<br />
&gt;&gt; ways. &nbsp;Assuming 2400 is you operator then set the var and drop to the<br />
&gt;&gt; operator. Verify your options to you dial syntax and any std-exten<br />
&gt;&gt; setups.<br />
&gt;<br />
&gt;<br />
&gt; You might want to additionally inspect ${DIALSTATUS} to know more about why the first Dial() (to 2408, in your example) failed, and then use the ExecIf or GotoIf applications to take different actions.<br />
&gt;<br />
&gt; You might also try the function SIPPEER, again coupled with ExecIF or GotoIf.<br />
&gt;<br />
&gt; --<br />
&gt; _____________________________________________________________________<br />
&gt; -- Bandwidth and Colocation Provided by http://www.api-digital.com --<br />
&gt; New to Asterisk? Join us for a live introductory webinar every Thurs:<br />
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; http://www.asterisk.org/hello<br />
&gt;<br />
&gt; asterisk-users mailing list<br />
&gt; To UNSUBSCRIBE or update options visit:<br />
&gt; &nbsp; http://lists.digium.com/mailman/listinfo/asterisk-users<br />
<br />
--<br />
_____________________________________________________________________<br />
-- Bandwidth and Colocation Provided by http://www.api-digital.com --<br />
New to Asterisk? Join us for a live introductory webinar every Thurs:<br />
http://www.asterisk.org/hello<br />
<br />
asterisk-users mailing list<br />
To UNSUBSCRIBE or update options visit:<br />
http://lists.digium.com/mailman/listinfo/asterisk-users<br />
<br /></span>