<div dir="ltr">Try this <div><br></div><div><p class="MsoNormal">exten=&gt; yournumberhere,1,Dial(SIP/peern1,60)</p>
<p class="MsoNormal">exten=&gt; 
yournumberhere,n,GotoIf($[&quot;${DIALSTATUS}&quot; != &quot;ANSWER&quot;]?4)</p>
<p class="MsoNormal">exten=&gt; 
yournumberhere,n,Hangup</p><p class="MsoNormal">exten=&gt; yournumberhere,n,Dial(SIP/peer2,60)</p><p class="MsoNormal"></p><p class="MsoNormal"></p><p class="MsoNormal">exten=&gt;  yournumberhere,n,GotoIf($[&quot;${DIALSTATUS}&quot; != &quot;ANSWER&quot;]?9)</p>

<p class="MsoNormal">exten=&gt;  yournumberhere,n,Hangup</p><br class="Apple-interchange-newline"><p></p><p class="MsoNormal">you can add more conditions in the same way</p>
<p class="MsoNormal"> </p><div dir="ltr">Regards,<br>Zohair Raza<div><br></div></div><br><div class="gmail_quote">On Fri, Feb 17, 2012 at 1:00 PM, CDR <span dir="ltr">&lt;<a href="mailto:venefax@gmail.com">venefax@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">My customer needs to set a forwarding based on number of rings,i.e.,<br>
if the phone rings 5 times (user-selectable), then try another number.<br>
Is there a way to do such a thing with Asterisk? I could not find way<br>
to do it based on the documentation of the Dial function. The protocol<br>
is SIP only, however, I could use a different one if it provided a<br>
workaround. If this is the wrong tool for the job, what technology<br>
would do this?<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>
New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
               <a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</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></div></div>