5.11. Maintaining a Message of the Day
Problem
You have certain greetings that need to be changed a lot, like the welcome greeting that callers first hear, a greeting that tells your schedule, an inspirational message of the day for staffers—whatever it is, they need to be changed often, so you want an easy way to change them, and you want to restrict who can change them.
Solution
Create a context for listening to and recording each message, then password-protect it.
Start by creating a directory to store your custom prompts in, like /var/lib/asterisk/sounds/local/. Then, record some instructional prompts using the context created in the previous recipe. Suppose your message tells callers your hours and holiday schedule, and you have named it store-schedule.gsm. You'll need instructions like these:
- r-schedule-welcome.gsm
"Welcome to the store schedule management menu. Please enter your password."
- r-listen-or-record.gsm
"To listen to the current store schedule, press 1. To go directly to the recording menu press 2."
- r-record-at-tone.gsm
"To record a new store schedule message, begin speaking after the beep. When you're finished, press the pound key."
- r-accept-or-do-over.gsm
"To rerecord your message, press 2. If you are finished, press 3."
- r-thankyou-newschedule.gsm
"Thank you for updating the store schedule, and have a pleasant day."
- r-invalid-option.gsm
"I'm sorry, that is not a valid option, so I'm sending you back to the beginning."
- r-thankyou-new-schedule.gsm
"Thank you for updating the store ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access