On Friday 17 February 2012, CDR 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?
You have to do it by timing, not by number of rings. Asterisk simply doesn't
know how long each "ring, ring, pause" cycle takes (it's a configurable
property, and only analogue phones on an FXS port can be trusted to honour it
anyway).
If one ringing cycle takes 3 seconds, then 5 rings would be 15 seconds. So
just use something like
Dial(SIP/${EXTEN},15)
in your dialplan.
If the call was not answered, then the step number will get an extra 100 added
to it. So, if your Dial() command was at step 2, it will move on to step 3 if
the call was answered and hung up; or step 103 if the line was busy or timeout
occurred.
Hope that makes sense.
--
AJS
Answers come *after* questions.
--
_____________________________________________________________________
-- 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