Number

View as Markdown

<Dial> verb’s <Number> noun specifies what phone number to dial. You can use up to 10 <Number>s within a <Dial> to simultaneously call several people. The first person to answer the call will be connected to the caller and the rest of the called numbers will be hung up.

Noun attributes

method
stringDefaults to POST

The method attribute specifies whether the request to action is a GET or a POST. Valid values are GET or POST.

sendDigits
string

Play DTMF tones when a call is answered. Useful when dialing numbers with extensions. SignalWire will initially dial the main phone number, then send the DTMF tones for the extension when the automated system answers.

statusCallback
string

The URL to make requests to for each statusCallbackEvent event. See below for request parameters.

statusCallbackEvent
string

The current status of the call. The call moves from initiated to ringing when the phone starts ringing. It moves from ringing to answered when the phone call is answered. Finally, it moves from answered to completed when the call is terminated. The status will be set to completed through the following reasons: busy, canceled, completed, failed, or no-answer. To specify multiple events, separate each one with a space. See below for the different call statuses.

statusCallbackMethod
stringDefaults to POST

The type of HTTP request to use when requesting a statusCallback.

url
string

A specified URL for a document that runs on the callee’s end after the dialed number answers but before the call is connected. This allows the caller to provide information to the dialed number, giving them the opportunity to decline the call, before they answer the call.

Status values for the statusCallbackEvent attribute

The statusCallbackEvent attribute has the following call status values:

ValueDescription
initiatedDialing of a call has begun.
ringingThe call has begun ringing.
answeredThe call has been answered.
completedThe call has been terminated. The status will be set to completed through the following reasons: busy, canceled, completed, failed, or no-answer.

Request parameters for the statusCallback URL

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}

Examples

Dialing an extension

1<?xml version="1.0" encoding="UTF-8"?>
2<Response>
3 <Dial>
4 <Number sendDigits="www5645">
5 123-456-7890
6 </Number>
7 </Dial>
8</Response>

After entering the phone number, we want to wait a little before entering in the extension. In order to do this, a w can be placed in front of the extension number. Each w will wait 0.5 seconds before dialing the extension. In this example, SignalWire will wait 1.5 seconds before dialing the extension 5645.

Concurrent phone calls

1<?xml version="1.0" encoding="UTF-8"?>
2<Response>
3 <Dial>
4 <Number>123-456-7890</Number>
5 <Number>987-654-3210</Number>
6 <Number>102-938-4750</Number>
7 </Dial>
8</Response>

You can simultaneously call up to 10 <Number>s. The first caller to pick up the phone will be connected to the caller and the rest of the called numbers will be hung up.

Notes on usage

  • You can have up to 10 <Number>s within a <Dial>.
  • If you dial an office number or a phone on airplane mode, the call will be picked up within the first ring and all other calls will be hung up.