Wait For Digit

Since 0.4.0 AGI Commands Found this useful? Upvote it. ×

Waits for a digit to be pressed.

Last reviewed 2026-08-22

wait for digit timeout
Description

Waits up to timeout milliseconds for channelA single call leg passing through Asterisk. Channels represent connections to endpoints and are what dialplan applications act on. to receive a DTMFDual-Tone Multi-Frequency, the touch-tone signals phones send for digit input during a call, used by IVRs and feature codes. digit. Returns -1 on channel failure, 0 if no digit is received in the timeout, or the numerical value of the ascii of the digit if one is received. Use -1 for the timeout value if you desire the call to block indefinitely.

Arguments
  • timeout required
User Notes

Know a tip or gotcha for this topic? Share it below and help others.

Contribute a note

Share a tip, gotcha, or practical example. Keep it under 2000 characters. No questions (use the Asterisk community forums for support). Wrap code in backticks.

Moderated before publishing. Email never shown.