Webhooks

Webhooks let IvozProvider notify external HTTP services about call events in real time. Whenever a subscribed event happens on a matching call, IvozProvider sends an HTTP POST request to the configured endpoint with a customizable JSON payload.

Hint

Webhooks can be enabled per Brand basis via Features.

Configurable fields

Name

Used to identify this webhook.

Description

Optional free text describing the webhook purpose.

URL

Endpoint that will receive the HTTP POST request every time a subscribed event is triggered.

Direction

Restricts the webhook to calls of a given direction:

  • Inbound: only incoming calls.

  • Outbound: only outgoing calls.

  • Both: incoming and outgoing calls (default).

Events

Each webhook subscribes to one or more call events. A POST request is sent every time a subscribed event happens on a matching call:

Start

Sent when a new call starts.

Ringing

Sent when the destination starts ringing.

Answer

Sent when the call is answered.

End

Sent when the call ends.

Update CLID

Sent when the caller line identification (CLID) is updated during the call.

Template

The body of the POST request is defined by the Template field: a valid JSON document where {{placeholder}} marks are replaced with the actual call values before the request is sent.

Hint

A default template is provided when creating a new webhook. You can adapt it freely as long as the result is valid JSON.

Available placeholders

These are the placeholders that can be used in the template at brand level:

{{event}}

Event that triggered the request (start, ring, answer, end, updateClid).

{{time}}

Event timestamp.

{{callId}}

Call-ID of the SIP dialog.

{{companyId}}

Internal ID of the client involved in the call.

{{company}}

Name of the client involved in the call.

{{ddiId}}

Internal ID of the involved DDI.

{{crId}}

Internal ID of the carrier used (outbound calls).

{{dpId}}

Internal ID of the DDI provider used (inbound calls).

{{direction}}

Call direction (inbound/outbound).

{{caller}}

Caller number in E.164.

{{callee}}

Callee number in E.164.

{{carrier}}

Name of the carrier used (outbound calls).

{{ddiProvider}}

Name of the DDI provider used (inbound calls).

{{iden}}

Webhook identifier.

Assignment levels

Brand operators can define webhooks at two different levels:

Client level

Configured in each client configuration (Webhooks section). Applies to every call of that client, regardless of the DDI involved.

DDI level

Configured in a specific DDI. Applies only to calls of that DDI.

Hint

The available placeholders and events are the same at both levels; only the scope of matching calls changes.