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:
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:
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 |
{{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 |
The following samples have been obtained using an URL adapter shown on the screenshot below:
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=
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=
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=
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=
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
0 Comments