Retrieve call status
Retrieve call status
https://api.agora.io/api/conversational-ai-agent/v2/projects/{appid}/calls/{agent_id}Use this endpoint to retrieve the call status and related information of a specified agent.
Request
Path parameters
The App ID of the project.
The agent ID you obtained after successfully calling the API to Initiate an outbound call.
Response
-
If the returned status code is
200, the request was successful. The response body contains the result of the request.Response Body
- to_number string
The number called.
- from_number string
Caller ID.
- pipeline_id string
The unique ID of a published project in AI Studio. Can be obtained in AI Studio - Project - Release Management.
- type string
Possible values:
inbound,outboundCall type:
inbound: Inbound call.outbound: Outbound call.
- agent_id string
A unique identifier for the call session.
- channel string
RTC channel name.
- reason string
Possible values:
request,hangup,failedReason for call ending:
request: Actively hung up.hangup: The other party hung up.failed: Call failed.
- create_ts integer
Call creation timestamp (in seconds).
- state string
Possible values:
answered,hangupCall status:
answered: The call was answered.hangup: The call was disconnected.
- stop_ts integer
Call end timestamp (in seconds). Returns
0ornullif the call has not ended.
-
If the returned status code is not
200, the request failed. The response body includes the error code and description. Refer to status codes to understand the possible reasons for failure.Error Response
- error_type string
The type of error that occurred.
- description string
A detailed description of the error.