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

Answer() — Answers a channel, if it is ringing

Synopsis

    Answer()

Causes Asterisk to answer the channel if it is currently ringing. If the current channel is not ringing, this application does nothing.

It is usually a good idea to use Answer() on the channel before calling any other applications, unless you have a very good reason not to. Most applications require that the channel be answered before they are called, and may not work correctly otherwise.

Returns 0 unless it tries to answer the channel and fails.

               exten => 123,1,Answer()
    exten => 123,2,Wait(1)
    exten => 123,3,Playback(tt-weasels)

See Also

Hangup()

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