The Event Subscription Service (ESS) provides a set of topics including the SCG-Voice-Call to which it makes available several event type's notifications (webhooks). These webhook notification are delivered as they occur, providing the enterprise application the required tools to handle the call operation.
This document lists the SCG-Voice-Call event types available in ESS and the information included in the webhook notifications.
SCG-Voice-Call Event Types
The first reference to all available event types can be found in the SDC UI when creating a subscription, once you get into the Subscription creation dialog the SCG-Voice-Call topic must be selected:
Next, you can click on the drop-down list for Event Type to get the available notification types for the selected Topic:
Event types
Below we detail all available event types for SCG-Voice-call topic:
Event-type | Fields |
bridge_playback_state_change | bridge_id, state, application_id, bridge_external_id |
bridge_tts_state_change | bridge_id, state, application_id, bridge_external_id |
call_incoming_received |
reason_code, encrypted_event_fields, to_address, reason_description, from_address, application_id, call_id |
call_playback_state_change | state, call_external_id, application_id, call_id |
call_state_change | reason_code, previous_state, external_call_id, call_price, encrypted_event_fields, new_state, to_address, reason_description, from_address, application_id, call_duration, call_id |
call_tts_state_change | encrypted_event_fields, state, call_external_id, application_id, call_id |
collector_state_change | reason, collect_id, encrypted_event_fields, external_collect_id, digits, call_external_id, application_id, call_id |
conference_member_play_state_change | member_id, conference_id, conference_external_id, state, call_external_id, application_id, member_external_id, call_id |
conference_member_state_change | member_id, conference_id, active_members, conference_external_id, mute, state, call_external_id, application_id, member_external_id, hold, call_id |
conference_member_tts_state_change | member_id, conference_id, conference_external_id, state, call_external_id, application_id, member_external_id, call_id |
conference_playback_state_change | conference_id, conference_external_id, state, application_id |
conference_speak_state_change | conference_id, conference_external_id, state, application_id |
conference_state_change | conference_id, conference_external_id, mute, state, application_id, hold |
dtmf | encrypted_event_fields, call_external_id, application_id, call_id, digit |
recording_state_change | reason_code, recording_id, start_time, end_time, reason_description, state, call_external_id, application_id, recording_external_id, call_id |
Webhook notifications examples (JSON)
call_state_change:
{
"topic": "SCG-Voice-Call",
"attempt": 1,
"event": {
"fld-val-list": {
"reason_code": "200",
"previous_state": "STARTED",
"company-id": XXXXXX,
"external_call_id": "",
"call_price": 0,
"new_state": "ACTIVE",
"to_address": "+1346787XXXX",
"reason_description": "SUCCESS",
"from_address": "1201882XXXX",
"application_id": XXXXX,
"call_duration": 0,
"call_id": "N7D5CUADInxYeSIpbrJAG4"
},
"evt-tp": "call_state_change",
"timestamp": "2023-09-13T22:06:25.543Z"
},
"event-id": "SQDTgOgjReuLTmxgxZOlCw"
}
collector_state_change:
{
"topic": "SCG-Voice-Call",
"attempt": 1,
"event": {
"fld-val-list": {
"reason": "TERMINATING_DIGIT",
"company-id": XXXXXX,
"collect_id": "EtLYMFlVi3CAhwVY8y8Mg6",
"external_collect_id": "",
"digits": "1212",
"call_external_id": "",
"application_id": XXXXX,
"call_id": "N7D5CUADInxYeSIpbrJAG4"
},
"evt-tp": "collector_state_change",
"timestamp": "2023-09-13T22:06:51.907Z"
},
"event-id": "bLvkfVXkQSSNOc8JSnf9qg"
}
dtmf:
{
"topic": "SCG-Voice-Call",
"attempt": 1,
"event": {
"fld-val-list": {
"company-id": XXXXXX,
"call_external_id": "",
"application_id": XXXXX,
"call_id": "N7D5CUADInxYeSIpbrJAG4",
"digit": "1234567#"
},
"evt-tp": "dtmf",
"timestamp": "2023-09-13T22:07:02.456Z"
},
"event-id": "RDRnke4uSO_yqJg0nUwS5g"
}
Webhook notifications examples (JSON)
call_state_change:
<?xml version="1.0" encoding="UTF-8"?>
<event id="DFim9WQKSeK75nboWCxDYA" topic="SCG-Voice-Call" attempt="1" evt-tp="call_state_change" timestamp="2023-09-22T16:15:26.404Z" >
<fld-val-map >
<fld-val type="STRING" name="reason_code" >200</fld-val>
<fld-val type="STRING" name="previous_state" >STARTED</fld-val>
<fld-val type="DECIMAL" name="company-id" >XXXXXX</fld-val>
<fld-val type="STRING" name="external_call_id" ></fld-val>
<fld-val type="DECIMAL" name="call_price" >0</fld-val>
<fld-val type="STRING" name="new_state" >ACTIVE</fld-val>
<fld-val type="STRING" name="to_address" >+1346787XXXX</fld-val>
<fld-val type="STRING" name="reason_description" >SUCCESS</fld-val>
<fld-val type="STRING" name="from_address" >120188XXXXX</fld-val>
<fld-val type="DECIMAL" name="application_id" >XXXXX</fld-val>
<fld-val type="DECIMAL" name="call_duration" >0</fld-val>
<fld-val type="STRING" name="call_id" >fBVoSWyhljC3mCer2m7z75</fld-val>
</fld-val-map>
</event>
dtmf:
<?xml version="1.0" encoding="UTF-8"?>
<event id="h-jqGB4XRvOYqZwewFQgZw" topic="SCG-Voice-Call" attempt="1" evt-tp="dtmf" timestamp="2023-09-22T16:15:36.358Z" >
<fld-val-map >
<fld-val type="DECIMAL" name="company-id" >XXXXXX</fld-val>
<fld-val type="STRING" name="call_external_id" ></fld-val>
<fld-val type="DECIMAL" name="application_id" >XXXXX</fld-val>
<fld-val type="STRING" name="call_id" >fBVoSWyhljC3mCer2m7z75</fld-val>
<fld-val type="STRING" name="digit" >1234567#</fld-val>
</fld-val-map>
</event>
For more articles about Event Subscription Service click here
0 Comments