Ziwo Voice API
Overview
This document provides an overview of how to integrate Ziwo's telephony features into your webpage. It covers embedding the Dialpad plugin, initiating outbound calls, handling events for inbound and outbound calls, and utilizing the post-call actions such as call history and recording retrieval.
1. Embed Dialpad on Your Webpage
To integrate Ziwo's Dialpad into your webpage, follow these steps:
- Embed the Plugin iFrame: You can easily embed the Ziwo Dialpad plugin by using the provided iFrame. Detailed instructions and examples for embedding can be found in the official documentation here:
Ziwo iFrame Integration Guide
2. Outbound Call Flow
Ziwo allows you to initiate outbound calls directly from your webpage. The following methods can be used:
a. Start Call or ClickToCall Function
- If your platform supports JavaScript functions, you can use the following functions to initiate outbound calls:
- startCall() Startcall
- clickToCall() Clicktocall
These functions trigger a click-to-call action directly from your webpage and enable users to initiate calls to their contacts.
b. Click to Call REST API
- If your platform does not support the JavaScript methods above, you can make use of the Click to Call Rest API. This API allows you to programmatically initiate outbound calls via HTTP requests.
Note: The default call options, such as mute, hold, and transfer, will be accessible through the plugin's iFrame itself. The same applies to inbound call handling.
3. On-Call Actions on Your Webpage
You can configure your webpage to respond to specific call events during an active call. These events include inbound and outbound call actions.
a. Call Event Listening
-
You can listen for various call events on your webpage by using the provided methods. The events you can handle are:
-
Inbound Call Events:
ringing
: Trigger actions when the call is ringing (e.g., display an incoming call popup).active
: Trigger actions when the call is active (e.g., show the call screen with call options).hangup
: Trigger actions when the call ends (e.g., display call summary or offer options to add call notes).
-
Outbound Call Events:
trying
: Trigger actions when an outbound call is attempting to connect (e.g., show a connecting status).answering
: Trigger actions when the outbound call is answered (e.g., display call options).hangup
: Trigger actions when the call ends (e.g., display call details or recording).
-
The events provide key information such as Call ID, From number, and To number, which can be used to link these actions to a specific call.
4. Post-Call Actions
After a call has ended, you can use the following methods to perform post-call actions like retrieving call details and recordings:
a. On Hangup Event
- When the
hangup
event is triggered, you can retrieve specific details about the call using the Call History REST API .
b. Get Call Recording
- To access the recording of the call, you can use the Get Recording URL API. This allows you to retrieve the call's recording and present it on your webpage.
Note: These APIs can be used to display call details, such as call notes, on your webpage. You can track the Call ID from the event responses and use it as a request parameter in these APIs to fetch the relevant call details and recordings.
5. Additional Resources
For a deeper understanding and further configuration options, please refer to the following resources:
a. Authentication - Access Token Generation API
- To authenticate and access the APIs, you will need to generate an access token. Detailed instructions for token generation can be found in the Authentication Guide.
b. API Basics
- For a basic overview of Ziwo's API usage, refer to the API Basics.
c. iFrame Integration Features
- A comprehensive list of features and classes available in the iFrame integrations is available in the official documentation:
iFrame Integration Features.
d. CTI APIs for Call Actions
- A detailed list of REST APIs for handling call actions (e.g., mute, hold, transfer) is available in the CTI APIs documentation.
e. CDR APIs for Reporting
- For accessing call data records (CDRs), refer to the CDR APIs documentation.
By following this integration guide, you can seamlessly embed and manage Ziwo's telephony features on your webpage, enabling a smooth and efficient communication flow. For further assistance, refer to the official documentation or contact Ziwo support.
.