The Stopcall API is part of Voiso's Voice APIs. Use it to end calls for agents from external systems.
Please refer to the detailed API endpoint specification: Stop call
End outbound calls
Using the click2call (click-to-call) API, you can end calls for specific agents from an external system.
For example, you can integrate a one-click feature into your CRM or another system to initiate an outbound call using Start call, eliminating the need to dial the number manually. To end the current outbound call for a specific agent use Stop call.
When the external system triggers the click2call API, Voiso returns the call UUID. You can gather all call data in your system using the 'call outcome logging' webhook with the same call UUID and the CDR API to obtain additional call details.
With these integration capabilities, you can build comprehensive business processes for your organization and establish a reporting system.
Prerequisites
- The agent should be a user in your contact center and have an extension configured.
- The agent must be logged in.
- The agent must be handling a call.
Making requests
The Stopcall API requires the Base URL (cluster_id) and the contact center API key (client_api_key). It uses the following parameters to terminate a call:
The agent
parameter is the agent's extension. This tells Voiso whose call to end. The call is stopped automatically on the agent's configured phone in Agent Panel, the Omnichannel Workspace, or a third-party SIP client (softphone or hard phone).
For example:
{
"method": "POST",
"url": "https://cluster1.voiso.com/api/v1/cc7c7b8981d...0ab6c3/click2call_hangup",
"params": {
"agent": "1002"
}
}
Response
There is no response body for this API.
Troubleshooting
The following issues are sometimes encountered:
No active calls
If you see this error, "error": "No active calls"
, there is no active call on the extension you specified.
Rate limit exceeded
If you see this error, "error": "Rate limit exceeded"
, the number of permitted requests per agent to the server is exceeded, and requests are being throttled. There must be a minimum of 1 second between Stopcall requests for an agent.
Invalid agent's extension
If you see this error, "error": "Invalid agent's extension"
, the extension specified is either in the wrong format or is not assigned to any agent. Ensure the agent's extension is correctly formatted.
Invalid API key
The Stopcall API uses the contact center API key to validate the request. If you see this error, "error": "Invalid API key"
, check that you are using the correct contact center API key. For more information about API keys, refer to Authentication.