Skip to main content

Call Object

This section goes over the parts of the Call object.

Call Object Attributes

These fields and values make up the JSON response that gets returned when a request is successful. In this section, there is also information about the optional fields that can be added to further customize calls. These fields can be added when initially creating the binding, or they can be added later using PATCH or PUT requests.

AttributeData TypeDescription
account_sid
read only
string

The secure ID of the account to which the call belongs.

attributesobject

Additional attributes that can be used to further customize a call. See the table below for built-in attributes. Custom attributes can also be added to this parameter as key-value pairs.

call_sid
read only
string

The call secure ID.

called_didstring

The call destination phone number. This phone number will appear in the E.164 format.

calling_didstring

The DID that initiates the call. This DID will appear in the E.164 format.

date_created
read only
string

The date and time when the Call object was created.

delayinteger

The number of seconds before the call will execute. The default value is 0, meaning that the call will execute immediately.

methodstring

The HTTP method used to execute the request. This method can be set as either POST or GET. The default value is POST.

status_callback_methodstring

The HTTP method used to execute the request to the status_callback_url. The default value is POST.

status_callback_urlstring

The URL that stores the call data, which can be heard at the end of a call. Set the way that this URL is queried by assigning the status_callback_method value.

timeout
integer

The number of seconds to wait for the destination number to answer. After the call times out, a request is made to the action URL. The default value is 30.

urlstring

The URL with the FlexML instructions. The request type used to query this URL is the value of method.

Attribute Object

The following are attributes that can be added to the Call object.

info

Note that custom attributes can also be added in the same way as the following attributes are added.

AttributeData TypeDescription
cnamstring

The CNAM for outbound calls. Note that this may not be preserved for calls terminated through the PSTN.

sip_header_*string

The values in this field will be sent as extra SIP headers, added to the SIP invite. The header name must start with X-.

Sample Call Object

{
"account_sid": "1d4adc32-45d1-4789-9780-928049e2bce1",
"attributes": {},
"call_sid": "2f367eb5-adc6-4413-b603-533e2a8f0804",
"called_did": "15162065318",
"calling_did": "15162065319",
"date_created": "2018-10-16T20:59:18.094Z",
"delay": 0,
"method": "POST",
"status_callback_method": "POST",
"status_callback_url": null,
"url": null
}