API Invocation Process
This section describes the process of invoking APIs for a click-to-dial call between a customer and an agent. Detailed procedure and API description help developers understand how to use the AICC APIs to implement voice and video click-to-dial between customers and agents. The following describes the entire process of click-to-dial.

1. In the click-to-dial scenario, a customer must have been connected to an agent through a multimedia message.
2. Before a customer uses the click-to-dial function, the ckheckClickToCallSupport API needs to be invoked to check whether the current tenant space supports the click-to-dial function. If the current tenant space does not support click-to-dial, the click-to-dial ends.
3. If the tenant space supports the click-to-dial function, the createClickToCall API needs to be invoked to create a click-to-dial call. After the click-to-dial call is created, the AICC preoccupies an agent.
4. After a click-to-dial call is created, the getClickToCallEvents API is polled to obtain the corresponding event.

There are five types of events: call setup success event, call queuing event, call queuing timeout event, call release event, and call failure event. If a call setup success event is obtained, the connection between the agent and customer is normal and the call can be connected. If a call queuing event is obtained, the call is still in progress. If a call queuing timeout event or call failure event is obtained, the click-to-dial call fails. If a call release event is obtained, the call ends.
5. After a connection success event is obtained, a WebRTC call needs to be started on the customer view. At this time, the customer is connected to the agent.
6. The click-to-dial call is connected. The agent can have a voice or video call with the customer.
7. When the call ends, the dropClickToCall API is invoked to release the click-to-dial call. At this time, the click-to-dial call ends.

After a call connection success event is obtained, a WebRTC call needs to be started. A third party needs to adapt the agent software to the WebRTC gateway.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot