O'Reilly logo

Asterisk: The Future of Telephony by Leif Madsen, Jared Smith, Jim Van Meggelen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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)

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required