Calls

View as Markdown

A call is a connection between SignalWire and another phone. Outbound calls are made from SignalWire numbers to other phone numbers. Inbound calls are made from other phone numbers to SignalWire numbers.

Properties

sidstringRequiredformat: "uuid"
The unique identifier for the call.
account_sidstringRequiredformat: "uuid"
The unique identifier for the account that created this call.
date_createdstringRequired
The date, in RFC 2822 GMT format, this call was created.
date_updatedstringRequired
The date, in RFC 2822 GMT format, this call was updated.
parent_call_sidstring or nullRequiredformat: "uuid"
The unique identifier for the call that created this call.
tostringRequired
The address that received the call.
formatted_tostringRequired
The formatted number that received the call.
to_formattedstringRequired

The formatted number that received the call. Alias for formatted_to.

fromstringRequired
The address that initiated the call.
formatted_fromstringRequired
The formatted number that initiated the call.
from_formattedstringRequired

The formatted number that initiated the call. Alias for formatted_from.

phone_number_sidstring or nullRequiredformat: "uuid"
The unique identifier for the phone number.
statusenumRequired
The status of the call.
start_timestring or nullRequired
The time, in RFC 2822 GMT format, on which the call began.
end_timestring or nullRequired
The time, in RFC 2822 GMT format, on which the call was terminated.
durationintegerRequired
The duration, in seconds, of the call.
pricedouble or nullRequired
The charge for the call.
price_unitstringRequired
The currency, in ISO 4127 format, for the price of the call.
directionenumRequired
The direction of the call.
Allowed values:
answered_byenum or nullRequired

Who/what the call was answered by.

Allowed values:
api_versionstringRequired
The version of the SignalWire API.
forwarded_fromstring or nullRequired
The number this call was forwarded from. Always null.
caller_namestring or nullRequired
The caller name. Always null.
uristringRequired
The URI for the call.
subresource_urisobjectRequired

A Map of available sub-resources.

annotationstring or nullRequired
The annotation for the call. Always null.
group_sidstring or nullRequired
The group SID for the call. Always null.
audio_in_mosdouble or nullRequired

The Mean Opinion Score for audio quality (1.0-5.0).

sip_result_codestring or nullRequired
The SIP result code for the call.
audio_rtt_avginteger or nullRequired

The average round-trip time for audio in milliseconds.

audio_rtt_mininteger or nullRequired

The minimum round-trip time for audio in milliseconds.

audio_rtt_maxinteger or nullRequired

The maximum round-trip time for audio in milliseconds.

audio_out_jitter_mininteger or nullRequired
The minimum outbound audio jitter in milliseconds.
audio_out_jitter_maxinteger or nullRequired
The maximum outbound audio jitter in milliseconds.
audio_out_jitter_avginteger or nullRequired
The average outbound audio jitter in milliseconds.
audio_out_lostinteger or nullRequired
The number of outbound audio packets lost.

Example object

The Call Object
1{
2 "sid": "string",
3 "account_sid": "string",
4 "date_created": "string",
5 "date_updated": "string",
6 "parent_call_sid": "string",
7 "to": "string",
8 "formatted_to": "string",
9 "to_formatted": "string",
10 "from": "string",
11 "formatted_from": "string",
12 "from_formatted": "string",
13 "phone_number_sid": "string",
14 "status": "queued",
15 "start_time": "string",
16 "end_time": "string",
17 "duration": 0,
18 "price": 1,
19 "price_unit": "string",
20 "direction": "inbound",
21 "answered_by": "human",
22 "api_version": "string",
23 "forwarded_from": "string",
24 "caller_name": "string",
25 "uri": "string",
26 "subresource_uris": {
27 "notifications": "string",
28 "recordings": "string"
29 },
30 "annotation": "string",
31 "group_sid": "string",
32 "audio_in_mos": 1,
33 "sip_result_code": "string",
34 "audio_rtt_avg": 0,
35 "audio_rtt_min": 0,
36 "audio_rtt_max": 0,
37 "audio_out_jitter_min": 0,
38 "audio_out_jitter_max": 0,
39 "audio_out_jitter_avg": 0,
40 "audio_out_lost": 0
41}

Status

The status attribute has the following values:

Value
queuedThe call is ready and waiting in line.
ringingThe call is ringing.
in-progressThe call was picked up and is in progress.
canceledThe call was terminated when ringing or queued.
completedThe call was picked up and terminated with no issues.
busyThe caller received a busy signal.
failedThe call was not completed because of a failure.

StatusCallback parameters

Payload
1{
2 "AccountSid": "b3877c40-da60-4998-90ad-b792e98472af",
3 "ApiVersion": "2010-04-01",
4 "AudioInAveragePtime": 20,
5 "AudioInDtmfPacketCount": 0,
6 "AudioInFlushPacketCount": 2,
7 "AudioInJitterMaxVariance": 8,
8 "AudioInJitterMinVariance": 1,
9 "AudioInLargestJbSize": 4,
10 "AudioInMos": "4.3",
11 "AudioInMediaPacketCount": 1842,
12 "AudioInSkipPacketCount": 1,
13 "AudioOutDtmfPacketCount": 0,
14 "AudioOutMediaPacketCount": 1840,
15 "CallbackSource": "call-progress-events",
16 "CallSid": "b3877c40-da60-4998-90ad-b792e98472ca",
17 "CallStatus": "completed",
18 "Direction": "outbound-api",
19 "From": "+15551234567",
20 "SequenceNumber": 4,
21 "Timestamp": "Thu, 04 Apr 2024 18:32:15 +0000",
22 "To": "+15559876543"
23}

RecordingStatusCallback parameters

In addition to the standard request parameters, the following are parameters passed back to your application when SignalWire makes a request to the RecordingStatusCallback URL.

Payload
1{
2 "AccountSid": "b3877c40-da60-4998-90ad-b792e98472af",
3 "CallSid": "b3877c40-da60-4998-90ad-b792e98472ca",
4 "RecordingSid": "b3877c40-da60-4998-90ad-b792e984re01",
5 "RecordingUrl": "https://example.signalwire.com/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Recordings/b3877c40-da60-4998-90ad-b792e984re01",
6 "RecordingStatus": "completed",
7 "RecordingDuration": 94,
8 "RecordingChannels": 1,
9 "RecordingSource": "RecordVerb"
10}

RecordingStatus

The RecordingStatus attribute has the following values:

Value
in-progressThe recording of the call has begun.
completedThe recording of the call is completed and ready to access.
failedThe recording of the call is not accessible because of a failure.