How to integrate VoipNow with remote applications using Call Events ​
WARNING
Applies to VoipNow 3 and higher!
Call Events is a service that provides ways to notify web applications about various events triggered by phone calls. The notification is performed using REST calls. With the help of this service, a developer can define custom requests to be sent when specific events occur.
There are currently 3 events supported by the Call Events service:
- Dial-In, which occurs when a call is received by an extension.
- Dial-Out, which occurs when a call is made by an extension.
- Hangup, which occurs when the call the extension is involved in gets hung up.
- Answer on incoming call, occurs when an incoming phone call is answered.
- Answer on outgoing call (by the other party), occurs when an outgoing phone call is answered by the other party.
Events management ​
In order to modify Call Events for an extension, you have to connect to the web interface and go to the extension's management page and click on Call Events icon in the Developers area.The attributes you can modify are:
- Request method: The method used when making the request (this can be either GET or POST).
- Event ID: A unique ID generated for each request, useful for identifying requests.
- Make request to: The request URL that is called when the event is triggered.
- Status: Requests can be enabled or disabled with the help of this functionality. A disabled request is no longer performed.
- Notes: An informative note about the request, used for reference only.
Default request parameters ​
Here is a list with the parameters that are automatically added to each request. Their main usage is to provide third-party applications with more information about events:
| Name | Occurence | Type | Required | Description |
|---|---|---|---|---|
| CallID | 1 | String | No | The call's unique identifier. |
| CallerIDNum | 1 | String | No | The caller's CallerID number. |
| CallerIDNam | 1 | String | No | The caller's CallerID name. |
| CalledDID | 1 | String | No | The public number of the called extension (if available). |
| CalledExtension | 1 | String | No | The extension that received the call. Supported format: extended extension number (e.g. yyyy*zzz). |
| CallStatus | 1 | String | No | The call status. For Dial-In and Dial-Out type events, this parameter is set to CALLING, for Hangup events is set to ANSWER or UNKNOWN. |
| CallFlow | 1 | String | No | The call flow: IN - for the calls received by the extension or OUT - for the calls made by the extension. |
| CallerExtension | 1 | String | No | The extension that made the call. Supported format: extended extension number (e.g. yyyy*zzz). |
| CalledNumber | 1 | String | No | The number that was dialed by the caller. It can be a public number or the extended number of an extension. |