#
Call Hangup
#
Usage
A call has been hung up or disconnected.
#
Syntax
webClient.onCallHangup(listener: Function);
#
Arguments
#
Sample Javascript
const callback = (response) => {
if (response.error) console.error(response.error);
if (response.result)
alert(response.result);
}
webClient.onCallHangup(callback);
#
Response
This method is asynchronous. The response is returned in an object passed to a callback method. The response object contains the following fields.
Result
Example
success
Response
Returns this object if the API method call was invoked successfully, false otherwise.
{
result: {
agentInteractionId: number;
hangupOrigin: 'agent' | 'contact';
timestamp: number; // Unix timestamp
}
}