Webhooks
Webhooks are HTTP requests that the system sends out that are triggered by certain events. These URLs carry some action information (like a command and related parameters) within the URL, the headers and body to the receiving party which can then take action on it accordingly. For example, an event like "making a call" can trigger a webhook which informs a remote entity (say a billing system) that a call was made and also, who made the call to whom and for how long. Upon receiving the information, the billing system could log it for billing.
Previous versions were using the term "Action URL". The term goes back more than 20 years in the VoIP industry, e.g. for triggering a HTTP request from a VoIP phone. Today the term "webhook" is used most of the time.
For each available event, the system keeps one webhook parameter set. By default the set is empty and no action is taken. However when the event is set the system will trigger the webhook.
Webhooks are available on system, tenant and on account level. There are various events available; they all take the same parameters. Depending on the event, certain variables are availble (see below).
Settings
Authentication method: The system supports the following authentication methods:
- None: No additional header is sent. Authentication information can still be added e.g. to the URL when needed.
- Basic: The Basic authentication header will be used (see RFC 7617). The system will replace the actual authentication information in the log with
*characters. - Rackspace: A special method for Rackspace.
- DNS Made Easy: A special method for DNS made easy.
Username, Password: These fields contain the authentication information. The username is available in the URL as {user} and the password as {pass}.
Region: For some providers, a region is needed.
Method: The HTTP method that will be used for the request.
URL: The HTTP URL that will be used for the request. The request needs to contain the scheme (e.g. https). Variables will be replaced in the URL in URL-encoded format.
Additional headers: This field contains additional headers that will be inserted in the request. Variables will be inserted without any specific encoding.
Encoding for the message body: This setting controls how variables in the body are encoded. It will also set the Content-Type header unless it occurs in the additional headers.
Message body: The body of the message. Variables will be inserted in the selected encoding.
When the system searches for brace replacements, it will skip patterns that are not defined. For example a pattern like {{asset}} will not be changed during the replacement process.
Tenant Level Events
When a wake-up call was programmed
When a wake-up call is entered by the user, the system can trigger a HTTP requests that may trigger further actions. The following variables are available:
| Parameter | Value |
|---|---|
{domain} | The DNS address of the tenant in which the event happened. |
{extension} | The account name of the extension. |
{email_address} | This contains the email address or addresses of the extension. |
{email_vmail} | The setting that tells the PBX weather to send a voicemail to the user, and if to attach the WAV file. |
{parm1}, {parm2} and {parm3} | A copy of the parameters 1, 2 and 3 of the extension. |
{wakeuptime} | The time that was set (only for programmed event). |
When a wake-up call was successfully delivered
When a wake-up call was successfully delivered, the system can trigger a HTTP requests that may trigger further actions. The variables are the same like for the "When a wake-up call was programmed" call.
When a wake-up call is missed
When a wake-up call failed, the system can trigger a HTTP requests that may trigger further actions. The variables are the same like for the "When a wake-up call was programmed" call.
When turning DND on
When the user turned DND on, the system can trigger a HTTP requests that may trigger further actions. The following variables are available:
| Parameter | Value |
|---|---|
{domain} | The DNS address of the tenant in which the event happened. |
{extension} | The extension ID of the user. |
{state} | The state of DND. |
{duration} | The duration for the DND. |
{forward} | The number where calls are being forwarded. |
{reason} | The reason for DND (provided by the user). |
When turning DND off
When the user turned DND off, the system can trigger a HTTP requests that may trigger further actions. The following variables are available:
| Parameter | Value |
|---|---|
{domain} | The DNS address of the tenant in which the event happened. |
{extension} | The extension ID of the user. |
{state} | The state of DND. |
When hotel room is cleaned
When a room cleanup code was called, the system can trigger a HTTP requests that may trigger further actions. The following variables are available:
| Parameter | Value |
|---|---|
{domain} | The DNS address of the tenant in which the event happened. |
{extension} | The extension ID of the user. |