Packages

Elixir client for the Asterisk AGI protocol. Find the user guide in the github repo at: https://github.com/marcelog/elixir_agi.

Current section

Files

Jump to
elixir_agi examples asyncagi asyncagi_app.ex
Raw

examples/asyncagi/asyncagi_app.ex

defmodule AsyncAgiApp do
alias ElixirAgi.Agi
def run(agi) do
try do
Agi.answer agi
Agi.wait agi, 10
Agi.hangup agi
rescue
Agi.HangupError ->
Logger.info "Call terminated by caller"
:ok
e -> raise e
end
end
end