System information
Then 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. You can use the simple dialplan logic that follows (or, of course,
any voicemail delivery and retrieval functionality you defined earlier in this book):
[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
One of the ways that unsavory folks get into systems is via test users that
are not immediately removed from the system after testing. Whenever
you’re utilizing a test extension, you should be doing it on a system that
is removed from the Internet, or at the very least, place it into a context
that does not have access to outbound dialing and has a strong
password.
Don’t forget to reload the SIP module:
*CLI> module reload chan_sip.so
And verify that the SIP user exists:
*CLI> sip show users like odbc_test_user
Username Secret Accountcode Def.Context ACL NAT
odbc_test_user supersecret odbc_vm_test No RFC3581
ODBC Voicemail | 383