steampipe plugin install twilio

Table: twilio_account_call - Query Twilio Calls using SQL

Twilio Calls represent individual voice calls made through the Twilio platform. They include details such as the call's status, start and end times, duration, and the phone numbers involved. Twilio's call resource is a key component of its voice communication services.

Table Usage Guide

The twilio_account_call table provides insights into individual call details within the Twilio platform. As a developer or system administrator, explore call-specific details through this table, including call status, duration, and associated phone numbers. Utilize it to analyze call patterns, troubleshoot call issues, and monitor the usage of Twilio's voice communication services.

Examples

Basic info

Gain insights into the direction and status of calls made through a specific account, including when each call started and ended. This can help in tracking call activities and understanding call patterns for customer service improvement.

select
sid,
called_to,
direction,
status,
start_time,
end_time,
account_sid
from
twilio_account_call;
select
sid,
called_to,
direction,
status,
start_time,
end_time,
account_sid
from
twilio_account_call;

List outgoing calls

Analyze the details of outgoing calls made via an application's API, providing insights into call statuses and durations, which can be useful for assessing call performance and usage patterns.

select
sid,
called_to,
direction,
status,
start_time,
end_time,
account_sid
from
twilio_account_call
where
direction = 'outbound-api';
select
sid,
called_to,
direction,
status,
start_time,
end_time,
account_sid
from
twilio_account_call
where
direction = 'outbound-api';

List unsuccessful calls

Explore which calls were unsuccessful to identify potential issues with your telecommunication system. This can help in troubleshooting and improving the overall call success rate.

select
sid,
called_to,
direction,
status,
start_time,
end_time,
account_sid
from
twilio_account_call
where
status = 'failed';
select
sid,
called_to,
direction,
status,
start_time,
end_time,
account_sid
from
twilio_account_call
where
status = 'failed';

Schema for twilio_account_call

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form, e.g. connection_name.
account_sidtextThe SID of the Account that created the resource.
annotationtextThe annotation provided for the call.
answered_bytextEither `human` or `machine` if this call was initiated with answering machine detection. Empty otherwise.
api_versiontextThe API version used to process the message.
called_fromtext=The phone number, SIP address or Client identifier that made this call.
called_totext=The phone number, SIP address or Client identifier that received this call.
caller_nametextThe caller's name if this call was an incoming call to a phone number with caller ID Lookup enabled. Otherwise, empty.
date_createdtimestamp with time zoneThe date and time that the resource was created.
date_updatedtimestamp with time zoneThe date and time that the resource was last updated.
directiontextA string describing the direction of the call. `inbound` for inbound calls, `outbound-api` for calls initiated via the REST API or `outbound-dial` for calls initiated by a `Dial` verb.
durationbigintThe length of the call in seconds.
end_timetimestamp with time zone>, >=, =, <, <=The end time of the call. Null if the call did not complete successfully.
forwarded_fromtextThe forwarding phone number if this call was an incoming call forwarded from another number (depends on carrier supporting forwarding). Otherwise, empty.
from_formattedtextThe calling phone number, SIP address, or Client identifier formatted for display.
group_sidtextThe Group SID associated with this call. If no Group is associated with the call, the field is empty.
parent_call_sidtextThe SID that identifies the call that created this leg.
phone_number_sidtextIf the call was inbound, this is the SID of the IncomingPhoneNumber resource that received the call. If the call was outbound, it is the SID of the OutgoingCallerId resource from which the call was placed.
pricedouble precisionThe charge for this call, in the currency associated with the account. Populated after the call is completed. May not be immediately available.
price_unittextThe currency in which 'price' is measured.
queue_timebigintThe wait time in milliseconds before the call is placed.
sidtext=The unique string that identifies the resource.
start_timetimestamp with time zone>, >=, =, <, <=The start time of the call. Null if the call has not yet been dialed.
statustext=The status of this call.
sub_resource_urisjsonbA list of related subresources identified by their relative URIs.
to_formattedtextThe phone number, SIP address or Client identifier that received this call. Formatted for display.
trunk_sidtextThe unique identifier of the trunk resource that was used for this call.
uritextThe URI of the resource, relative to 'https://api.twilio.com'.

Export

This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.

You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh script:

/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- twilio

You can pass the configuration to the command with the --config argument:

steampipe_export_twilio --config '<your_config>' twilio_account_call