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

Congestion() — Indicates congestion on the channel

Synopsis

    Congestion([timeout])

Requests that the channel indicate congestion and then waits for the user to hang up or for the optional timeout (in seconds) to expire.

This application only signals congestion; it doesn’t actually play a congestion tone to the user. You can use Playtones(congestion) to play a congestion tone to the caller.

Always returns -1.

    ; if the Caller ID is 555-1234, always play congestion
    exten => 123,1,GotoIf($[${CALLERIDNUM} = 5551234]?5:2)
    exten => 123,2,Playtones(congestion)
    exten => 123,3,Congestion()
    exten => 123,4,Hangup()
    exten => 123,5,Dial(Zap/1)

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