[Asterisk-Users] Voicemail context
Benjamin Lawetz
blawetz at teliphone.ca
Thu Dec 8 09:23:29 MST 2005
Hello,
In the process of upgrading a couple of voicemail servers from CVS (end of
august 2005) to 1.2.1
This is a purely voicemail system using mysql configurations.
All my mailboxes are in the "default" context and it worked fine under the
CVS version. But with 1.2.1 the voicemailmain fails to authenticate. I
debugged and searched around a bit.
And found the problem in the Mysql request.
Under CVS the request was:
Dec 8 10:13:53 DEBUG[32760] res_config_mysql.c: MySQL RealTime: Retrieve
SQL: SELECT * FROM users WHERE mailbox = '201' AND context = 'default'
Under 1.2.1 the request is:
Dec 7 15:09:55 DEBUG[3900] res_config_mysql.c: MySQL RealTime: Retrieve
SQL: SELECT * FROM users WHERE mailbox = '201' AND context = ''
According to the documentation, if I don't specify the context, it should
take the "default" context shouldn't it?
After googling a bit, I found bug 5899 which seems to be related, but the
way I understand it, the old behaviour was if no context pas specified, it
selected without context. In the new version it selects the default context.
Tried testing with the "searchcontexts=yes". It recognises the mailbox, but
doesn't seem to match the password.
Dec 8 10:41:34 VERBOSE[5567] logger.c: -- Executing
VoiceMailMain("SIP/1111-c37a", "201") in new stack
Dec 8 10:41:34 DEBUG[5567] res_config_mysql.c: MySQL RealTime: Retrieve
SQL: SELECT * FROM users WHERE mailbox = '201'
Dec 8 10:41:34 DEBUG[5567] res_config_mysql.c: MySQL RealTime: Everything
is fine.
Dec 8 10:41:34 VERBOSE[5567] logger.c: -- Playing 'vm-password'
(language 'en')
Dec 8 10:41:37 VERBOSE[5567] logger.c: -- Incorrect password '123' for
user '201' (context = default)
Am I missing something? When I don't specify the context, it should take the
"default context" or the "default" context ? Where do I specify it?
Any ideas why the password match isin't working if I revert to the old
method ?
Example mysql entry:
+--------+-----------+-------+-------+--------+--------+-------------+-----+
------+------+------+--------+-------------+--------------+-------+
|uniqueid|customer_id|context|mailbox|password|fullname|email
|pager|attach|saycid|delete|envelope|serveremail |stamp |options|
+--------+-----------+-------+-------+--------+--------+-------------+-----+
------+------+------+--------+-------------+--------------+-------+
| 1| 0|default| 201 | 123 |Bob |null at null.com|
|yes |no |no |no |test at test.com|20051207164443|NULL |
+--------+-----------+-------+-------+--------+--------+-------------+-----+
------+------+------+--------+-------------+--------------+-------+
Extension is simply a "Voicemailmain(201)"
Thanks,
Benjamin
More information about the asterisk-users
mailing list