- Help center
- Developers
- Voice
Integration - Call Events
Overview
Telephony module supports reporting of call events to 3rd party HTTP endpoints via web hooks registered with the rule action Set URL to Open. The action depends on URL adapter object responsible for holding a specific endpoint URL and assigning parameter names the corresponding content placeholders.
When configured, the action will trigger a HTTP GET request to the endpoint at the following events:
- immediately after executing Set URL to open action, which is at the call start
- on call pickup
- on call hangup
- in case it's a missed call there will be an additional request to report the fact, immediately following the hangup request
Action setup
It is possible to configure one or more web hooks either globally for all calls or inside individual routing rules. In either case it's required to add Set URL to open to the action list, specify on call state events, in backend as the 1st action parameter and pick an URL adapter holding a 3rd party endpoint configuration as the 2nd parameter.
Examples of configuration:
- a global action for all types of calls:
- a rule specific action for incoming calls only:
Adapter setup
- copy-paste the endpoint URL into the URL field of the adapter
- parameter list will be populated automatically
- for each parameter specify a placeholder
Supported placeholders
Name | Type | Values (comma separated) |
{{DialApiEventName}} | string | start,hangup,pickup,missed |
{{DialApiEventCode}} | integer | 0,1,2,3 |
{{CallID}} | long integer | |
{{CallUUID}} | GUID | |
{{CallerID}} | string | |
{{DID}} | string | a.k.a. line ID |
{{ResponderAgentExt}} | string | e.g. 1001 |
{{ResponderAgent}} | string | e.g. Kasper |
{{ResponderUserID}} | int | integer ID of the user account (login) associated with the responder agent, e.g. 1234 |
{{ResponderUserName}} | string | name of the user account (login) associated with the responder agent, e.g. Administrator |
{{LastQueueName}} | string | |
{{CallTypeName}} | string | Incoming,Outgoing,Internal,Login,API,Conference |
{{CallTypeCode}} | integer | 1,2,3,4,5,6 |
{{StartTimestampUTC}} | long integer,Java timestamp,UTC | e.g.1595496055313 |
{{PickupTimestampUTC}} | long integer,Java timestamp,UTC | e.g.1595496055313 |
{{TotalWaitTimeMs}} | long integer,duration in milliseconds | e.g. 12833 |
{{EndTimestampUTC}} | long integer,Java timestamp,UTC | e.g.1595496055313 |
{{IsCallAnswered}} | bit | 0,1 |
{{IsCallRecorded}} | bit | 0,1 |
{{RecordingURL}} | string | e.g. https://localhost:8080/_cros_/master/?uid=form_faster_downloadcall&target=self§ok=3511b272f4fb03ecf900b80b1cc5b8fe&nId=103870 |
{{RecordingURL_asBase64}} | string | Same as {{RecordingURL}}, but encoded as base64 |
{{RecordingURL_asURIComponent}} | string | Same as {{RecordingURL}}, but encoded as described here |
Request URL samples
The following samples have been obtained using an URL adapter shown on the screenshot below:
- call start:
https://server/endpoint?Event=start&EventCode=0&CallId=103871&CallGuid=7be71282-c9a8-4a95-8ace-0f4e2ebc0bc5&CallerID=dev2Incoming&DID=855555&ResponderAgent=&QueueName=&CallTypeCode=1&CallTypeName=Incoming&StartTimestampUTC=1595496055313&PickupTimestampUTC=&TotalWaitTimeMs=&EndTimestampUTC=1595496055313&IsCallAnswered=0&IsCallRecorded=&RecordingURL=
- missed call hangup:
https://server/endpoint?Event=hangup&EventCode=1&CallId=103871&CallGuid=7be71282-c9a8-4a95-8ace-0f4e2ebc0bc5&CallerID=dev2Incoming&DID=855555&ResponderAgent=Root&QueueName=Simple%20queue&CallTypeCode=1&CallTypeName=Incoming&StartTimestampUTC=1595496055313&PickupTimestampUTC=&TotalWaitTimeMs=12833&EndTimestampUTC=1595496069313&IsCallAnswered=0&IsCallRecorded=0&RecordingURL=
- missed call event sent after hangup:
https://server/endpoint?Event=missed&EventCode=3&CallId=103871&CallGuid=7be71282-c9a8-4a95-8ace-0f4e2ebc0bc5&CallerID=dev2Incoming&DID=855555&ResponderAgent=Root&QueueName=Simple%20queue&CallTypeCode=1&CallTypeName=Incoming&StartTimestampUTC=1595496055313&PickupTimestampUTC=&TotalWaitTimeMs=12833&EndTimestampUTC=1595496069313&IsCallAnswered=0&IsCallRecorded=&RecordingURL=
- call pickup:
https://server/endpoint?Event=pickup&EventCode=2&CallId=103870&CallGuid=2f9ad1e4-ccc1-4019-9817-0d028f7448d3&CallerID=dev2Incoming&DID=855555&ResponderAgent=Root&QueueName=Simple%20queue&CallTypeCode=1&CallTypeName=Incoming&StartTimestampUTC=1595496018843&PickupTimestampUTC=1595496027493&TotalWaitTimeMs=7553&EndTimestampUTC=1595496027843&IsCallAnswered=1&IsCallRecorded=&RecordingURL=
- answered call hangup:
https://server/endpoint?Event=hangup&EventCode=1&CallId=103870&CallGuid=2f9ad1e4-ccc1-4019-9817-0d028f7448d3&CallerID=dev2Incoming&DID=855555&ResponderAgent=Root&QueueName=Simple%20queue&CallTypeCode=1&CallTypeName=Incoming&StartTimestampUTC=1595496018843&PickupTimestampUTC=1595496027990&TotalWaitTimeMs=7700&EndTimestampUTC=1595496035843&IsCallAnswered=1&IsCallRecorded=1&RecordingURL=https://localhost:8080/_cros_/master/?uid=form_faster_downloadcall&target=self§ok=3511b272f4fb03ecf900b80b1cc5b8fe&nId=103870