|Summary:||ASTERISK-08519: password changes in voicemail does not work (using realtime)|
|Reporter:||Caio Begotti (caio1982)||Labels:|
|Date Opened:||2007-01-08 12:05:26.000-0600||Date Closed:||2007-01-26 12:43:16.000-0600|
|Description:||I've tested changing the mailbox password of a given user in Realtime Static mode and I could not get it to work. What happened follows:|
1. Logged in the VoiceMail() using defaults extension number and password. Was asked for a new password since it was a new user. Changed it and hung up.
2. Acessed the VoiceMail() app again to check it and the new password as recognized.
3. Restarted the Asterisk process and found that the old password was again the default one and the new password that has been set was simply gone.
My guess is that new and changed passwords were still on memory and NOT in sync with the database data (all my voicemail stuff are stored on a PostgreSQL server). Maybe because the app tried to parse and edit voicemail.conf directly?
****** ADDITIONAL INFORMATION ******
My voicemail.conf only has two ODBC entries specifying where to store its data and parameters, nothing more. Tested with the asterisk-1.4.0 release, not from SVN.
|Comments:||By: Jason Parker (jparker) 2007-01-09 13:53:23.000-0600|
Do you have a uniqueid column in your table?
By: Caio Begotti (caio1982) 2007-01-10 05:24:01.000-0600
My voicemail data are stored in a separated table manageble only by my web application.
In this specific table I have a column named 'voicemail_id'.
Then it's replicated to the pbx_config table, from where Asterisk gathers all the real data.
My extconfig.conf line looks like this: 'voicemail.conf => odbc,odbc-asterisk,pbx_config'
In the pbx_config table there's an 'id' column, not 'uniqueid'. Does the name matters?
By: Anthony LaMantia (alamantia) 2007-01-10 15:48:26.000-0600
after looking at the code i made a modification regarding this in one of my branches. can you test it out and see if it's still happening when using
this branch http://svn.digium.com/svn/asterisk/team/anthonyl/usersconf-vmpassword/
you can check it out with this command.
svn co http://svn.digium.com/svn/asterisk/team/anthonyl/usersconf-vmpassword/
By: Jason Parker (jparker) 2007-01-10 15:50:39.000-0600
Yes, you must have a uniqueid field
By: Anthony LaMantia (alamantia) 2007-01-10 15:56:48.000-0600
in change_password_realtime() in app_voicemail.c
uniqueid is used as follows to update the password in the database.
res = ast_update_realtime("voicemail", "uniqueid", vmu->uniqueid, "password", password, NULL);
I am not 100% positive on why we use that value in such a way or how it corrisponds to your voicemail setup( i would just assume we would use vmu->mailbox but i guess it may cause some sort of namespace collision with multople contexts in somecases) , but you may want to start using that value.
By: Caio Begotti (caio1982) 2007-01-11 09:40:09.000-0600
Alamantia, Qwell: is there any difference for this uniqueid column if using Realtime Static?
I've added the column uniqueid to my pbx_config table and it's always null, not updated.
By: jmls (jmls) 2007-01-11 11:00:47.000-0600
I had this problem just today - with my odbc driver I had to declare the uniqueid field as a varchar before I could update the password
By: Caio Begotti (caio1982) 2007-01-11 11:12:41.000-0600
Jmls, I've added it as varchar too but didn't work.
I'm starting to think I'm really lame :-)
By: Anthony LaMantia (alamantia) 2007-01-11 14:54:01.000-0600
have you loaded any values into the field?
By: Caio Begotti (caio1982) 2007-01-12 05:53:28.000-0600
Alamantia, I'm not understading things so well. I have added a varchar 'uniqueid' column to my pbx_config (which is under a Realtime Static schema, so everything is placed together in the DB). Nothing more.
Should I do something else or it should work magically? I don't get how this uniqueid will be related to others things then. Also, I didn't load anything (how and where?) neither the voicemail application loaded anything.
By: Tilghman Lesher (tilghman) 2007-01-12 10:35:18.000-0600
The uniqueid column in your table should have a unique index on the column. In most cases, it is an integer field and is the primary key, with an autoincrement.
By: Caio Begotti (caio1982) 2007-01-12 12:06:32.000-0600
If I add a uniqueid column in my Realtime Static table it just not updated at all. Always empty/null.
If I change my id column to uniqueid, everything stop working. Asterisk cannot read anything from the DB.
Jmls, could you please show me your tables settings and extconfig.conf? I beg you ;-)
By: Anthony LaMantia (alamantia) 2007-01-12 12:16:43.000-0600
it's just a incrementing numeric value that is different for each mailbox.
there are some examples here. near the bottom that you can check out
i am going to close this issue as it's not really a bug at all and more of a support issue, if the links above did not really help you should post your question to the asterisk-users list at lists.digium.com
By: Caio Begotti (caio1982) 2007-01-12 13:21:23.000-0600
I don't think it's a support issue because I said many times I'm using a Realtime Static schema and everything is fine but this password changing. Please take a look here:
You'll quickly notice how different it is from what you said (for me you meant pure Realtime).
If I'm still not understanding it and I'm harassing this ticket, please, I'd like to understand then how differently Asterisk read/write in pure Realtime and Realtime Static schemas, because this uniqueid thing didn't make sense for me using the Static mode.
By: Jason Parker (jparker) 2007-01-12 13:26:58.000-0600
Documentation in voicemail.conf has been updated to state that realtime static should not be used for voicemail.conf. It is not currently supported. Sorry for the misunderstanding.
By: Leif Madsen (lmadsen) 2007-01-26 12:43:16.000-0600
Just as a passing note on this for anyone else who seems to find this bug, you can probably work around this using the 'externpass' option in the voicemail.conf file. Asterisk passes as arguments to the script using:
$argv --> script
$argv --> vm_context
$argv --> extension
$argv --> password
So now you can write a small script which will update the pin in your DB.