login | register
Wed 20 of Aug, 2008 [14:06 UTC]

voip-info.org

Discuss [9] History

Asterisk cmd VoiceMailMain

Created by: oej,Last modification on Tue 22 of Apr, 2008 [16:46 UTC] by dean.l

Synopsis:

 Enter voicemail system

Description:

 VoiceMailMain([[s]mailbox]@context)

Enters the main voicemail system for the checking of voicemail. The mailbox can be passed as the option, which will stop the voicemail system from prompting the user for the mailbox.

If the mailbox is preceeded by 's' then the password check will be skipped. If a context is specified, logins are considered in that context only.

Menu

  • 1 Read voicemail messages
    • 3 Advanced options (with option to reply; introduced in Asterisk CVS Head April 28, 2004 with 'enhanced voicemail')
      • 1 Reply
      • 2 Call back(1)
      • 3 Envelope
      • 4 Outgoing call(1)
      • 5 Send Message (only available if sendvoicemail=yes in voicemail.conf)
    • 4 Play previous message
    • 5 Repeat current message
    • 6 Play next message
    • 7 Delete current message
    • 8 Forward message to another mailbox
      • 1 Use Voicemailnumber (only available if usedirectory=yes in voicemail.conf)
      • 2 Use Voicemail Directory (only available if usedirectory=yes in voicemail.conf)
    • 9 Save message in a folder
      • 0 Save in new Messages
      • 1 Save in old Messages
      • 2 Save in Work Messages
      • 3 Save in Family Messages
      • 4 Save in Friends Messages
    • * Help; during msg playback: Rewind
    • # Exit; during msg playback: Skip forward
  • 2 Change folders
    • 0 Switch to new Messages
    • 1 Switch to old Messages
    • 2 Switch to Work Messages
    • 3 Switch to Family Messages
    • 4 Switch to Friends Messages
  • 3 Advanced Options
    • 5 Send Message (only available if sendvoicemail=yes in voicemail.conf)
      • 1 Use Voicemailnumber (only available if usedirectory=yes in voicemail.conf)
      • 2 Use Voicemail Directory (only available if usedirectory=yes in voicemail.conf)
  • 0 Mailbox options
    • 1 Record your unavailable message
    • 2 Record your busy message
    • 3 Record your name
    • 4 Record your temporary message (new in Asterisk v1.2)
      • 1 Record your temporary message
      • 2 Erase your temporary message (going back to the standard message)
    • 5 Change your password
    • * Return to the main menu
  • * Help
  • # Exit

  • After recording a message (incoming message, busy/unavail greeting, or name)
    • 1 - Accept
    • 2 - Review
    • 3 - Re-record
    • 0 - Reach operator(1) (not available when recording greetings/name)

(1) Prompts for these are only played if these options are enabled in voicemail.conf

If you are using text based configuration (not database) of the voicemail system, the voicemail.conf configuration file needs to be writable by the asterisk server.

While listening to a recorded voicemail message: Press # to fastforward, or * to rewind by skipms increments. Skipms defaults to 3000 ms and is configurable in voicemail.conf. Note that the # and * keys only work when the message is in the process of being played back


Notes

  • Logging In: When calling VoiceMailMain without specifying a context, whether specifying a box number or alllowing the built-in prompt, if there are two boxes with the same number in different contexts, the last one specified in the voicemail.conf file will be used. You will not be able to log into the other boxes unless you specify the context when calling VoiceMailMain.

New in Asterisk 1.2


Description:

 VoiceMailMain(mailbox@context[|options])

Options:

   p    - Consider the mailbox parameter as a prefix to the mailbox that
          is entered by the caller.
   g(#) - Use the specified amount of gain when recording a voicemail
          message. The units are whole-number decibels (dB).
   s    - Skip checking the passcode for the mailbox.

Announce Name Before Voicemail Playback: Asterisk 1.2 supports 'categories' that can be assigned to voicemail messages before they are left, and playback of a pre-recorded prompt before the message is played back based on the category name. If there is e.g. a (relatively small) number of companies sharing this mailbox, this would be the easiest way to go. Use the ${VM_CATEGORY} channel variable for this.


See also

Old versions:


Asterisk | Applications | Functions | Variables | Expressions | Asterisk FAQ


Comments

Comments Filter
222

333Re:

by emresumengen, Wednesday 05 of March, 2008 [16:19:21 UTC]
Beware that, Asterisk now uses CALLERID(num), CALLERID(name) and CALLERID(all).
222

333Re: Auto mailbox context

by johnbelamaric, Wednesday 07 of February, 2007 [16:18:18 UTC]
Here's what I did. I use the incoming channel to determine the mailbox through a variable.
For each extension, I create two variables, one with the channel to dial and one with the mailbox. In the example below, SIP/john and Zap/1 both will default to mailbox 801. (Note, the brackets in the exten pattern get munged by this web site. Not sure how to fix that.)

; define Eexten as the channel name
; define MBchannel as the default mailbox for that channel

E801=SIP/john
MBSIPjohn=801

E802=SIP/moncef
MBSIPmoncef=802

E803=SIP/todd
MBSIPtodd=803

E871=Zap/1
MBZap1=801



Then when I define my extensions:


exten => _80[1-3],1,Macro(stdexten,${E${EXTEN}})

exten => 871,1,Macro(stdexten,${E${EXTEN}})

exten => 800,1,Set(ChannelType=${CUT(CHANNEL,/,1)})
exten => 800,n,Set(ChannelName=${CUT(CHANNEL,/,2)})
exten => 800,n,Set(ChannelName=${CUT(ChannelName,-,1)})
exten => 800,n,Set(MB=${MB${ChannelType}${ChannelName}})
exten => 800,n,VoicemailMain(${MB}@default)
exten => 800,n,Hangup



When I want to add an extension, I just have to create those two variables (and change my pattern for the extension to match).

John

222

333

by ksmithaz1, Friday 12 of January, 2007 [05:08:23 UTC]
Just use callerid. This example assumes mailboxes are stored in astdb:

exten => 777,1,NoOp(${EXTEN})
exten => 777,2,NoOp(${CHANNEL})
exten => 777,3,NoOp(${CONTEXT})
exten => 777,4,NoOp(${CALLERIDNUM})
exten => 777,5,NoOp(${CALLERID})
exten => 777,6,GotoIf($[${CONTEXT} != local]?30)
exten => 777,7,Set(mailbox=${DB(MAILBOX/${CALLERIDNUM})})
exten => 777,8,Goto(20)

; Local Voicemail
exten => 777,20,VoicemailMain(s${mailbox})
exten => 777,21,Hangup

; Non-Local Voicemail request
exten => 777,30,NoOp(${CONTEXT})
exten => 777,31,VoicemailMain
exten => 777,32,Goto(ivr-menu,JUMP-RETURN,1)

; Voice Mail, Non-automatic
exten => 778,1,VoicemailMain
exten => 778,2,Hangup

Probably should use ${CALLERID(num)} now

If you set your sip callerid the same as your mailbox you can just jump to VoicemailMain(s${CALLERID(num)})

I have multiple extensions flowing to the same mailbox, so I run an astdb entry for this
222

333Auto mailbox context

by jamesb63, Friday 29 of December, 2006 [12:43:19 UTC]
Is it possible to read the "mailbox=" parameter from sip.conf when calling VoiceMailMain()?

This would mean my users could dial the voicemail extension (in my case 500) and it wouldn't ask them for the mailbox.

I'd like to do it by reading mailbox= as I have a couple of extensions which share the same mailbox (my home and office ones).

Any clues?

222

333Segmentation fault when calling VoiceMailMain

by fries, Wednesday 20 of September, 2006 [21:03:14 UTC]
I had a hard time here, with Asterisk just crashing with an Segmentation fault, whenever VoiceMailMain was called After looking into this with gdb, I found out that VoiceMailMain makes calles into to the adsi library, which I disabled, since I don't have any ADSI phones.

Do not disable res_adsi.so in modules.conf when using app_voicemail!
222

333How can i change?

by JunHo, Wednesday 14 of June, 2006 [01:09:08 UTC]
How can i change default announce and options?
where can i find resource that default announce setted?
Thanks for your help..
222

333

by DavidGoose, Tuesday 22 of November, 2005 [04:37:43 UTC]
Is that possible to change the default voicemail menu structure ? Which part of source code is allowed to so do ?
Thanks.
222

333

by DavidGoose, Tuesday 22 of November, 2005 [04:33:58 UTC]
Is that possible to change the default voicemail menu structure ? Which part of source code is allowed to so do ?
Thanks.
222

333Wrong syntax?

by NateBell, Wednesday 18 of May, 2005 [21:08:39 UTC]
I tried the posted syntax of VoiceMailMain([s]mailbox]@context) and it did not work. I found this worked instead:

VoiceMailMain,s${Mailbox}

where Mailbox is the person's mailbox number. So a mailbox with number 100 would look like:

VoiceMailMain,s100

This will send you straight into mailbox 100.