here's a example you need to edit your extension.conf
with following depending on what number you want to use
The VoicemailMain application commonly takes no arguments. When the extension is dialed, the user is prompted to enter a mailbox number and their numeric passcode. Within the dialog, the user can check his or her voicemail, store important messages in custom folders, and create new unavailable and busy messages. The syntax to launch the VoicemailMain application with no arguments is shown in the following example:
Example
exten => 7500,1,VoicemailMain
Alternately the VoicemailMain application can take a mailbox number as an argument, in which case it will automatically route the caller to a specific mailbox and ask for the numeric passcode. The following example will route the user to mailbox 6161 and prompt them for the numeric passcode:
Example
exten => 7500,1,VoicemailMain,7100
Steps for Implementing a Fully Functional Voicemail System
Edit voicemail.conf and create an entry for each voicemail box. (See /etc/asterisk/voicemail.conf.)
Edit the extensions.conf and call the mailbox from within the dialplan using the Voicemail application. In most cases the voicemail box will be called after the application Dial in an extension. (See /etc/asterisk/extensions.conf and the Dial application.)
Make sure there is an available extension to the VoicemailMain application in order for users to check their voicemail boxes