The Call Setup API makes use of a long‐polling mechanism for the Get Call Status request. When a request is made, the server‐side API component will only return a response when either the call status has changed since the last request, or the long poll timeout period for the request has elapsed.
If the call status has changed since the last request, the Call Setup API returns the following attribute values:
Response Attribute | Value |
---|---|
callState | The new state of the call. |
more | The time that the new state took effect. Omitted for unknown state. |
time | This is set according to the new state: maybe if the new state is no if the new state is yes if the new state is |
hasChanged | This is set to yes. |
If the long poll timeout period is reached, the Call Setup API returns the following attribute values:
Response Attribute | Value |
---|---|
callState | The new state of the call. |
more | The time that the new state took effect. Omitted for unknown state. |
scheduledTime | If the current state is scheduled then this will denote the scheduled start time of the call. Omitted for all other call states. |
time | This is set according to the new state: maybe if the new state is no if the new state is yes if the new state is |
hasChanged | This is set to no. |
The default timeout period for each request is 30 seconds. This can be configured using the ‘waitperiod’ request parameter which specifies the wait period in seconds. The maximum wait period that is permitted is 120 seconds (2 minutes).
This mechanism helps to reduce the number of requests that must be made to track the current status of a call.