Webhooks

Create custom or predefined webhooks and define custom parameters.

You can set up Webhooks depending on the data you want PBX Stats to send to an external system.

To configure webhooks, click Configurations in the main menu and select Webhooks.

Here, you can view a table with your data on webhooks:

Screenshot of the **Webhooks** page

Webhooks page

Besides editing and deleting the selected webhook, the Actions column lets you make any webhook active or inactive and add custom names for hangup causes in the Hangup Causes Map.

Screenshot of the actions list

Actions list

Creating a New Webhook

To create a webhook:

  1. Click Configurations in the main menu and select Webhooks

  2. Сlick Create New Webhook at the top-right of the page .

  3. The New Webhook window opens.

    Screenshot of the **New Webgook** form

    New Webgook form

  4. Fill in the fields according to the instructions below in the table below.

  5. Click Save.

FieldInstructionsWebhook Type
Type​Select the webhook type: Custom or Predefined. Predefined webhooks are the ones already available for CRMs, which are most commonly integrated with PBX Stats. Custom webhooks can be set for each individual case.​Both​
Name​Enter the webhook name.Both
URL​Specify the webhook receiver URL.Both​
Call TypesSelect the call types for which the webhook will work.Both
RetriesSelect the number of update-sending retries. The default value is 3.Both
Delay ​Select the time interval (in seconds) from the event till the moment the information about it is sent. If no delay is needed, leave the default value (0).Both
Integration Type ​Select one of the options: Voip Cloud, Tradersoft, or Salesforce. For creating predefined webhooks for the Voip Cloud integration type, please contact our support team.Predefined
Event TypeSelect the event that triggers sending of updates: Call Start, Call End, or Call AnswerCustom​
Method​Select the data sending method: Get, Post, or Raw Post (JSon)Custom​
Parameter Map ​In the left column, select one or more parameters to send. In the right column, specify the corresponding fields on the receiver’s side. For details on webhook parameters, please refer to this table.​Custom​​​

A predefined webhook:

Screenshot of the predefined webhook page

Predefined webhook page

A custom webhook:

Screenshot of the custom webhook page

Custom webhook page

Webhook Parameters

The Parameters map section lets you set custom webhook parameters.

ParameterDescription
uniqueidThe unique ID of the call
statusThe call status
bill_durationThe duration that clients pay for
dstThe phone number destination
srcThe source (device, extension) the call came from
leadidThe lead ID
caller_id_numberThe phone number that is used as an identity for the call
public_recordingThe link to the CDR recording of the call
bridgedShows if the call was connected to the agent or not
start_atThe time when the call started
durationThe total call duration, including the ringing time, initialization time, and bill duration
end_atThe time when the call ended
hangup_initiatorThe side that hung up the call
hangup_causeThe reason why the call ended, the values can be Answered, Busy, Canceled, Failed, No Answer.