Page 317 - Asterisk™: The Future of Telephony
P. 317
Now connect to your Asterisk console and unload then reload the app_voicemail.so
module:
*CLI> module unload app_voicemail.so
== Unregistered application 'VoiceMail'
== Unregistered application 'VoiceMailMain'
== Unregistered application 'MailboxExists'
== Unregistered application 'VMAuthenticate'
*CLI> module load app_voicemail.so
Loaded /usr/lib/asterisk/modules/app_voicemail.so => (Comedian Mail (Voicemail System))
== Registered application 'VoiceMail'
== Registered application 'VoiceMailMain'
== Registered application 'MailboxExists'
== Registered application 'VMAuthenticate'
== Parsing '/etc/asterisk/voicemail.conf': Found
And verify that your new mailbox loaded successfully:
*CLI> voicemail show users for default
Context Mbox User Zone NewMsg
default 1000 J.P. Wiser 0
Testing ODBC Voicemail
Let’s create some simple dialplan logic to leave and retrieve some voicemail from our
test voicemail box. We can use the simple dialplan logic as follows:
[odbc_vm_test]
exten => 100,1,Voicemail(1000@default) ; leave a voicemail
exten => 200,1,VoicemailMain(1000@default) ; retrieve a voicemail
Once you’ve updated your extensions.conf file, be sure to reload the dialplan:
*CLI> dialplan reload
You can either include the odbc_vm_test context into a context accessible by an existing
user, or create a separate user to test with. If you wish to do the latter, you could define
a new SIP user in sip.conf like so (this will work assuming the phone is on the local LAN):
[odbc_test_user]
type=friend
secret=supersecret
context=odbc_vm_test
host=dynamic
qualify=yes
disallow=all
allow=ulaw
allow=gsm
Don’t forget to reload the SIP module:
*CLI> module reload chan_sip.so
And verify that the SIP user exists:
ODBC Voicemail | 289