To end a call using the JSONP interface, you need to issue a GET request to /call/2.0/<sessionId>/end?callback=<callbackFunction> where:

If the request is successful, then the response body should contain a JavaScript function call with the JSONresponse, which contains call status information for the call, embedded in the function call. The name of the function is specified in the callback request parameter.

For example, if the callback request parameter contains the name ‘processEndCallResponse’, then the response body is as follows (for a connected call):

processEndCallResponse({"callState":"ending"});

If the request is unsuccessful, the response body is:

processCallStatusResponse({"statuscode":"<statusCode>","reason":"<reason>"});

where <statusCode> contains the HTTP status code (i.e. 400, 403, 404) and <reason> contains the reason for the unsuccessful request.


Copyright © 1997, 2016 Oracle and/or its affiliates. All rights reserved. Legal Notices