Call events (ccsevents)
Description
Telephony events for the call center layer: CCS — Calls, Connections, Seances. Built from callevents events and describe a call in terms of:
-
call— leg: server connection to one subscriber; -
connection— dialog uniting legs (more than two during a multiple call); -
seance— session: a chain of dialogs linked by transfers. There are no separate session events; membership is passed by theidseancefield and*_attach_to_seanceevents.
Identifiers are used in Token API ccs requests: idcall — data.id of call_* events, idconn — data.id of connection_* events (format <callid>.<timestamp>), idseance — the idseance field.
Class |
|
Domain type |
|
Destination types |
|
Source logical roles |
|
Handler logical role |
Subscription and delivery
-
Subscription:
"events": ["ccsevents.*"]or theccsevents.<type>list;"objects": "any"(the event is not related to objects). -
Subscriptions are received by Token API (websocket) and webhooks (not recommended: about 20 requests per call); to Kafka — when kafka_mustache is configured in the domain.
-
If a token has several matching subscriptions, the event arrives for each with its own
sid. -
Events of one dialog (
connection) are generated sequentially and sent to domain subscribers in the same order. -
Generation is disabled in the master domain: the value
"ccs"in theeventslist of the disabled_plugins setting.
Notification format:
["notify", {"sid": "...", "class": "ccsevents", "type": "connection_create", "eventts": 1791975832258, "data": {...}}]
eventts — time of the source callevents event; several ccsevents events may have the same value.
Cross-domain call
Events are duplicated to the working domains whose subscribers participate in the call:
-
the domain where the first called fork appears first receives the accumulated call events (with original
eventts), then current ones; -
while a multiple call is in progress, each domain receives events of its legs and all dialog events;
-
after the answer only the answering side domain receives events; the others receive
connection_delete; -
connection_set_record_infoandconnection_set_asrare received by each domain for its own conversation recording.
Events
| Type | When |
|---|---|
A leg was created: calling, called, or pickup |
|
The leg is connected |
|
The leg state changed |
|
The leg was moved to another session |
|
A DTMF character was received |
|
The leg was deleted |
|
A dialog was created |
|
The dialog changed |
|
A leg was linked to the dialog |
|
The dialog was moved to another session |
|
Conversation recording started |
|
Recording paused or resumed |
|
Recording placed in storage |
|
Transcription result received |
|
The call failed (before dialog creation) |
|
The dialog completed |
Typical order for an answered call: call_create (A) → connection_create → connection_link_call → connection_update → call_create (B) → connection_link_call → call_set_state (ringing) → call_update (A, B) → connection_update (connected) → … → call_set_state (finished) → call_delete (A, B) → connection_delete.
Event stream diagnostics
The Token API ccs ccs_setup request manages the recent event buffer — for reconciling what was sent by the ccs plugin and received by the connection:
["ccs_setup", {"qid": 1, "cmd": "set_ccsevents_buffer", "size": 1000}]
-
set_ccsevents_buffer— buffer sizesize(0..50000; 0 — disable). While the buffer is enabled, all domain events contain theorderkey(sequence number) andidc(dialog identifier) fields. -
dump_ccsevents_buffer— dump the plugin and connection buffers to the server log and clear them. -
ping— check the domain ccs plugin availability.