Latest Legacy

The Call object

A Call object is created when an outbound call is initiated or when an inbound call is received. You can use the Call object to interact with ongoing calls, retrieve details about completed calls, and transfer ongoing calls, thereby building custom call flows.

Attributes

answer_time string

The timestamp when the call was answered.
Timezone: Local timezone as updated in the Plivo console
Format: yyyy-MM-dd HH:mm:ss

bill_duration integer

The duration of the call in seconds.

billed_duration integer

The duration for which the call was billed in seconds. This might be different from the bill_duration based on the billing interval of the prefix called.

call_direction string

Indicates whether the call was outbound or inbound.

call_duration integer

The duration of the call in seconds.

call_uuid string

The unique identifier used to identify the call.

end_time string

The timestamp when the call ended.
Timezone: Local timezone as updated in the Plivo console
Format: yyyy-MM-dd HH:mm:ss

from_number string

The caller ID using which the call was initiated.

initiation_time string

The timestamp when the call was initiated.
Timezone: Local timezone as updated in the Plivo console
Format: yyyy-MM-dd HH:mm:ss

parent_call_uuid string

The call UUID of the A leg of the call.

resource_uri string

The URI of the resource requested.

stir_verification string

For outbound calls: Gives details about the attestation assigned to the call by Plivo

For inbound calls: Gives details about the attestation received on the inbound call to your Plivo phone number.

Possible values:

  • Verified means the call is from a verified caller who has authorized access to the customer’s caller ID, and hence should be treated with confidence. Verified is equivalent to attestation level A.
  • Not Verified means that, for this call, either the caller is not verified, or it’s uncertain whether they have access to the caller ID used, or both. Not Verified means the call received attestation level B or C.
  • Not Applicable means STIR/SHAKEN doesn’t apply to this call, as would be the case if a call is not addressed to a US number or if it’s a cloud call (WebRTC or SIP).

Read more about STIR/SHAKEN.

to_number string

The number to which the call was initiated.

total_amount string

The total amount charged for the call.

total_rate string

The per-minute rate charged based on the destination number.

hangup_cause_name

The reason for the call hangup. Refer to our list of hangup causes and sources.

hangup_cause_code

The integer code for the hangup cause. Refer to our list of hangup causes and sources.

hangup_source

The entity that triggered the call hangup. Possible hangup sources are: Caller, Callee, Plivo, API Request, Answer XML, Error, and Unknown.

Refer to our list of hangup causes and sources.

source_ipstring

The source_ip field returns the IP address from which the call request originated. We recommend you monitor this field as a method to identify any potential account misuse and unauthorized access attempts.

Example Object

{
  "answer_time": "2022-06-28 19:39:05+05:30", // Local time zone as updated in the Plivo console
  "bill_duration": 11,
  "billed_duration": 60,
  "call_direction": "inbound",
  "call_duration": 11,
  "call_uuid": "57a1b60a-5c0b-11e7-9082-ef888d0400e9",
  "end_time": "2022-06-28 19:39:15+05:30", // Local time zone as updated in the Plivo console
  "from_number": "12025551111",
  "initiation_time": "2022-06-28 19:39:04+05:30", // Local time zone as updated in the Plivo console
  "parent_call_uuid": null,
  "resource_uri": "/v1/Account/MA2025RK4E639VJFZAGV/Call/57a1b60a-5c0b-11e7-9082-ef888d0400e9/",
  "to_number": "19172592277",
  "total_amount": "0.00850",
  "total_rate": "0.00850",
  "hangup_cause_name": "End Of XML Instructions",
  "hangup_cause_code":4010,
  "hangup_source":"Plivo",
  "source_ip": "92.168.0.1"
}