Skip to end of metadata
Go to start of metadata

For creating your own auto-attendant or IVR menus, you're probably going to want to record your own custom prompts. An easy way to do this is with the Record() application. The Record() application plays a beep, and then begins recording audio until you press the hash key (#) on your keypad. It then saves the audio to the filename specified as the first parameter to the application and continues on to the next priority in the extension. If you hang up the call before pressing the hash key, the audio will not be recorded. For example, the following extension records a sound prompt called custom-menu in the gsm format in the en/ sub-directory, and then plays it back to you.

Recording Formats


When specifiying a file extension when using the Record() application, you must choose a file extension which represents one of the supported file formats in Asterisk. For the complete list of file formats supported in your Asterisk installation, type core show file formats at the Asterisk command-line interface.

You've now learned the basics of how to create a simple auto-attendant menu. Now let's build a more practical menu for callers to be able to reach Alice or Bob or the dial-by-name directory.

 Procedure 216.1. Building a Practical Auto-Attendant Menu

  1. Add an extension 6599 to the [docs:users] context which sends the calls to a new context we'll build called [docs:day-menu]. Your extension should look something like:
  2. Add a new context called [docs:day-menu], with the following contents:
  1. Dial extension 6597 to record your auto-attendant sound prompt. Your sound prompt should say something like "Thank you for calling! Press one for Alice, press two for Bob, or press 9 for a company directory". Press the hash key (#) on your keypad when you're finished recording, and Asterisk will play it back to you. If you don't like it, simply dial extension 6597 again to re-record it.
  2. Dial extension 6599 to test your auto-attendant menu.

In just a few lines of code, you've created your own auto-attendant menu. Feel free to experiment with your auto-attendant menu before moving on to the next section.

  • No labels


  1. would you replace (playback) label with (loop) label in day-menu example?