Try this

exten=> yournumberhere,1,Dial(SIP/peern1,60)

exten=>  yournumberhere,n,GotoIf($["${DIALSTATUS}" != "ANSWER"]?4)

exten=>  yournumberhere,n,Hangup

exten=> yournumberhere,n,Dial(SIP/peer2,60)

exten=>  yournumberhere,n,GotoIf($["${DIALSTATUS}" != "ANSWER"]?9)

exten=>  yournumberhere,n,Hangup

you can add more conditions in the same way


Regards,
Zohair Raza


On Fri, Feb 17, 2012 at 1:00 PM, CDR <[email protected]> wrote:

> My customer needs to set a forwarding based on number of rings,i.e.,
> if the phone rings 5 times (user-selectable), then try another number.
> Is there a way to do such a thing with Asterisk? I could not find way
> to do it based on the documentation of the Dial function. The protocol
> is SIP only, however, I could use a different one if it provided a
> workaround. If this is the wrong tool for the job, what technology
> would do this?
>
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
>               http://www.asterisk.org/hello
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-users
>
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to