Skip to main content

Create a Call

Create a call.

Permissions

The API token must include the following scopes: Voice.

Path Parameters
AccountSid uuid REQUIRED

The Project ID that uniquely identifies the Account to retrieve.

Request Body REQUIRED
Url string

The URL to handle the call. This parameter allows you to specify a webhook or different route in your code containing XML instructions for how to handle the call. This is required if ApplicationSid is not used.

ApplicationSid uuid

The unique identifier of the application used to handle the call. Applications can be created within your portal or via the Create Application endpoint and they contain a set of URLs rather than one URL, making it ideal if you want to use one configuration across many numbers. This is required if Url is not used.

From string

The address that initiated the call. Can be either a E.164 formatted number (+xxxxxxxxxxx), or a SIP endpoint (sip:xxx@yyy.zzz).

To string

The address that received the call. Can be either a E.164 formatted number (+xxxxxxxxxxx), or a SIP endpoint (sip:xxx@yyy.zzz).

CallerId string

The number, in E.164 format, or identifier of the caller.

FallbackMethod string

Possible values: [GET, POST]

Whether the request to FallbackUrl is a GET or a POST. Default is POST. If ApplicationSid is present, this parameter is ignored.

FallbackUrl string

The URL SignalWire will request if errors occur when fetching the Url. If ApplicationSid is present, this parameter is ignored.

MachineDetection string

Possible values: [Enable, DetectMessageEnd, none]

Whether a human or machine picked up the call. Possible values are Enable, DetectMessageEnd and none.

AsyncAmd boolean

Whether or not to execute machine detection asynchronously. Possible values are true or false. Default is false.

AsyncAmdStatusCallback string

The URL to request when the machine detection is completed. This parameter is ignored if AsyncAmd is false.

AsyncAmdStatusCallbackMethod string

Possible values: [GET, POST]

Whether the request to AsyncAmdStatusCallback is a GET or a POST. Default is POST.

AsyncAmdPartialResults boolean

Whether or not to report partial (interim) results to the callback url. Possible values are true or false. Default is false. This parameter is ignored if AsyncAmd is false.

MachineDetectionSilenceTimeout number

Number of milliseconds to wait for initial voice before giving up. Must be at least 2000 to a maximum of 10000. Default is 5000 milliseconds.

MachineDetectionSpeechThreshold number

How many milliseconds of voice to decide it is a machine. Must be at least 1000 to a maximum of 6000. Default is 2400 milliseconds.

MachineDetectionSpeechEndThreshold number

Number of milliseconds to wait for voice to finish. Must be at least 500 to a maximum of 5000. Default is 1200 milliseconds.

MachineDetectionTimeout number

The time SignalWire will wait for machine detection before timing out. Default is 30 seconds.

MachineWordsThreshold number

How many words to count to decide it is a machine. Must be at least one to a maximum of 100. Default is 6.

MaxPricePerMinute number

The maximum price in USD acceptable for the call to be created. If the rate for the call is greater than this value, the call will not be created. If not set, all calls will be created. Price can have a maximum of four decimal places, i.e. 0.0075.

Method string

Possible values: [GET, POST]

Whether the request to Url is a GET or a POST. Default is POST. Ignored if ApplicationSid is present.

Record boolean

Whether or not to record a call. Possible values are true or false. Default is false.

RecordingChannels string

The number of channels in the recording. Can be mono (both legs of call recorded under one channel into one recording file) or dual (each leg of call recorded in separate channels into one recording file).

RecordingStatusCallback string

The URL to request to when recording is available. See here for the list of parameters passed back to your endpoint.

RecordingStatusCallbackMethod string

Possible values: [GET, POST]

Whether the request to RecordingStatusCallback URL is a GET or a POST. Default is POST.

RecordingTrack string

Specifies whether to record the inbound audio to SignalWire from the called party or the outbound audio from SignalWire to the called party or both the inbound and outbound audio. Defaults to both.

SipAuthUsername string

The username to authenticate the caller when making an outbound SIP call.

SipAuthPassword string

The password to authenticate the caller when making an outbound SIP call.

SendDigits string

The digits to press after a call is connected. Possible values are (0-9), #, *, and w. Each w gives a 0.5 second pause before moving on to the next instruction.

StatusCallback string

The URL SignalWire will send webhooks to on every requested StatusCallbackEvent event. See here for the list of parameters passed back to your endpoint.

StatusCallbackEvent string[]

Possible values: [initiated, ringing, answered, completed]

The status events that trigger a SignalWire webhook. Possible values are initiated, ringing, answered, and completed. To specify multiple events, repeat the parameter (name and value) as needed. Default is completed.

StatusCallbackMethod string

Possible values: [GET, POST]

Whether the request to StatusCallback URL is a GET or a POST. Default is POST. Ignored if ApplicationSid is present.

Timeout string

The time SignalWire will wait before assuming the call has no answer. Max wait time is 600 seconds. Default is 60 seconds.

Trim string

Possible values: [trim-silence, do-not-trim]

Whether leading and trailing silence is trimmed from a recording. Possible values are trim-silence and do-not-trim. Default is trim-silence.

Responses
200

OK

Schema OPTIONAL
account_sid uuid OPTIONAL

The unique identifier for the account that created this call.

annotation string OPTIONAL

The annotation for the call.

answered_by string OPTIONAL

Possible values: [human, machine]

Who/what the call was answered by. Possible values are human or machine.

api_version OPTIONAL

The version of the SignalWire API.

caller_name string OPTIONAL

The name of the caller. Only available if Caller ID lookup is enabled.

date_created string OPTIONAL

The date, in RFC 2822 GMT format, this call was created.

date_updated string OPTIONAL

The date, in RFC 2822 GMT format, this call was updated.

direction string OPTIONAL

Possible values: [inbound, outbound]

The direction of the call. Possible values are inbound or outbound.

duration number OPTIONAL

The duration, in seconds, of the call.

end_time string OPTIONAL

The time, in RFC 2822 GMT format, on which the call was terminated.

forwarded_from string OPTIONAL

The number this call was forwarded from.

from string OPTIONAL

The address that initiated the call. Can be either a E.164 formatted number (+xxxxxxxxxxx), or a SIP endpoint (sip:xxx@yyy.zzz).

formatted_from string OPTIONAL

The formatted number that initiated the call.

parent_call_sid uuid OPTIONAL

The unique identifier for the call that created this call.

phone_number_sid uuid OPTIONAL

Outbound call: the unique identifier for OutgoingCallerId. Inbound call: the unique identifier for IncomingPhoneNumber.

price number OPTIONAL

The charge for the call.

price_unit string OPTIONAL

The currency, in ISO 4127 format, for the price of the call.

sid uuid OPTIONAL

The unique identifier for the call.

start_time string OPTIONAL

The time, in RFC 2822 GMT format, on which the call began.

status string OPTIONAL

Possible values: [queued, ringing, in-progress, canceled, completed, busy, failed]

The status of the call.

subresource_uris object OPTIONAL

A Map of available sub-resources.

notifications string OPTIONAL

The URI for notifications

recordings string OPTIONAL

The URI for recordings

to string OPTIONAL

The address that received the call. Can be either a E.164 formatted number (+xxxxxxxxxxx), or a SIP endpoint (sip:xxx@yyy.zzz).

formatted_to string OPTIONAL

The formatted number that received the call.

uri string OPTIONAL

The URI for the call.

400

Error. Call not created.

Schema OPTIONAL
errors object[] OPTIONAL

A list of errors

code string OPTIONAL

The numeric string identifying the API error code

message string OPTIONAL

Error text

more_info string OPTIONAL

Url for more information on error code