T005

TwiML <Gather> verb not capturing DTMF input correctly

Ticket

We have a TwiML application where we use the Gather verb to collect a 4-digit PIN from callers. Sometimes the gathered digits are truncated or empty even when the caller definitely pressed keys. Our TwiML looks like: <Gather numDigits='4' action='/verify-pin' method='POST'><Say>Please enter your PIN</Say></Gather>. We are seeing this on roughly 15% of calls. It seems worse on calls from mobile carriers. Is this a known issue or is there something wrong with our TwiML?

Gold label: bug / high

Results by run

openai · gpt-5.5

2026-10-04 17:23 UTC · prompt ef0017a

config (wrong)
medium (wrong)
escalate: no

Summary

The customer's TwiML <Gather> intermittently returns empty or truncated DTMF digits for a 4-digit PIN, affecting about 15% of calls and more often from mobile carriers.

Suggested first response

Thanks for the details. Your basic <Gather numDigits="4" action="/verify-pin" method="POST"> usage looks valid, and Twilio should send captured digits to your action URL in the Digits parameter once 4 digits are received. To narrow this down, please share several affected Call SIDs and timestamps, and confirm whether /verify-pin ever returns an HTTP redirect, since Digits are not resent across redirects. Also check whether any callers are using a finish key or whether your app expects one to be included, and whether the affected calls show empty Digits versus fewer than 4 digits in your webhook logs. DTMF reliability can vary with certain devices, VoIP/compressed audio paths, or carrier/network conditions, so call examples will help determine whether this is application behavior or a transmission issue.

KB citations

kb-005

467 output tokens · 7.9s · 1 attempt(s)

anthropic · claude-sonnet-4-6

2026-10-04 17:20 UTC · prompt ef0017a

bug (correct)
medium (wrong)
escalate: yes

Summary

The customer's TwiML <Gather> verb intermittently returns truncated or empty DTMF digits on approximately 15% of calls, with worse behavior observed on mobile carrier calls.

Suggested first response

Thank you for reaching out and for sharing your TwiML. The behavior you're describing — truncated or empty digits despite the caller pressing keys — is a known class of issue with <Gather> and DTMF capture. A few things to investigate: (1) Mobile carriers and certain VoIP paths can use audio compression codecs that interfere with DTMF tone transmission, which may explain why the problem is worse on mobile calls. (2) Please confirm whether your /verify-pin action URL ever returns an HTTP redirect — if it does, Twilio follows the redirect but does not re-send the Digits parameter, which can cause your application to see an empty value. (3) Check whether finishOnKey is set (default is '#') and whether any callers may be pressing '#' as part of their input, causing early submission. (4) Consider adding actionOnEmptyResult='true' to your <Gather> so that Twilio still POSTs to your action URL even when no digits are captured, which will help you log and distinguish true empty-capture events from application-side issues. We are escalating this to our engineering team to review whether there is a platform-side DTMF detection issue on specific carrier paths. In the meantime, could you share a few affected Call SIDs so we can pull the detailed call logs and debugger events?

KB citations

kb-005

377 output tokens · 12.5s · 1 attempt(s)