Skip to main content
The dial verb initiates a new call by connecting to a telephone number, a registered SIP user, or a SIP URI. In the example, the dial verb creates a new call and joins it to a parent call. The target property specifies multiple call destinations attempted simultaneously.
{
  "verb": "dial",
  "actionHook": "dial",
  "callerId": "+491173331212",
  "answerOnBridge": true,
  "dtmfCapture": ["*2", "*3"],
  "dtmfHook": {
    "url": "/dtmf",
    "method": "GET"
  },
  "amd": {
        "actionHook": "amd",
        "recognizer": {
            "vendor": "microsoft",
            "language": "en-US",
        }
    },
  "target": [
    {
      "type": "phone",
      "number": "+49XXXXXXXXXXX",
      "trunk": "Twilio"
    },
    {
      "type": "sip",
      "sipUri": "sip:49XXXXXXXXXXX@sip.myTrunk.com",
      "auth": {
        "username": "John",
        "password": "Doe"
      }
    },
    {
      "type": "user",
      "name": "jane@sip.example.com"
    }
  ]
}
When multiple endpoints are mentioned in the target array, all the endpoints are dialed at the same time (also known as simring or blast dial). The call will be connected to the first endpoint that answers the call or completes a call screening application, as specified in the confirmHook property. There are several types of endpoints you can dial:
  • A telephone number, sent through your configured carrier.
  • A SIP endpoint, identified by a SIP URI (with optional authentication).
  • A registered SIP user, identified by their SIP username.
  • A Microsoft Teams user, identified by their phone number and tenant ID.

Configuration

The following table lists the available parameters:
ParameterTypeDescriptionRequired
actionHookstring | objectA webhook to receive an HTTP POST when the call ends. The webhook includes the properties describing the outcome of the call attempt. The default value is dial.No
amdobjectEnables the Answering Machine Detection, which identifies if the called party is human, machine, or a tone/beep.No
anchorMediabooleanIf true, Voice Gateway will anchor the media, keeping RTP flowing through the server even when a call is bridged. The default value is false.No
answerOnBridgebooleanFor an inbound call, if true, the call will continue ringing until the dialed number answers. Once answered, a 200 OK is sent on the inbound call. If false, the inbound call connects as soon as the outbound call is placed. The default value is false.No
boostAudioSignalstring | numberIncreases or decreases the outgoing audio signal by a specified number of decibels. For example, -6 dB reduces volume.No
callerIdstringThe phone number displayed to the dialed number. Must be a valid E.164 number. If not provided, the caller ID from the inbound call is used.No
callerNamestringThe caller name displayed on the outbound call.No
confirmHookstring | objectA webhook that runs on the callee’s end after answering but before the call is connected. This allows the callee to hear information and accept or decline the call. Individual targets can override this using their own confirmHook.No
dialMusicstringThe URL of a WAV or MP3 file to play to the caller as custom audio or ringback while the outbound call is ringing. The URL doesn’t need to include the file extension.No
dtmfCapturearrayAn array defining DTMF sequences that trigger mid-call notifications to the application via the configured dtmfHook.No
dtmfHookstring | objectA webhook triggered when a dtmfCapture sequence is detected. This is a notification-only webhook.No
dubarrayAn array of nested dub verbs to add background audio tracks to the call.No
exitMediaPathbooleanIf true, allows media to exit Voice Gateway when the call is bridged. The default value is false.No
headersobjectAn object of SIP headers to apply to the outbound call attempts.No
listenobjectA nested listen verb that streams call audio to a remote server via WebSocket.No
mediaPathstringA string specifying the media path configuration.No
onHoldHookstring | objectA webhook invoked when the call is placed on hold.No
proxystringA SIP proxy address used for the outbound call.No
referHookstring | objectA webhook invoked when a SIP REFER is received on a dialed call. If accepted (HTTP 200), Voice Gateway sends a SIP 202 Accepted. Non-success responses cause the SIP response to mirror that status code.No
tagobjectCustom data associated with this dial verb.No
targetarrayAn array of up to 10 destinations to simultaneously dial. The endpoint that answers first is connected to the caller; all other calls are hung up.Yes
timeLimitnumberThe maximum call duration in seconds.No
timeoutnumberRing-no-answer timeout in seconds. The default value is 60.No
transcribeobjectA nested transcribe verb, which causes the call to be transcribed.No

Target Types

PSTN Number

ParameterTypeDescriptionRequired
typestringSelect a phone type.Yes
numberstringA telephone number in E.164 format.Yes
confirmHookstring | objectA webhook that triggers an application on the callee’s end after the dialed number answers but before the call is connected. This action will override any confirmHook property set on the parent dial.No
fromobjectAn object specifying the user and host for the From header.No
headersobjectAn object containing SIP headers to include in the INVITE request.No
overrideTostringA string to override the To header in the SIP INVITE.No
proxystringA SIP proxy address to use for this target.No
trunkstringIf provided, this should be the name of a carrier that you created in the Voice Gateway Self-Service portal, which you want to use to complete this call. If not provided, Voice Gateway will select one of your configured carriers that has an outbound SIP trunk.No

SIP Endpoint

ParameterTypeDescriptionRequired
typestringSelect a sip type.Yes
sipUristringSIP URI to send the call to.Yes
authobjectAuthentication credentials.No
auth.usernamestringSIP username.Yes (if auth is provided)
auth.passwordstringSIP password.Yes (if auth is provided)
confirmHookstring | objectA webhook that triggers an application on the callee’s end after the dialed number answers but before the call is connected. This action will override any confirmHook property set on the parent dial.No
fromobjectAn object specifying the user and host for the From header.No
headersobjectAn object containing SIP headers to include in the INVITE request.No
overrideTostringA string to override the To header in the SIP INVITE.No
proxystringA SIP proxy address to use for this target.No
If the SIP Carrier provider requires username/password authentication, specify the credentials in the auth parameter.

User Endpoint

ParameterTypeDescriptionRequired
typestringSelect a user type.Yes
namestringThe registered SIP user name.Yes
confirmHookstring | objectA webhook that triggers an application on the callee’s end after the dialed number answers but before the call is connected.No
fromobjectAn object specifying the user and host for the From header.No
headersobjectAn object containing SIP headers to include in the INVITE request.No
overrideTostringA string to override the To header in the SIP INVITE.No
proxystringA SIP proxy address to use for this target.No
vmailbooleanIf true, the call will be sent to the voicemail of the user.No

Microsoft Teams Endpoint

ParameterTypeDescriptionRequired
typestringSelect a teams type.Yes
numberstringThe Teams user’s phone number.Yes
tenantstringThe Microsoft Teams tenant ID.Yes
confirmHookstring | objectA webhook that triggers an application on the callee’s end after the dialed number answers but before the call is connected.No
fromobjectAn object specifying the user and host for the From header.No
headersobjectAn object containing SIP headers to include in the INVITE request.No
overrideTostringA string to override the To header in the SIP INVITE.No
proxystringA SIP proxy address to use for this target.No
vmailbooleanIf true, the call will be sent to the voicemail of the user.No

actionHook properties

After the dial verb ends, the actionHook will be triggered and it will contain the following properties:
Property NameTypeDescription
dial_call_sidstringThe unique call_sid identifier for the child call.
dial_statusstringThe final status of the call attempt, one of completed, failed, busy, no-answer, or queued.
dial_sip_statusnumberThe SIP status of the final response to the INVITE that was sent.

amd.hook properties

The webhook triggers when the amd parameter is used and Voice Gateway identifies the called party as either human or machine, or detects a tone or beep.
Property NameTypeDescription
eventstringIndicates one of the following events: amd, beep, or silence.
amd_typestringSpecifies either human or machine. This property is provided only when the event is amd.

More Information