Create
Use this endpoint for the Calls method to create a new call.
Path parameters
AccountSid
The Project ID that uniquely identifies the Account.
Request
To
The address that received the call. Can be a phone number in E.164 format, a SIP URI, or a client identifier.
From
The address that initiated the call. Must be a phone number in E.164 format for PSTN calls.
Url
The URL to handle the call. Required if `ApplicationSid` and `Laml`/`Twiml` are not used.
ApplicationSid
The unique identifier of the application used to handle the call. Required if `Url` and `Laml`/`Twiml` are not used.
Method
Whether the request to `Url` is a `GET` or a `POST`. Default is `POST`.
Allowed values:
FallbackUrl
The URL SignalWire will request if errors occur when fetching the `Url`.
FallbackMethod
Whether the request to `FallbackUrl` is a `GET` or a `POST`. Default is `POST`.
Allowed values:
StatusCallback
The URL SignalWire will send webhooks to on every requested `StatusCallbackEvent` event. See the [Voice status callback](/docs/compatibility-api/rest/calls/webhooks/voice-status-callback) webhook for the payload your URL will receive.
StatusCallbackMethod
Whether the request to `StatusCallback` URL is a `GET` or a `POST`. Default is `POST`.
Allowed values:
StatusCallbackEvent
The status events that trigger a SignalWire webhook. Valid values: initiated, ringing, answered, completed, ringing_forwarded, ringing_queued. Defaults to `completed`.
CallerId
The number, in E.164 format, or identifier of the caller. Used to override the From for caller ID purposes.
SendDigits
The digits to press after a call is connected. Valid characters are 0-9, #, *, w (wait 0.5s), and W (wait 1s).
Timeout
The time in seconds SignalWire will wait before assuming the call has no answer. Default is `60` seconds.
MachineDetection
Whether a human or machine picked up the call. Default is `none`.
Allowed values:
MachineDetectionTimeout
The time in seconds SignalWire will wait for machine detection before timing out. Default is `30` seconds.
MachineDetectionSpeechThreshold
How many milliseconds of voice to decide it is a machine. Default is `2400` milliseconds.
MachineDetectionSpeechEndThreshold
Number of milliseconds to wait for voice to finish. Default is `1200` milliseconds.
MachineDetectionSilenceTimeout
Number of milliseconds to wait for initial voice before giving up. Default is `5000` milliseconds.
MachineWordsThreshold
How many words to count to decide it is a machine. Default is `6`.
AsyncAmd
Whether or not to execute machine detection asynchronously. Default is `false`.
AsyncAmdStatusCallbackMethod
Whether the request to `AsyncAmdStatusCallback` is a `GET` or a `POST`. Default is `POST`.
Allowed values:
AsyncAmdStatusCallback
The URL to request when the machine detection is completed.
AsyncAmdPartialResults
Whether or not to report partial (interim) results to the callback url. Default is `false`.
Record
Whether or not to record a call. Default is `false`.
RecordingChannels
The number of channels in the recording. Default is `mono`.
Allowed values:
RecordingTrack
Specifies whether to record the `inbound`, `outbound`, or `both` audio. Default is `both`.
Allowed values:
RecordingStatusCallback
The URL to request when recording is available. See the [Recording status callback](/docs/compatibility-api/rest/recordings/webhooks/recording-status-callback) webhook for the payload your URL will receive.
RecordingStatusCallbackMethod
Whether the request to `RecordingStatusCallback` URL is a `GET` or a `POST`. Default is `POST`.
Allowed values:
RecordingStatusCallbackEvent
The recording status events that trigger a webhook. Space-separated list. Valid values: completed, in-progress, absent. Default is `completed`.
Trim
Whether leading and trailing silence is trimmed from a recording. Default is `trim-silence`.
Allowed values:
SipAuthUsername
The username to authenticate the caller when making an outbound SIP call.
SipAuthPassword
The password to authenticate the caller when making an outbound SIP call.
MaxPricePerMinute
The maximum price in USD acceptable for the call to be created. Format: up to 4 decimal places.
Response
sid
The unique identifier for the call.
account_sid
The unique identifier for the account that created this call.
date_created
The date, in RFC 2822 GMT format, this call was created.
date_updated
The date, in RFC 2822 GMT format, this call was updated.
parent_call_sid
The unique identifier for the call that created this call.
to
The address that received the call.
formatted_to
The formatted number that received the call.
to_formatted
The formatted number that received the call. Alias for formatted_to.
from
The address that initiated the call.
formatted_from
The formatted number that initiated the call.
from_formatted
The formatted number that initiated the call. Alias for formatted_from.
phone_number_sid
The unique identifier for the phone number.
status
The status of the call.
start_time
The time, in RFC 2822 GMT format, on which the call began.
end_time
The time, in RFC 2822 GMT format, on which the call was terminated.
duration
The duration, in seconds, of the call.
price
The charge for the call.
price_unit
The currency, in ISO 4127 format, for the price of the call.
direction
The direction of the call.
Allowed values:
answered_by
Who/what the call was answered by.
Allowed values:
api_version
The version of the SignalWire API.
forwarded_from
The number this call was forwarded from. Always null.
caller_name
The caller name. Always null.
uri
The URI for the call.
subresource_uris
A Map of available sub-resources.
annotation
The annotation for the call. Always null.
group_sid
The group SID for the call. Always null.
audio_in_mos
The Mean Opinion Score for audio quality (1.0-5.0).
sip_result_code
The SIP result code for the call.
audio_rtt_avg
The average round-trip time for audio in milliseconds.
audio_rtt_min
The minimum round-trip time for audio in milliseconds.
audio_rtt_max
The maximum round-trip time for audio in milliseconds.
audio_out_jitter_min
The minimum outbound audio jitter in milliseconds.
audio_out_jitter_max
The maximum outbound audio jitter in milliseconds.
audio_out_jitter_avg
The average outbound audio jitter in milliseconds.
audio_out_lost
The number of outbound audio packets lost.