Receive Char

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

Receives one character from channels supporting it.

Last reviewed 2026-04-14

receive char timeout
Description

Receives a character of text on a channel. Most channels do not support the reception of text. Returns the decimal value of the character if one is received, or 0 if the channel does not support text reception. Returns -1 only on error/hangup.

Arguments
  • timeout required - The maximum time to wait for input in milliseconds, or 0 for infinite. Most channels
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.