[asterisk-users] voicemail /odbc problem

Alex Sharaz alexsharaz at mac.com
Thu Jan 7 16:20:38 CST 2010


Hi,

I'm having a bit of a problem with storing voicemail messages in an  
odbc database. I  *think* I've got everything configured correctly but  
messages are stored on the asterisk server instread of in the database.

System info

64 bit redhat RHEL 5.1
Asterisk 1.4.26

unixODBC installed

used makemenuselect to instal res_odbc and cdr_odbc

Back end database DB2

Database name voiceml

Tables created on server

AST_CDR
AST_CONFIG
VOICEMESSAGES

I've checked the unix ODBC side of things and I can connect to the DB2  
database o.k.

I've set up

cdr_odbc.conf

[global]
dsn=voiceml
username=<usernme>
password=<password>
loguniqueid=yes
dispositionstring=yes
table=ast_cdr           ;"cdr" is default table name
usegmtime=yes             ; set to "yes" to log in GMT

res_odbc.conf

odbcstorage => voiceml

[voiceml]
enabled => yes
dsn => voiceml
username => <userid>
password => <password>
pre-connect => yes

in extconfig.conf I've got

[settings]
;
voicemail => odbc,voiceml
musiconhold.conf => odbc,voiceml,ast_config

I've set up an IAX2  test user called
[odbc_test_user]
type=friend
secret=supersecret
context=odbc_vm_test
host=dynamic
qualify=yes
disallow=all
allow=ulaw
allow=gsm

and a context of

[odbc_vm_test]
exten => 100,1,Voicemail(88888 at default);leave a message
exten => 200,1,VoicemailMain(88888 at default) ; retrieve a mail message

When I connect from my MAC using zoiper and call extension 100 I can  
leave a voicemail message.
Looking in /var/log/asterisk/full I get

[Jan  7 21:58:34] DEBUG[7257] pbx.c: Launching 'VoiceMail'
[Jan  7 21:58:34] VERBOSE[7257] logger.c:     -- Executing  
[100 at odbc_vm_test:1] VoiceMail("IAX2/odbc_test_use
r-8660", "88888 at default") in new stack
[Jan  7 21:58:34] DEBUG[7257] chan_iax2.c: Answering IAX2 call
[Jan  7 21:58:34] DEBUG[7257] devicestate.c: Notification of state  
change to be queued on device/channel IAX2
/odbc_test_user
[Jan  7 21:58:34] DEBUG[7204] chan_iax2.c: Checking device state for  
device odbc_test_user
[Jan  7 21:58:34] DEBUG[7204] chan_iax2.c: iax2_devicestate: Found  
peer. What's device state of odbc_test_use
r? addr=57011606, defaddr=0 maxms=2000, lastms=41
[Jan  7 21:58:34] DEBUG[7204] devicestate.c: Changing state for IAX2/ 
odbc_test_user - state 2 (In use)
[Jan  7 21:58:34] DEBUG[7257] app_voicemail.c: Before find_user
[Jan  7 21:58:34] DEBUG[7230] app_queue.c: Device 'IAX2/ 
odbc_test_user' changed to state '2' (In use) but we
don't care because they're not a member of any queue.
[Jan  7 21:58:34] VERBOSE[7257] logger.c:     -- <IAX2/ 
odbc_test_user-8660> Playing 'vm-intro' (language 'en'
)
[Jan  7 21:58:34] DEBUG[7234] chan_iax2.c: Ooh, voice format changed  
to 4
[Jan  7 21:58:40] DEBUG[7257] app.c: Locked path '/var/spool/asterisk/ 
voicemail/default/88888/INBOX'
[Jan  7 21:58:40] DEBUG[7257] app.c: Unlocked path '/var/spool/ 
asterisk/voicemail/default/88888/INBOX'
[Jan  7 21:58:40] VERBOSE[7257] logger.c:     -- <IAX2/ 
odbc_test_user-8660> Playing 'beep' (language 'en')
[Jan  7 21:58:40] VERBOSE[7257] logger.c:     -- Recording the message
[Jan  7 21:58:40] DEBUG[7257] app.c: play_and_record: <None>, /var/ 
spool/asterisk/voicemail/default/88888/tmp
/Ob6NSJ, 'wav49'
[Jan  7 21:58:40] DEBUG[7257] app.c: Recording Formats: sfmts=wav49
[Jan  7 21:58:40] VERBOSE[7257] logger.c:     -- x=0, open writing:  / 
var/spool/asterisk/voicemail/default/88
888/tmp/Ob6NSJ format: wav49, 0x1c1bd0f8
[Jan  7 21:58:40] DEBUG[7240] chan_iax2.c: Peer odbc_test_user: got  
pong, lastms 41, historicms 41, maxms 200
0
[Jan  7 21:59:12] VERBOSE[7257] logger.c:     -- User hung up
[Jan  7 21:59:12] DEBUG[7257] app.c: Locked path '/var/spool/asterisk/ 
voicemail/default/88888/INBOX'
[Jan  7 21:59:12] DEBUG[7257] app.c: Unlocked path '/var/spool/ 
asterisk/voicemail/default/88888/INBOX'
user-8660'
2/odbc_test_user-8660'
[Jan  7 21:59:12] DEBUG[7257] channel.c: Soft-Hanging up channel 'IAX2/ 
odbc_test_user-8660'
[Jan  7 21:59:12] DEBUG[7257] channel.c: Hanging up channel 'IAX2/ 
odbc_test_user-8660'
[Jan  7 21:59:12] DEBUG[7257] chan_iax2.c: We're hanging up IAX2/ 
odbc_test_user-8660 now...
[Jan  7 21:59:12] DEBUG[7257] chan_iax2.c: Really destroying IAX2/ 
odbc_test_user-8660 now...
[Jan  7 21:59:12] VERBOSE[7257] logger.c:     -- Hungup 'IAX2/ 
odbc_test_user-8660'
/odbc_test_user


I can call the asterisk server an listen to the voicemail message but  
there's nothing in the database  voicemessages table.

I've enabled unixODBC logging and although I can see log entries  
accessing the AST_CONFIG and AST_CDR tables, there's nothing accessing  
the voicemessages table.

Any idea where I can look next?
TIA
Alex


-------------- next part --------------
Checked by  Hu-fw-yhman



More information about the asterisk-users mailing list