Page 399 - Asterisk™: The Future of Telephony
P. 399
The program must be set as executable in the underlying filesystem. The program path
is relative to the Asterisk AGI directory, which by default is /var/lib/asterisk/agi-bin/.
If you want to run an AGI when no channel exists (such as in an h extension), use the
DeadAGI() application instead. You may want to use the FastAGI() application if you
want to do AGI processing across the network.
If you want access to the inbound audio stream from within your AGI program, use
EAGI() instead of AGI(). Inbound audio can then be read in on file descriptor 3.
If the channel hangs up prematurely, the process initiated by the AGI command will be
sent a HUP signal to tell it that the channel has hung up. If your program does not catch
this signal, it will be terminated. You can override this behavior by setting the channel
variable AGISIGHUP to 0:
; call the demo AGI program
exten => 123,1,AGI(agi-test)
exten => 123,2,EAGI(eagi-test)
See Also
DeadAGI(), FastAGI(), Chapter 9
AlarmReceiver() Provides support for receiving alarm reports from a burglar or fire alarm panel
AlarmReceiver()
Emulates an alarm receiver, and allows Asterisk to receive and decode special data from
fire and/or burglar alarm panels. At this time, only the Ademco Contact ID format is
supported.
When called, AlarmReceiver() will handshake with the alarm panel, receive events,
validate them, handshake them, and store them until the panel hangs up. Once the
panel hangs up, the application will run the command line specified by the eventcmd
setting in alarmreceiver.conf and pipe the events to the standard input of the applica-
tion. alarmreceiver.conf also contains settings for DTMF timing and for the loudness
of the acknowledgment tones.
; set up Asterisk to answer a call from a supported fire alarm panel
exten => s,1,AlarmReceiver()
This application is not guaranteed to be reliable, so don’t depend on it
unless you have extensively tested it. If you use this application without
extensive testing, you may be putting your life and property at great risk.
See Also
alarmreceiver.conf
AlarmReceiver() | 371