asterisk.io
node.js asterisk pbx io
1. Install
npm install asterisk.io
2. How to use
var aio = ami = null // see ami section agi = null; // see agi section
2.1 AMI
Read more at asterisk wiki for: actions, events.
2.1.1 Actions
A list of actions that can be send to asterisk pbx can be found at asterisk wiki page.
IMPORTANT: The list of actions depends of your asterisk version installed.
Send an action and get the response in a callback function.
var aio = ami = null; ami = aio; ami; ami;
2.1.2 Events
A list of events from asterisk pbx can be found at asterisk wiki page.
IMPORTANT: The list of events depends of your asterisk version installed.
Catch all events from asterisk ami with eventAny. Example:
var aio = ami = null; ami = aio; ami; // this catch any event from asterisk pbxami;
Catch specific event from asterisk ami with eventXYZ. Example:
var aio = ami = null; ami = aio; ami; // Bridge eventami; // Hangup eventami;
2.2 AGI
Documetation for agi commands on asterisk wiki page.
var aio = agi = null; agi = aio; // port and host // if host is missing then // '0.0.0.0' is used as host agi; agi; agi; agi;
3. TODO
- ARI
- AGI - IVR (Interactive Voice Response) from JSON object
- UI: real time user interface