Logo
Search
API Docs

DTMF & IVR Navigation

Inbound Call Handling

DTMF Tones and IVR Navigation

Overview

Sulus provides a built-in DTMF tool that enables your voice assistants to send keypad tones during calls — useful for IVR navigation, menu selections, and data entry (e.g., member IDs, account numbers, dates).


Enabling the DTMF Tool

Add dtmf to the tools array in your assistant configuration:

{
  "model": {
    "provider": "openai",
    "model": "gpt-4o",
    "messages": [
      {
        "role": "system",
        "content": "You are an assistant at a law firm. When you hit a menu, use the dtmf function to enter the digits."
      }
    ],
    "tools": [
      {
        "type": "dtmf"
      }
    ]
  }
}

Sulus sends DTMF tones using the out-of-band RFC 2833 method, which is widely supported and more reliable for VoIP environments.


Pause Characters by Provider

IVR systems can be sensitive to timing, so inserting pauses between digits is critical:

ProviderPause CharacterDuration
Twilio / Telnyx / Sulus Numbers / BYOK SIPw0.5s
Twilio / Telnyx / Sulus Numbers / BYOK SIPW1s
Vonagep0.5s

Example: 1w2w3W4# sends digits with 0.5s and 1s pauses between them.


Best Practices

1. Add short pauses between digits. Sending digits too quickly (e.g., 123456#) can cause missed or misread inputs. Start with 0.5s pauses (w) and increase only if digits are still missed.

2. Wait for menus to finish before responding. If your assistant responds too quickly, it may send tones before the IVR is ready to receive them. Prompt your assistant to:

  • Wait for all options to be spoken before sending DTMF
  • Reply with a single space " " to stay silent while waiting
  • Avoid overlapping speech with IVR audio
[When navigating an IVR tree]
  - WAIT for all options to be spoken before proceeding
  - Once you have heard all options, use the dtmf tool with an input digit that matches the option you want to select
  - Avoid saying anything if using the dtmf tool at the same time

[When waiting]
  - Reply with an empty string like " " to ensure nothing is spoken

3. Retry with progressively slower inputs. If digits fail, retry with increased spacing; if tones still fail, fall back to speaking the option aloud:

1st try  ->  123#           (fast)
2nd try  ->  1w2w3#         (medium; 0.5s gaps)
3rd try  ->  1W2W3#         (slow; 1s gaps)

4. Send multiple keypad entries in a single call. For prompts requiring several digits (e.g., by-name directories), send all keys in a single dtmf call with pause characters between them:

{
  "function": {
    "name": "dtmf",
    "arguments": "{\"keys\": \"w2w1w2\"}"
  }
}

Multiple separate dtmf calls can arrive too slowly or be partially ignored; a single combined sequence is more consistent.


Smart Endpointing for IVR

Configure a startSpeakingPlan to allow slower cadence at the beginning of calls (when interacting with IVRs) and faster cadence once a human answers:

{
  "startSpeakingPlan": {
    "smartEndpointingPlan": {
      "provider": "livekit",
      "waitFunction": "t < 30 ? (x * 500 + 300) : (20 + 500 * sqrt(x) + 2500 * x^3)"
    }
  }
}

In this function, t represents time elapsed in seconds — favoring slower responses in the first 30 seconds, then accelerating for human conversations.


Comparing Telephony Providers

DTMF sending varies across providers due to internal implementations. For best results, test and compare: Twilio, Telnyx, Vonage, Sulus Numbers, and BYOK SIP.

Evaluate digit recognition accuracy, latency between digits, and success rate across menu depths.

In summary, Sulus's DTMF tool gives your assistant full keypad input capability during calls. Reliable IVR navigation depends on proper timing (pause characters), waiting for menus to finish, and retrying with progressively slower inputs when needed.