Skip to main content
Webhooks
Updated over a week ago

A webhook is a way for an application to immediately deliver real-time data to other applications. It’s more efficient than APIs: APIs send requests and receive responses, while webhooks don’t require any request, they send data when it’s available.

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:

1.png

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.

2.png

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.

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

  5. Click Save.

Field

Instructions

Webhook 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 Types

Select the call types for which the webhook will work.

Both

Retries

Select 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 Type

Select the event that triggers sending of updates: Call Start, Call End, or Call Answer

Custom

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:

4.png

A custom webhook:

5.png

Webhook Parameters

The Parameters map section lets you set custom webhook parameters.

Parameter

Description

uniqueid

The unique ID of the call

status

The call status

bill_duration

The duration that clients pay for

dst

The phone number destination

src

The source (device, extension) the call came from

leadid

The lead ID

caller_id_number

The phone number that is used as an identity for the call

public_recording

The link to the CDR recording of the call

bridged

Shows if the call was connected to the agent or not

start_at

The time when the call started

duration

The total call duration including the ringing time, initialization time, and bill duration

end_at

The time when the call ended

hangup_initiator

The side that hung up the call

hangup_cause

The reason why the call ended, the values can be Answered, Busy, Canceled, Failed, No Answer

Did this answer your question?