The voicemail 4 example¶
This example extends the voicemail_3 example by giving the additional option of deleting each message after playing it.
It also adds the option to record a welcome message to be played after the call is answered.
Summary¶
An inbound application that answers the call and says a welcome message. The welcome message defaults to “Welcome to the voicemail server for <name>” but can be changed. <name> is obtained from the application_parameters and must be registered on the inbound services page of the CWP.
The application uses <name> to determine whether the caller owns the voicemail box. It does this by comparing <name> with the <call_from> property of the inbound call.
If the caller owns the voicemail box, the top level options given are:
Play all existing messages with the option to delete each one individually
Delete all existing messages
Record a new welcome message
If the caller does not own the voicemail box, he can leave a new message. The name of the WAV file to save to will be “samples/voicemail3/<name>/msg<counter>.wav”. The <counter> is a variable, initialised to 1, which increments each time a message is successfully saved.