Name

WaitForRing() — Waits the specified number of seconds for a ring

Synopsis

    WaitForRing(timeout)

Waits at least timeout seconds after the next ring has completed.

Returns 0 on success or -1 on hangup.

    ; wait five seconds for a ring, and then send some DTMF digits
    exten => 123,1,Answer()
    exten => 123,2,WaitForRing(5)
    exten => 123,3,SendDTMF(1234)

Get Asterisk: The Future of Telephony now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.