Da Voismart Knowledge Base.
Leave a Voicemail message

  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
    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

    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 'unavailable' greeting.
    j    - Jump to priority n+101 if the mailbox is not found or some other
           error occurs.