B.132. VoiceMail()

Allows the caller to leave a voice mail message in the specified mailbox.
VoiceMail(mailbox[@context][&mailbox[@context][&...]],options)
old syntax:
VoiceMail([s|u|b]mailbox[@context][&mailbox[@context][&...]])
Allows the caller to leave a voice mail message in the specified mailbox. The mailbox must already be configured in voicemail.conf. If more than mailbox is listed, the greeting from the first mailbox is the one that is played. If the mailbox does not exist, dialplan execution ends.
The option s (silent) suppresses the prompt. The option u plays the "unavailable" message, if it exists. The option b plays (busy) message, if it exists (file busy instead of unavail).

Warning

You cannot mix syntax types. If you do, the application will fail as though the mailbox does not exist. We recommend always using the new syntax.
If option j is set, jumps to extension n+101, if it exists, on failure.
If the caller presses 0 during the prompt, the call goes to extension o (small letter "o", for operator) in the current context.
If the caller presses * during the prompt, the call goes to extension a (small letter "a", for assistant) in the current context.
Returns -1 in case of error (the mailbox could not be found or the caller hung up) otherwise returns 0. Sets the channel variable VMSTATUS to SUCCESS, USEREXIT (the caller cancelled the message) or FAILED.
; send the caller to mailbox 123, play the unavailable message:
exten => 123,1,VoiceMail(123,u)

Note

Internal help for this application in Asterisk 1.4:
  -= Info about application 'VoiceMail' =- 

[Synopsis]
Leave a Voicemail message

[Description]
  VoiceMail(mailbox[@context][&mailbox[@context]][...][|options]): This
application allows the calling party to leave a message for the specified
list of mailboxes. When multiple mailboxes are specified, the greeting will
be taken from the first mailbox specified. Dialplan execution will stop if the
specified mailbox does not exist.
  The Voicemail application will exit if any of the following DTMF digits are
received:
    0 - Jump to the 'o' extension in the current dialplan context.
    * - Jump to the 'a' extension in the current dialplan context.
  This application will set the following channel variable upon completion:
    VMSTATUS - This indicates the status of the execution of the VoiceMail
               application. The possible values are:
               SUCCESS | USEREXIT | FAILED

  Options:
    b    - Play the 'busy' greeting to the calling party.
    g(#) - Use the specified amount of gain when recording the voicemail
           message. The units are whole-number decibels (dB).
    s    - Skip the playback of instructions for leaving a message to the
           calling party.
    u    - Play the 'unavailble greeting.
    j    - Jump to priority n+101 if the mailbox is not found or some other
           error occurs.
diff output to internal help in Asterisk 1.2:
28c28
<     u    - Play the 'unavailble greeting.
---
>     u    - Play the 'unavailable greeting.