
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
439
Appendix B
APPENDIX B
AGI Commands
ANSWER
Answers the current channel if not already answered.
Returns -1 upon failure, or 0 upon success.
CHANNEL STATUS [channel]
Returns the status of the specified
channel. If none is given, returns the status of
the current channel. Here is what the status codes mean:
0: Channel is on hook and available.
1: Channel is on hook, but reserved.
2: Channel is off the hook but no digits have been dialed.
3: Digits have been dialed.
4: The line connected to this channel is ringing.
5: A called line connected to this channel is ringing.
6: A called line connected to this channel has a call in progress.
7: A called line connected to this channel is busy.
DATABASE DEL family key
Deletes a value in the Asterisk database for the specified family and key.
Returns 1 if successful, 0 if not.
DATABASE DELTREE family [keytree]
Deletes a family or and/or keytree within a family in the Asterisk database.
Returns 1 if successful, 0 if not.
DATABASE GET family key
Retrieves a value in the Asterisk database for the specified family and key.
Returns 0 if
key does not exist. Returns 1 and the requested value in parentheses
if
key exists, as in this example:
200 result=1 (value)
DATABASE PUT family key value
Creates or updates a value in the Asterisk database for the specified family, ...