Working with the CTI server
Computer telephony integration (CTI) is the technology that enables computers to interact with telephones by means of connecting them to a single server.
A CTI server allows data exchange between different clients connected to Voximplant Kit. This communication helps create a unique center to process, transmit, and store data. Applications most frequently integrated with the Voximplant Kit telephony are various CRM and technical support programs.
How does it work?
CTI opens a websocket endpoint for client connection. Once connected, clients are grouped into virtual rooms for further communication.
One shared virtual room is created for each account. All connections must be authorized using an access_token (see below).
Clients connected to a shared virtual room receive all ACCOUNT events.
How to connect to the CTI server?
Open any websocket to connect to the server, for example Postman, and use the following connection URL - wss://{host}/{domain_name}-{md5(token_id)}?access_token={token}, where:
host is the CTI server hostname. Copy the hostname by clicking the API access data button in the Administration > Security > API tokens section.
domain_name is your account name. Copy your account name by clicking the API access data button in the Security > API tokens section.
token is your API token. Create an API token in the Administration > Security > API tokens section.
token_id is your API token ID. Copy the identifier of the token you created in the Administration > Security > API tokens section.
CTI and websocket interaction protocol
Event: connection_accepted
The event the server sends back to a client upon successful connection. The client receives Sender_id that needs to be passed in each message to the CTI server.
Event: connected
The event each client sends upon connection to the server.
Event: outgoing_call
The event sent when an outbound call is started.
Event: call_connected
The event sent when a call is connected.
Event: call_failed
The event sent when a recipient fails to answer the call.
Event: data_updated
The event sent when call data is updated.
Event: incoming_call
The event sent when an inbound call is started.
Event: status_changed
The event sent when a user status changes.
Event: call_disconnected
The event sent when a call is ended.
Command: make_call
The command to a user to call a phone number.
Command: set_variables
The command to a user to add variables to a phone call.
Command: logout
The command to a user to log out.