Last updated
Last updated
PortSIP sends the events to the webhook in JSON object encoded using UTF-8, the events are defined as the below.
The definition of the call target: In PortSIP PBX, a call target refers to an endpoint. For example, if user 102 registers with the PBX from an IP phone and an app simultaneously, when user 101 calls 102, the PBX will send INVITE messages to both the IP phone and the app. In this scenario, the CDR will have two call targets: one for the IP phone and another for the app.
When the PBX sends an INVITE to a target, and the call target is ringing, answered, hung up, or the call to the target fails, the PortSIP PBX will send this call target event to the webhook.
This event is sent to the webhook when a call is starting, it contains the below fields:
This event is sent to the webhook when call information is updated, it contains the below fields:
When a call is completed (either hung up or failed), the PortSIP PBX sends this event to the webhook. This event includes all information about the call. Below is an example of a CDR.
The call flow is as follows: caller 1888722 dials 18800606 > trunk > PBX IVR (5000) > Queue (8000) > Agent (102, 103).
As per the , the call target event includes the below information.
Since a call may be forwarded multiple times to different during its duration, PortSIP PBX includes all call targets in the CDR when the call is completed. We can simply parse the call_targets JSON array object to access the call target information.