Crate asterisk_agi

Source
Expand description

This crate helps to implement simple AGI programs. AGI is the Asterisk Gateway Interface

When using this crate the first thing you probably have to do is calling read_variables() which will read the variables Asterisk provides to the AGI program. After that use the other functions to control what Asterisk is doing with the invocing channel.

Enums§

MenuItem
Represents an item presented to the caller in a voice menu.

Functions§

answer
Answer a call
exec
Executes a dialplan application
get_variable
Get the content of an Asterisk variable
menu
Present a voice menu to the caller.
pause
Pause further execution for the given number of seconds.
prompt
Play an audio file and wait for digits to be pressed by the caller
prompt_hour
Plays a sound file to the caller and then waits for an hour to be chosen
prompt_phonenumber
Play an audio file and wait for a phone number to be entered by the caller
read_variables
Read the variables given by Asterisk when it calls an AGI program.
say_date
Plays the date
say_digits
Plays the individual digits of a number
say_number
Plays a number
say_time
Plays the time
set_variable
Set an Asterisk variable
stream_file
Play an audio file to the caller
wait_for_digit
Wait for the caller to press a key