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 "receiving a call" can trigger a webhook which informs a remote entity (say a CRM) 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.
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.
Settings
Authentication method: The system supports the following authentication methods:
Username, Password: These fields contain the authentication information. The username is available in the URL as {user} and the password as {pass}.
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-Typeheader unless it occurs in the additional headers.
Message body: The body of the message. Variables will be inserted in the selected encoding.
{{asset}} will not be changed during the replacement process.When a call ends
When any call ends on the tenant, the system can trigger a HTTP request. Below is a sample payload that will be returned as well as the definition of the available variables”
Parameter | Value |
|---|---|
| call_id | This is the Cal-ID for the call. This Call-ID should be unique |
| from | The originator of the call. The format is according to the SIP standard with an optional display name and a SIP URI. The real destination may be different. This field shows what the original call headers were when the call was set up. |
| to | The destination of the call. The format is the same like the From header. |
| start | The time when the call was started in GMT. |
| connect | The time when the call was connected in GMT. This field may be empty if the call was not connected. |
| end | The time when the call ended in GMT. |
| recordings | If the call was recorded automatically, this field contains the location where the call was recorded. |
Internal States
Calls are going through one or more states. For example, a call might first hit an auto attendant, then gets transferred into a ring group, then after a timeout into a call queue and then into a mailbox. The states array shows the history of those states.
Parameter | Value |
|---|---|
| type | The type of the call. This field can take the following values:
call_queue: When the call goes to a agent group (ACD).
auto_attendant: When the call goes to an auto attendant this state is used. Also, when someone calls an extension directly (not through a group), this state is used.
mailbox: When a call hits the mailbox, it uses this state.
extcall: When a user places a regular external call, this state is used. It may also contain special operations, like entering a PIN code for authentication purposes.
hunt_group: This state is used for hunt group calls.
conference: In a conference call, this state is used.
call_parking: When the call is in a park orbit, it uses the call parking state.
hoot: The type hoot is used during paging.
service_flags: This state means that the service flag was called (in order to change it).
input_code: This state is used when processing Input Code Prompts.
caller: This state is used when the PBX initiates calls, for example when inviting participants for conferences or waking up hotel guests.
starcode: This state is used when processing starcodes, e.g. DND or call redirection |
| from | The value of the "From" header at the time when the call leg started. |
| to | The value of the "To" header, like the value of the "From" header but the other direction of the call. |
| start | A timestamp when that state was entered. |
| durationivr | The duration in ms how long the call was in a IVR state, rendering announcements to the user. |
| durationring | The duration how long the call was ringing a user. |
| durationtalk | The duration how long the call was connected to a user. This is independent from the trunk connected time. It also includes the time when the call was on hold. |
| durationhold | The duration how long the call was on hold in this state. |
| durationidle | The duration how long the extension was idle (see idle above), if there was a extension connected in the state. |
| reason | The reason for terminating the state. This field can have the following values:
hc: The call was connected in the call queue and cleared normal.
hw: The call was disconnected by the user while waiting in the call queue.
hr: The call was disconnected by the user while ringing in the call queue.
hb: The call was disconnected by the user while the call queue was sending a busy signal.
rw: The state was terminated because of wait timeout in the call queue.
rr: The state ended because the call was ringing too long in the call queue.
ra: The call was redirected because it was an anonymous call in the call queue.
user: The user pressed a DTMF key that triggered an action in the call queue.
soap: A SOAP response triggered a redirection or termination in the call queue.
missed: The call was missed in the auto attendant. |
| account | The account that was used for the state. |
| account-name | This is primary name of the account that was used in the state. |
| extension | This is the connected agent in the case of a Call Queue or hunt group. |
| extension-name | If there was a extension involved in the state, this field contains the name of the extension. |
{
"call_id": "7ea6aae2794611f08a41f40343441aa4-b2b_1",
"from": "\"61421851837\" <sip:61421851837@hosted.voice.atomcomm.com>",
"to": "\"Main Office IVR\" <sip:61283176200@hosted.voice.atomcomm.com>",
"start": "2025-08-15 05:40:12",
"connect": "2025-08-15 05:40:12",
"end": "2025-08-15 05:41:01",
"duration": 49,
"recordings": [],
"states": [
{
"type": "attendant",
"from": "\"61421851837\" <sip:61421851837@hosted.voice.atomcomm.com>",
"to": "\"Main Office IVR\" <sip:61283176200@hosted.voice.atomcomm.com>",
"language": "au",
"start": "1755200412.815931",
"durationivr": "3020",
"durationring": "",
"durationtalk": "31152",
"durationhold": "",
"durationidle": "",
"reason": "",
"account": "402",
"account-name": "After Office Hours",
"extension": "",
"extension-name": ""
},
{
"type": "mailbox",
"from": "\"61421851837\" <sip:61421851837@hosted.voice.atomcomm.com>",
"to": "\"Main Office IVR\" <sip:61283176200@hosted.voice.atomcomm.com>",
"language": "au",
"start": "1755200446.990906",
"durationivr": "10157",
"durationring": "",
"durationtalk": "4304",
"durationhold": "",
"durationidle": "",
"reason": "",
"account": "700",
"account-name": "Office Voicemail",
"extension": "",
"extension-name": ""
}
]
}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 someone is calling an emergency number
This request is triggered when someone dials an emergency number. There are several variables available for this request:
Parameter | Value |
|---|---|
{domain} | The DNS address of the tenant in which the call happened. |
{domain-display} | The name of the tenant in which the call happened. |
{lang} | The language code for the call. |
{emergencynumber} | The number that has been dialed. |
{hasuser} | true if the call originated from a account on the system, otherwise false. |
{extension} | The account name of the user. |
{user-name} | The name of the user. |
{from-number} | The caller number is it was dialed. |
{from-name} | The caller name is it was dialed. |
{to-number} | The callee number is it was dialed. |
{to-name} | The callee name is it was dialed. |
{timezone} | The time zone of the call. |
{year}, {month}, {day} | The day of the call. |
{hour}, {minute}, {second} | The time of the call. |
{time}, {date} | The day and time of the call in readable format. |
{epoch} | The time in seconds since 1970. |
When a new call comes in
This request is triggered when a new call is started. There are several variables available for this request:
Parameter | Value |
|---|---|
{id} | The internal ID for the call. |
{from} | The "From" header for the call. |
{from-ani-raw} | The username part of the "From" header as it was received. |
{from-ani} | The username part of the "From" header in the domain country code representation. |
{from-ani-e164} | The username part of the "From" header in E164 format. |
{from-ani-nanpa} | The username part of the "From" header in NANPA format. |
{from-ani-plus} | The username part of the "From" header in a global format. |
{from-ani-row} | The username part of the "From" header in ROW-format. |
{from-display} | The display-name part of the "From" header. |
{to} | The "To" header for the call. |
{to-ani-raw} | The username part of the "To" header as it was received. |
{to-ani} | The username part of the "To" header in the domain country code representation. |
{to-ani-e164} | The username part of the "To" header in E164 format. |
{to-ani-nanpa} | The username part of the "To" header in NANPA format. |
{to-ani-plus} | The username part of the "To" header in a global format. |
{to-ani-row} | The username part of the "To" header in ROW-format. |
{to-display} | The display-name part of the "To" header. |
{callid} | The Call-ID for the call |
{domain} | The DNS address of the tenant in which the call happened. |
{lang} | The language code that was assigned to the call. |
{clip} | trueor falsefor CLIP. |
{extension} | The extension ID of the user that started the call, if available. |
{trunk} | The name of the trunk, if available. |
{source} | The source address for the call. |
{target} | The destination for the call in global format. |
{target-ani} | The target in the domain country code representation. |
{target-ani-e164} | The target in E164 format. |
{target-ani-nanpa} | The target in NANPA format. |
{target-ani-plus} | The target in a global format. |
{target-ani-row} | The target in ROW-format. |
When a call connects to an agent
This request is triggered when a call gets connected to an Call Queue agent. There are several variables available for this request:
Parameter | Value |
|---|---|
{id} | The internal ID for the call. |
{domain} | The DNS address of the tenant in which the call happened. |
{from} | The "From" header for the call. |
{from-ani-raw} | The username part of the "From" header as it was received. |
{from-ani} | The username part of the "From" header in the domain country code representation. |
{from-ani-e164} | The username part of the "From" header in E164 format. |
{from-ani-nanpa} | The username part of the "From" header in NANPA format. |
{from-ani-plus} | The username part of the "From" header in a global format. |
{from-ani-row} | The username part of the "From" header in ROW-format. |
{from-display} | The display-name part of the "From" header. |
{to} | The "To" header for the call. |
{to-ani-raw} | The username part of the "To" header as it was received. |
{to-ani} | The username part of the "To" header in the domain country code representation. |
{to-ani-e164} | The username part of the "To" header in E164 format. |
{to-ani-nanpa} | The username part of the "To" header in NANPA format. |
{to-ani-plus} | The username part of the "To" header in a global format. |
{to-ani-row} | The username part of the "To" header in ROW-format. |
{to-display} | The display-name part of the "To" header. |
{callid} | The Call-ID for the call. |
{lang} | The language code that was assigned to the call. |
{clip} | trueor falsefor CLIP. |
{extension} | The extension ID of the agent. |
{group} | The ID of the call queue (ACD). |
In addition to the from-* and to-* variables there are also orig-from-* and orig-to-* variables available that show the value when the call entered the tenant.
When a new mailbox message is available
When a user in the domain has received a new mailbox message, the system can send out a webhook that contains information about the message. 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. |
{display} | The extension name of the user. |
{title} | The title for the user. |
{from} | The caller-ID of the one who left the message. |
{to} | The called number. |
{start} | A timestamp when the message was received. |
{duration} | The duration of the message. |
{filename} | The filename on the file system for the message. |
{mp3} | The filename on the file system for the message if a MP3 file is available. |
{new} | A flag that shows if the message was already read by the user or marked as read. |
{attribute} | The attribute for the message, e.g. "urgent" or "private". |
{type} | The type of the message, typically "msg" for a voicemail message. |
{callid} | The Call-ID of the message. |
{cell} | A list of the cell phone that was assigned to the user. |
{email_address} | This contains the email address or addresses of the user. |
{email_vmail} | The setting that tells the PBX weather to send a voicemail to the user, and if to attach the WAV file. |
{text} | The text from the voice to text transcription (if available). |