5.10. Recording Custom Prompts
Problem
You've done a bit of research on how to create your own custom prompts for Asterisk, and you know that Digium will sell you nice, professionally recorded custom prompts for a reasonable fee. You know that you can go nuts with recording gear and do it yourself. Both sound like nice options, but for now, you just want quick and cheap.
Solution
You can have quick and cheap. You'll need sound support on your Asterisk server. This can be a sound card plus a microphone and speakers, or a sound card and headset, or a USB headset. (A USB headset replaces a sound card, microphone, and speakers.) Or, call into your server from a client's phone. Then you'll create a context in Asterisk just for recording custom prompts.
First, create two new directories:
# mkdir /var/lib/asterisk/sounds/local
# mkdir /var/lib/asterisk/sounds/tmpThen, create this context for recording your custom prompts in /etc/asterisk/extensions.conf:
[record-prompts] ;record new voice files exten => s,1,Wait(2) exten => s,2,Record(tmp/newrecord:gsm) exten => s,3,Wait(2) exten => s,4,Playback(tmp/newrecord) exten => s,5,wait(2) exten => s,6,Hangup ;record new messages exten => 350,1,Goto(record-prompts,s,1)
Reload the dialplan:
asterisk1*CLI> dialplan reloadNow, dial 350. You will hear only a beep—start talking after the beep, then hit the pound key when you're finished. It will replay your new message, then hang up. The first file you're going to record should be an instructional file that ...
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