elixir_agi v0.0.14 ElixirAgi.Agi
This module handles the AGI implementation by reading and writing to/from the source.
Copyright 2015 Marcelo Gornstein marcelog@gmail.com
Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Summary
Functions
Returns an AGI struct that uses STDIN and STDOUT
Returns an AGI struct
Runs an agi command on a channel
Parameters
- agi: the agi channel to send command to
- cmd: Asterisk command name
- args: List of asterisk command parameters in order of asterisk command docs
See: https://wiki.asterisk.org/wiki/display/AST/AGICommand_say+datetime TODO: This function needs testing!
Types
Functions
Specs
amd(t, non_neg_integer, non_neg_integer, non_neg_integer, non_neg_integer, non_neg_integer, non_neg_integer, non_neg_integer, non_neg_integer, non_neg_integer) :: ElixirAgi.Agi.Result.t
See: https://wiki.asterisk.org/wiki/display/AST/Application_AMD
Specs
answer(t) :: ElixirAgi.Agi.Result.t
See: https://wiki.asterisk.org/wiki/display/AST/AGICommand_answer
Specs
channel_status(t, String.t) :: ElixirAgi.Agi.Result.t
See: https://wiki.asterisk.org/wiki/display/AST/AGICommand_channel+status
Specs
See: https://wiki.asterisk.org/wiki/display/AST/AGICommand_control+stream+file
Specs
dial(t, String.t, non_neg_integer, [String.t]) :: ElixirAgi.Agi.Result.t
See: https://wiki.asterisk.org/wiki/display/AST/Application_Dial
Specs
exec(t, String.t, [String.t]) :: ElixirAgi.Agi.Result.t
See: https://wiki.asterisk.org/wiki/display/AST/AGICommand_exec
Specs
get_data(t, String.t, Integer.t, Integer.t) :: ElixirAgi.Agi.Result.t
See: https://wiki.asterisk.org/wiki/display/AST/AGICommand_get+data
Specs
get_full_variable(t, String.t) :: ElixirAgi.Agi.Result.t
See: https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+AGICommand_get+full+variable
Specs
get_option(t, String.t, String.t, Integer.t) :: ElixirAgi.Agi.Result.t
See: https://wiki.asterisk.org/wiki/display/AST/AGICommand_get+option
Specs
hangup(t, String.t) :: ElixirAgi.Agi.Result.t
See: https://wiki.asterisk.org/wiki/display/AST/AGICommand_hangup
Returns an AGI struct.
Specs
See: https://wiki.asterisk.org/wiki/display/AST/AGICommand_record+file
Specs
run(t, String.t, [String.t]) :: ElixirAgi.Agi.Result.t
Runs an agi command on a channel
Parameters
- agi: the agi channel to send command to
- cmd: Asterisk command name
- args: List of asterisk command parameters in order of asterisk command docs
Specs
say_alpha(t, Integer.t, String.t) :: ElixirAgi.Agi.Result.t
See: https://wiki.asterisk.org/wiki/display/AST/AGICommand_say+alpha
Specs
say_date(t, Integer.t, String.t) :: ElixirAgi.Agi.Result.t
See: https://wiki.asterisk.org/wiki/display/AST/AGICommand_say+date
See: https://wiki.asterisk.org/wiki/display/AST/AGICommand_say+datetime TODO: This function needs testing!
Specs
say_digits(t, Integer.t, String.t) :: ElixirAgi.Agi.Result.t
See: https://wiki.asterisk.org/wiki/display/AST/AGICommand_say+digits
Specs
say_number(t, Integer.t, String.t, String.t) :: ElixirAgi.Agi.Result.t
See: https://wiki.asterisk.org/wiki/display/AST/AGICommand_say+number
Specs
say_phonetic(t, String.t, String.t) :: ElixirAgi.Agi.Result.t
See: https://wiki.asterisk.org/wiki/display/AST/AGICommand_say+phonetic
Specs
say_time(t, Integer.t, String.t) :: ElixirAgi.Agi.Result.t
See: https://wiki.asterisk.org/wiki/display/AST/AGICommand_say+time
Specs
set_autohangup(t, Integer.t) :: ElixirAgi.Agi.Result.t
See: https://wiki.asterisk.org/wiki/display/AST/AGICommand_set+autohangup
Specs
set_callerid(t, String.t) :: ElixirAgi.Agi.Result.t
See: https://wiki.asterisk.org/wiki/display/AST/AGICommand_set+callerid
Specs
set_context(t, String.t) :: ElixirAgi.Agi.Result.t
See: https://wiki.asterisk.org/wiki/display/AST/AGICommand_set+context
Specs
set_extension(t, String.t) :: ElixirAgi.Agi.Result.t
See: https://wiki.asterisk.org/wiki/display/AST/AGICommand_set+extension
Specs
set_variable(t, String.t, String.t) :: ElixirAgi.Agi.Result.t
See: https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+AGICommand_set+variable
Specs
stream_file(t, String.t, String.t) :: ElixirAgi.Agi.Result.t
See: https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+AGICommand_stream+file
Specs
wait(t, non_neg_integer) :: ElixirAgi.Agi.Result.t
See: https://wiki.asterisk.org/wiki/display/AST/Application_Wait
Specs
wait_for_digit(t, Integer.t) :: ElixirAgi.Agi.Result.t
See: https://wiki.asterisk.org/wiki/display/AST/AGICommand_wait+for+digit