[Asterisk-bsd] Voicemail and Mysql - Mailboxexists blues
Søren Schrøder
sch at cybercity.dk
Mon May 29 06:17:52 MST 2006
Greetings fellow FreeBSD'ers
I'm rather new to Asterisk, so please forgive me if this is the wrong
forum for these kind of questions.
Well.. So far I managed to get asterisk up and running and connected via
SIP.
I'm building a voicemail application, and I would like to have the users
in a MySQL database, since this makes provisioning so much easier. I
managed to get Asterisk to authenticate the mailbox and password using
Asterisk realtime, but I cannot get Asterisk to check for the mailbox
based on the A-number
I can see that the MySQL query returns the data, and I can authenticate
via DTMF against the mysql, but mailboxexists() does not seem to return
success ?
I started on 1.2.4 but I just upgraded to 1.2.7 prior to this post, with
the same result :(
Any ideas ?
COnfiguration and debug below, some numbers blanked with NNNN
Voicemail is setup like this
...
exten => NNNNNNNN,39,NoOp(DEBUG MailboxExists(${CALLERIDNUM} ?)
exten => NNNNNNNN,40,MailboxExists(${CALLERIDNUM})
exten => NNNNNNNN,41,NoOp(DEBUG ANUM AND BNUM UNKNOWN)
exten => NNNNNNNN,42,VoicemailMain()
...
exten => NNNNNNNN,141,NoOp(DEBUG WOOT, WE KNOW ANUM ${CALLERIDNUM})
exten => NNNNNNNN,142,VoicemailMain(s${CALLERIDNUM})
...
I get this debug from console:
-- Executing Answer("SIP/212.242.32.181-086b9000", "") in new stack
-- Executing NoOp("SIP/212.242.32.181-086b9000", "DEBUG
CALLERIDNUM:33983398") in new stack
-- Executing NoOp("SIP/212.242.32.181-086b9000", "DEBUG
DNID:NNNNNNNN") in new stack
...
-- Executing NoOp("SIP/212.242.32.181-086b9000", "DEBUG
MailboxExists(33983398 ?") in new stack
-- Executing MailboxExists("SIP/212.242.32.181-086b9000",
"33983398") in new stack
May 29 12:51:12 DEBUG[79445]: res_config_mysql.c:125 realtime_mysql:
MySQL RealTime: Retrieve SQL: SELECT * FROM users WHERE mailbox =
'33983398' AND context = 'default'
May 29 12:51:12 DEBUG[79445]: res_config_mysql.c:636 mysql_reconnect:
MySQL RealTime: Everything is fine.
context => default
mailbox => 33983398
password => NNNN
fullname => sch test
email => blabla at example.com
stamp => 2006-05-29 12:04:00
-- Executing NoOp("SIP/212.242.32.181-086b9000", "DEBUG ANUM AND
BNUM UNKNOWN") in new stack
-- Executing VoiceMailMain("SIP/212.242.32.181-086b9000", "") in new
stack
-- Playing 'vm-login' (language 'en')
May 29 12:51:21 DEBUG[79445]: chan_sip.c:3016 sip_rtp_read: * Detected
inband DTMF '3'
May 29 12:51:21 DEBUG[79445]: chan_sip.c:3016 sip_rtp_read: * Detected
inband DTMF '3'
May 29 12:51:22 DEBUG[79445]: chan_sip.c:3016 sip_rtp_read: * Detected
inband DTMF '9'
May 29 12:51:22 DEBUG[79445]: chan_sip.c:3016 sip_rtp_read: * Detected
inband DTMF '8'
May 29 12:51:24 DEBUG[79445]: chan_sip.c:3016 sip_rtp_read: * Detected
inband DTMF '3'
May 29 12:51:24 DEBUG[79445]: chan_sip.c:3016 sip_rtp_read: * Detected
inband DTMF '3'
May 29 12:51:25 DEBUG[79445]: chan_sip.c:3016 sip_rtp_read: * Detected
inband DTMF '9'
May 29 12:51:25 DEBUG[79445]: chan_sip.c:3016 sip_rtp_read: * Detected
inband DTMF '8'
May 29 12:51:26 DEBUG[79445]: chan_sip.c:3016 sip_rtp_read: * Detected
inband DTMF '#'
May 29 12:51:26 DEBUG[79445]: res_config_mysql.c:125 realtime_mysql:
MySQL RealTime: Retrieve SQL: SELECT * FROM users WHERE mailbox =
'33983398' AND context = 'default'
May 29 12:51:26 DEBUG[79445]: res_config_mysql.c:636 mysql_reconnect:
MySQL RealTime: Everything is fine.
context => default
mailbox => 33983398
password => NNNN
fullname => sch test
email => blabla at example.com
stamp => 2006-05-29 12:04:00
-- Playing 'vm-password' (language 'en')
May 29 12:51:28 DEBUG[79445]: chan_sip.c:3016 sip_rtp_read: * Detected
inband DTMF 'N'
May 29 12:51:28 DEBUG[79445]: chan_sip.c:3016 sip_rtp_read: * Detected
inband DTMF 'N'
May 29 12:51:29 DEBUG[79445]: chan_sip.c:3016 sip_rtp_read: * Detected
inband DTMF 'N'
May 29 12:51:29 DEBUG[79445]: chan_sip.c:3016 sip_rtp_read: * Detected
inband DTMF 'N'
May 29 12:51:31 DEBUG[79445]: chan_sip.c:3016 sip_rtp_read: * Detected
inband DTMF '#'
May 29 12:51:31 DEBUG[79445]: app.c:1168 ast_lock_path: Locked path
'/var/spool/asterisk/voicemail/default/33983398/Old'
May 29 12:51:31 DEBUG[79445]: app.c:1180 ast_unlock_path: Unlocked path
'/var/spool/asterisk/voicemail/default/33983398/Old'
May 29 12:51:31 DEBUG[79445]: app.c:1168 ast_lock_path: Locked path
'/var/spool/asterisk/voicemail/default/33983398/Old'
May 29 12:51:31 DEBUG[79445]: app.c:1180 ast_unlock_path: Unlocked path
'/var/spool/asterisk/voicemail/default/33983398/Old'
May 29 12:51:31 DEBUG[79445]: app.c:1168 ast_lock_path: Locked path
'/var/spool/asterisk/voicemail/default/33983398/INBOX'
May 29 12:51:31 DEBUG[79445]: app.c:1180 ast_unlock_path: Unlocked path
'/var/spool/asterisk/voicemail/default/33983398/INBOX'
May 29 12:51:31 DEBUG[79445]: app.c:1168 ast_lock_path: Locked path
'/var/spool/asterisk/voicemail/default/33983398/INBOX'
May 29 12:51:31 DEBUG[79445]: app.c:1180 ast_unlock_path: Unlocked path
'/var/spool/asterisk/voicemail/default/33983398/INBOX'
-- Playing 'vm-youhave' (language 'en')
...
Thanks in advance
--
Søren Schrøder <sch at cybercity.dk>
Obey Gravity - It's the Law !
More information about the Asterisk-BSD
mailing list