For your IVR configuration you will need first to record some sound messages.
You can record your own sound files using the Asterisk. For this purpose you should add an extension for the recording in the extensions.conf file. In our example, you can dial the extension 100, after the beep you can start recording your message.
To end the recording press "#". The message is recorded in .gsm format and is called recording.gsm in the /var/lib/asterisk/sounds directory. Asterisk plays back the message after you pressed "#"(after 2 seconds).
exten => 100,1,Wait(2)
exten => 100,n,Record(/var/lib/asterisk/sounds/recording:gsm)
exten => 100,n,NoOp(${RECORDED_FILE})
exten => 100,n,Wait(2)
exten => 100,n,Playback(/var/lib/asterisk/sounds/recording)
exten => 100,n,NoOp(${PLAYBACKSTATUS})
exten => 100,n,Wait(1)
exten => 100,n,Hangup()