VoxML Reference

Dial

Connect the call to another party.

The Dial verb connects the current call to another party (phone number, SIP endpoint, or TryVox client).

Example

{
  "voxml_version": "1.0",
  "instructions": [
    {
      "verb": "Dial",
      "numbers": [
        {"number": "+919876543210"}
      ],
      "timeout": 30,
      "caller_id": "+911234567890"
    }
  ]
}

Parameters

ParameterTypeRequiredDefaultDescription
action_urlstringno—URL notified with the dial outcome when the call ends. Notification only — see Callback.
action_methodstringnoPOSTHTTP method for action_url
timeoutintegerno30Seconds to wait for each destination to answer
caller_idstringno—Caller ID presented to the dialled party. Digits, optionally +-prefixed.
time_limitintegerno—Accepted and ignored. The whole call's time_limit still applies.
recordbooleannofalseAccepted and ignored. Use the Record verb or Start Recording.
ring_tonestringno—Accepted and ignored
numbersarrayno—Array of phone numbers to dial
siparrayno—Array of SIP endpoints to dial
clientarrayno—Array of TryVox client names to dial

Dialing Phone Numbers

Dial a single number:

{
  "verb": "Dial",
  "numbers": [
    {"number": "+919876543210"}
  ]
}

Dial several numbers. They are tried one after another in list order — each rings for up to timeout seconds before the next is tried. Numbers come first, then sip, then client entries:

{
  "verb": "Dial",
  "numbers": [
    {"number": "+919876543210"},
    {"number": "+919123456789"}
  ]
}

Send DTMF digits after connection. send_digits is a per-number field, but only the first one set in the list is used, for whichever destination answers:

{
  "verb": "Dial",
  "numbers": [
    {
      "number": "+919876543210",
      "send_digits": "1234#"
    }
  ]
}

Dialing SIP Endpoints

{
  "verb": "Dial",
  "sip": [
    {
      "uri": "sip:agent@sip.example.com"
    }
  ]
}

sip entries also accept username and password, but they are ignored — TryVox does not answer a digest challenge from the far end. The SIP endpoint must accept the call without authentication.

Dialing TryVox Clients

{
  "verb": "Dial",
  "client": [
    {"name": "support-agent-1"},
    {"name": "support-agent-2"}
  ]
}

Ring Timeout

Seconds to wait for each destination to answer:

{
  "verb": "Dial",
  "numbers": [{"number": "+919876543210"}],
  "timeout": 20
}

Caller ID

Override the caller ID displayed to the dialed party:

{
  "verb": "Dial",
  "numbers": [{"number": "+919876543210"}],
  "caller_id": "+911234567890"
}

Callback

If you set action_url, TryVox sends the dial outcome to it when the call ends:

{
  "verb": "Dial",
  "numbers": [{"number": "+919876543210"}],
  "action_url": "https://example.com/dial-status"
}

The payload uses the same PascalCase fields as other call webhooks, with Event set to DialAction:

{
  "Event": "DialAction",
  "CallUUID": "550e8400-e29b-41d4-a716-446655440000",
  "From": "+918045671234",
  "To": "+919812345678",
  "Direction": "inbound",
  "Status": "completed",
  "DialStatus": "connected",
  "DialedTo": "+919876543210",
  "DialedNumbers": ["+919876543210"],
  "BridgeUUID": "8a1f2b3c-4d5e-4f60-8a7b-9c0d1e2f3a4b"
}

DialStatus is connected when a destination answered, otherwise not-connected. DialedTo is set only when a single destination was dialled.

This is a notification only. The callback is sent when the whole call ends, and any VoxML your action_url returns is not executed.

Best Practices

  • Set appropriate timeout values (20-30 seconds typical)
  • Set time_limit when placing the call (Make a Call) — Dial's own time_limit is ignored
  • When dialing multiple numbers, order them by priority
  • Use send_digits for navigating IVR systems

On this page