The Call object
The Call
Object is created when an outbound call is initiated or when an inbound call is received. You can use the Call
object to both interact with ongoing calls and retrieve details about completed calls. You can also use this object to 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 your 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 an outbound call or inbound call. |
call_duration integer | The duration of the call in seconds. |
call_uuid string | The unique identifier used to identify a Call. |
end_time string | The timestamp when the call ended. Timezone: Local timezone as updated in your 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 your Plivo Console Format: yyyy-MM-dd HH:mm:ss. |
parent_call_uuid string | The CallUUID of the Aleg |
resource_uri string | The URI of the resource requested. |
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 that is charged based on the destination number. |
hangup_cause_name | The reason for the call hangup. Refer to this guide for a comprehensive list of hangup causes and sources. |
hangup_cause_code | A unique integer code for the hangup cause. Refer to this guide for a comprehensive 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 this guide for a comprehensive list of hangup causes and sources. |
Example Object
{
"answer_time": "2017-06-28 19:39:05+05:30", // Timezone: Local timezone as updated in your Plivo Console
"bill_duration": 11,
"billed_duration": 60,
"call_direction": "inbound",
"call_duration": 11,
"call_uuid": "57a1b60a-5c0b-11e7-9082-ef888d0400e9",
"end_time": "2017-06-28 19:39:15+05:30", // Timezone: Local timezone as updated in your Plivo Console
"from_number": "13475848223",
"initiation_time": "2017-06-28 19:39:04+05:30", // Timezone: Local timezone as updated in your Plivo Console
"parent_call_uuid": null,
"resource_uri": "/v1/Account/MAXXXXXXXXXXXXXXXXXX/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"
}