...
CallerExtension - the extension number initiating an outgoing call (flow event - dial-out). It has a format like “453*111@PBXdomain”, and we only take what's before the at (@) sign.
CalledDID - the source of the call (the number called on the PBX from outside, the number through which the call entered the PBX) - if present, it must be passed and fixed in the integration.
Bridged - indicates whether the call was globally accepted by a user of the phone extension within the entire PBX. If accepted by an employee, then bridged = yes, if not, then bridged = no (no answer to the incoming call through a regular phone extension). This parameter is only passed in hangup events from special IVR and Queue extensions (ext type = phone or queue).
[Transfered] => yes - relevant only for outgoing calls (flow event - dial-out) and corresponding call events answer and hangup.
[RemoteNumber] - may only be present in flow event dial-in and indicates the external number associated with this call. Suggested for understanding which external number was connected during a call transfer from extension to extension using transfer commands #1 and *2 and to use it in such situations instead of CallerIDNum when registering the call.
CallBackID - callback ID (ID of outgoing call initiation through API). Added if the call is generated on behalf of some extension, but the connection is made between an external number and some other number/extension, different from the initiating extension. For example, when a website call order script connects the entered number to the client PBX's IVR.
[Duration] - the duration of the call for each separate [SubCallID]
[RecID] - the ID of the call recording
...
These are not all the parameters contained in events. The full list of parameters and a detailed description of the event parameters are indicated in the documentation.
Integration Logic - General Aspects
Upon receiving a call - transfer the call to the responsible employee
Initially, the call enters an IVR type extension (type = ivr), where a "Call interactive" rule (documentation) is added, this rule is most often used in integrations for the SetVar action, to set a variable whose value will contain the extension number to which the call should be transferred.
...
Call interactive for integrations is discussed in more detail here.
Registering Call Data
All events of regular phone extensions (type = phone) for [dial-in] and [dial-out] events are analyzed and in the case of an [answer] event are registered upon the event hangup and [SubCallID], as separate calls, instead of [CallID]. Thus, it is possible to divide the call within the PBX into separate legs (call legs) - before and after the transfer and register them as separate calls. Missed incoming calls are recorded based on the presence in hangups from IVRs and Queues of the parameter Bridged=no. It should be remembered that Bridged=yes is always a successful incoming call. Data for it must be recorded when analyzing [dial-in] events within their own [SubCallID].
Call Initiation (ClickToCall / CallBack)
Call initiation (/callback/) (documentation, full list of parameters and description)
...