To get the current status of a call using the JSONP interface, you need to issue a GET request to /call/2.0/<sessionId>/status?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 ‘processCallStatusResponse’, then the response body is as follows (for a connected call):

processCallStatusResponse({"sessionid":"<sessionId>","callState":"connected","time":"<connectedTime>","more":"yes", "hasChanged":"yes"});

where <sessionId> is the session ID for the new call and <connectedTime> is the time that the call was connected.

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