Docs

Get details of specific call

https://api.apifonica.com/v2/accounts/{accountSID}/calls/{callSID}

Overview

To get information on a call by its identifier, make the GET request to /accounts/{accountSID}/calls/{callSID}.

When a call is initiated, a new instance of the calls resource is created with the following parameters being populated: call_sid, created, account_sid, to, from, number_sid, and direction. The value of the status parameter is set to queued. All other parameters have the null value.

The status changes during the progress of the call (See the Call Status section for more details)

When the call ends, the status changes to completed and the values of the started, ended, price and duration parameters are updated.
If voice_recording is false (See the Change Number Properties) then the parameter record_sid is null.

In case for any reason the call is not successful, the value of the status parameter is set to failed.

Request examples

The following example demonstrates getting information on the specified call.

curl –X GET https://api.apifonica.com/v2/accounts/{accountSID}/calls/{callSID} \
-u {accountSID}:{authToken}

Response example

{
  "call_sid": "{callSID}",
  "parent_call_sid": "{callSID}",
  "created": "Fri, 21 Apr 2017 13:01:25 +0000",
  "account_sid": "{accountSID}",
  "from": "358942417543",
  "to": "312031550066",
  "direction": "outbound",
  "status": "completed",
  "controller": "http://apifonica.com/voicexml/getxml?xml_variant=welcome_to_apifonica",
  "method": "POST",
  "timeout": 15,
  "updated": "Fri, 21 Apr 2017 13:02:02 +0000",
  "started": "Fri, 21 Apr 2017 13:01:37 +0000",
  "ended": "Fri, 21 Apr 2017 13:01:43 +0000",
  "duration": 18,
  "price": 0.0294
  "record_sid":"rec17cb9958-3878-4562-b6a7-f67a0adsfsdfd"
  "tag": "MyClient_1"
  "channel": "number"
}

Response parameters

Parameter
Description

Call status

Call events online statuses. Please note, that not of all these statuses can be catched by GET request

Parameter
Description

Odwiedzając naszą stronę, zgadzasz się na to, abyśmy wykorzystywali pliki cookies. Zachęcamy do przeczytania naszej Polityki cookies, która znajduje się tutaj.