The VoiceMailMain application

The last thing we need to cover in this section is the VoiceMailMain application. This application allows users to retrieve their voicemail messages, change their voicemail options, and even record their own voicemail greetings. The VoiceMailMain application takes two parameters, both optional:

  • the mailbox to be accessed.
  • various options (such as whether to skip the password check)

If no parameters are specified, the VoiceMailMain application plays a prompt asking the caller to provide his mailbox number. Add the following code to the dialplan:

exten => *99,1,NoOp()
 same => n,VoiceMailMain()

Now, when callers dial *99, they will be prompted for the mailbox number. After that, they will need to enter the password for their mailboxes in order to hear the messages. In our example, we would first enter 444 to select the mailbox, and then enter the password of 2587 when prompted (remember, these are the options we’ve specified earlier in this example in the voicemail.conf file).

 

Geek University 2022