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()

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

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.