Re: [asterisk-users] voicemail /odbc problem

2010-01-07 Thread Tilghman Lesher
On Thursday 07 January 2010 16:20:38 Alex Sharaz wrote:
> 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

Voicemail is kind of tricky.  While it does use realtime for the storage of
user mailbox settings, it does not use realtime for the storage of
messages themselves.  To do this, you'll need to run 'make menuselect'
in the build directory, then, in the Voicemail Options section, enable
ODBC_STORAGE, then recompile and reinstall (only the app_voicemail.so
and app_directory.so modules).  You'll also need to configure the odbc
storage mechanism in voicemail.conf, specifically odbcstorage and odbctable.

I agree that this is somewhat non-intuitive, so we may change this in the
future to make it configurable at runtime, rather than an option at buildtime.

-- 
Tilghman Lesher
Digium, Inc. | Senior Software Developer
twitter: Corydon76 | IRC: Corydon76-dig (Freenode)
Check us out at: www.digium.com & www.asterisk.org

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


[asterisk-users] voicemail /odbc problem

2010-01-07 Thread Alex Sharaz

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=
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 => 
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(88...@default);leave a message
exten => 200,1,VoicemailMain(88...@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  
[...@odbc_vm_test:1] VoiceMail("IAX2/odbc_test_use

r-8660", "88...@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: -- 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/8/INBOX'
[Jan  7 21:58:40] DEBUG[7257] app.c: Unlocked path '/var/spool/ 
asterisk/voicemail/default/8/INBOX'
[Jan  7 21:58:40] VERBOSE[7257] logger.c: -- 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: , /var/ 
spool/asterisk/voicemail/default/8/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/8/INBOX'
[Jan  7 21:59:12] DEBUG[7257] app.c: Unlocked path '/var/spool/ 
asterisk/voicemail/default/8/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


Checked by  Hu-fw-yhman

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users