[Asterisk-Users] voicemail and mysql
Dear list members, I am trying to use mysql for the mailbox definitions of the voicemail system. All works fine, but my asterisk does not catch the options of the mailbox. In particular, 'attach=no' has no effect. Here is my test table: mysql select * from users where email='[EMAIL PROTECTED]'; +-+-+--+--+---+---+++ | context | mailbox | password | fullname | email | pager | options| stamp | +-+-+--+--+---+---+++ | default | 212 | 1978 | Francesco Castellano | [EMAIL PROTECTED] | | tz=italy|attach=no | 20050624171320 | +-+-+--+--+---+---+++ 1 row in set (0.00 sec) Even if the only option is 'attach=no', it doesn't work. And then I have a couple of question on voicemail: when asterisk reads the mailbox definitions? At startup? Is it enough a reload to reread the definitions, or is it necessary a restart? Finally, is it possible to use at the same time some mailbox from mysql and some from voicemail.conf? At cli prompt show voicemail users doesn't work for mysql-defined mailboxes? I've not found any documentation on these issues, and I have some difficulties to get informations from the source code. Any suggestions are welcomed! Thanks, bye Francesco ___ Asterisk-Users mailing list Asterisk-Users@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [Asterisk-Users] voicemail from mysql / change password
Have you examined your debug log for a possible SQL error? Updating user passwords works fine on our systems. There should be no need to force anyone to do it a certain way. -Matthew - Original Message - From: Brad Hughes [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, December 11, 2004 10:13 AM Subject: [Asterisk-Users] voicemail from mysql / change password Im having a problem where I've just switched from static configs to realtime configs stored in mysql It's all working fine (in terms of it reading the configs and loading them as it should), except my problem is that if a user changes there voicemail password via the Advanced Options (0) in the Voicemail menu via there SIP phone, the password doesn't get updated in the mysql database (like it used to in the static voicemail.conf file) - and consequently the next time I reload asterisk, there voicemail password gets reset back to whatever it was/is in the mysql database. Am I overlooking something, or is there an easy solution? If I could just disable the change password option in Voicemail, that'd be enough for me (and force them to change it via a web interface). Is that do-able? Here's the line from my extconfig.conf: voicemail = mysql,asterisk,users And the mysql users table schema: CREATE TABLE users ( context char(79) DEFAULT '' NOT NULL, mailbox char(79) DEFAULT '' NOT NULL, password char(79) DEFAULT '' NOT NULL, fullname char(79) DEFAULT '' NOT NULL, email char(79) DEFAULT '' NOT NULL, pager char(79) DEFAULT '' NOT NULL, options char(159) DEFAULT '' NOT NULL, stamp timestamp, PRIMARY KEY (context,mailbox) ); Thanks Brad ___ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users ___ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
[Asterisk-Users] Voicemail and MySQL
I have Asterisk talking to MySQL using Realtime but for some reason I keep getting the wrong context used when Realtime makes the MySQL call. I can see this in my /var/log/mysql.log file. Because of this I can't login to VoicemailMain from my X-Ten phone. I can login if I statically configure the voicemail user in voicemail.conf but I prefer the MySQL. SELECT * FROM users WHERE mailbox = '0063' AND context = 'default' In my sip.conf file I have the default settings except the default context is set. I removed all the example SIP configs further down the config. [general] context=from-sip ;Default context for incoming calls In my extensions.conf file I have the following. All example extension configs have been removed. [from-sip] exten = 8500,1,VoicemailMain exten = 8500,n,Hangup What am I doing wrong? Bill ___ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [Asterisk-Users] Voicemail and MySQL
A..now we find the problem. Voicemailmain does NOT use the context that calls it. haha..finally found the problem. You must call it as VoicemailMain(@from-sip) if you want it to look for mailbox in a specific context. I knew it was something simple. -Matthew - Original Message - From: Bill [EMAIL PROTECTED] To: Asterisk Users Mailing List - Non-Commercial Discussion [EMAIL PROTECTED] Sent: Monday, December 13, 2004 1:04 PM Subject: [Asterisk-Users] Voicemail and MySQL I have Asterisk talking to MySQL using Realtime but for some reason I keep getting the wrong context used when Realtime makes the MySQL call. I can see this in my /var/log/mysql.log file. Because of this I can't login to VoicemailMain from my X-Ten phone. I can login if I statically configure the voicemail user in voicemail.conf but I prefer the MySQL. SELECT * FROM users WHERE mailbox = '0063' AND context = 'default' In my sip.conf file I have the default settings except the default context is set. I removed all the example SIP configs further down the config. [general] context=from-sip ;Default context for incoming calls In my extensions.conf file I have the following. All example extension configs have been removed. [from-sip] exten = 8500,1,VoicemailMain exten = 8500,n,Hangup What am I doing wrong? Bill ___ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users ___ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [Asterisk-Users] Voicemail and MySQL
Yeah, I don't believe that new feature wasn't in the one I made my notes with a few months ago. I just assumed that context was the same as in sip.conf and extensions.conf Bill - Original Message - From: Matthew Boehm To: Asterisk Users Mailing List - Non-Commercial Discussion Sent: Monday, December 13, 2004 2:21 PM Subject: Re: [Asterisk-Users] Voicemail and MySQL A..now we find the problem. Voicemailmain does NOT use the context that calls it. haha..finally found the problem. You must call it as VoicemailMain(@from-sip) if you want it to look for mailbox in a specific context. I knew it was something simple. -Matthew - Original Message - From: Bill [EMAIL PROTECTED] To: Asterisk Users Mailing List - Non-Commercial Discussion [EMAIL PROTECTED] Sent: Monday, December 13, 2004 1:04 PM Subject: [Asterisk-Users] Voicemail and MySQL I have Asterisk talking to MySQL using Realtime but for some reason I keep getting the wrong context used when Realtime makes the MySQL call. I can see this in my /var/log/mysql.log file. Because of this I can't login to VoicemailMain from my X-Ten phone. I can login if I statically configure the voicemail user in voicemail.conf but I prefer the MySQL. SELECT * FROM users WHERE mailbox = '0063' AND context = 'default' In my sip.conf file I have the default settings except the default context is set. I removed all the example SIP configs further down the config. [general] context=from-sip ;Default context for incoming calls In my extensions.conf file I have the following. All example extension configs have been removed. [from-sip] exten = 8500,1,VoicemailMain exten = 8500,n,Hangup What am I doing wrong? Bill ___ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users ___ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users ___ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
[Asterisk-Users] voicemail from mysql / change password
Im having a problem where I've just switched from static configs to "realtime" configs stored in mysql It's all working fine (in terms of it reading the configs and loading them as it should), except my problem is that if a user changes there voicemail password via the "Advanced Options (0)" in the Voicemail menu via there SIP phone, the password doesn't get updated in the mysql database (like it used to in the static voicemail.conf file) - and consequently the next time I reload asterisk, there voicemail password gets reset back to whatever it was/is in the mysql database. Am I overlooking something, or is there an easy solution? If I could just disable the change password option in Voicemail, that'd be enough for me (and force them to change it via a web interface). Is that do-able? Here's the line from my extconfig.conf: voicemail = mysql,asterisk,users And the mysql users table schema: CREATETABLEusers( context char(79)DEFAULT''NOTNULL, mailbox char(79)DEFAULT''NOTNULL, passwordchar(79)DEFAULT''NOTNULL, fullnamechar(79)DEFAULT''NOTNULL, emailchar(79) DEFAULT''NOTNULL, pagerchar(79) DEFAULT''NOTNULL, options char(159)DEFAULT''NOTNULL, stamptimestamp, PRIMARYKEY(context,mailbox) ); Thanks Brad ___ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [Asterisk-Users] voicemail from mysql / change password
Answering my own question - after a few more hours googling, the way to prevent users changing there voicemail password via the voicemal "advanced options (0) menu", is described at: http://bugs.digium.com/bug_view_page.php?bug_id=0002386 All thats required is to preceed voicemail pins with a "-" character. When they try to change the password, they are just played "No". Now If they want to change there voicemail password I can force them to do it via a web interface, which will ensure the mysql db remains consistent with the Voicemail app, including after a reload! Seems to beincluded as of CVS HEAD 09-06-04 Brad - Original Message - From: Brad Hughes To: [EMAIL PROTECTED] Sent: Sunday, December 12, 2004 3:13 AM Subject: [Asterisk-Users] voicemail from mysql / change password Im having a problem where I've just switched from static configs to "realtime" configs stored in mysql It's all working fine (in terms of it reading the configs and loading them as it should), except my problem is that if a user changes there voicemail password via the "Advanced Options (0)" in the Voicemail menu via there SIP phone, the password doesn't get updated in the mysql database (like it used to in the static voicemail.conf file) - and consequently the next time I reload asterisk, there voicemail password gets reset back to whatever it was/is in the mysql database. Am I overlooking something, or is there an easy solution? If I could just disable the change password option in Voicemail, that'd be enough for me (and force them to change it via a web interface). Is that do-able? Here's the line from my extconfig.conf: voicemail = mysql,asterisk,users And the mysql users table schema: CREATETABLEusers( context char(79)DEFAULT''NOTNULL, mailbox char(79)DEFAULT''NOTNULL, passwordchar(79)DEFAULT''NOTNULL, fullnamechar(79)DEFAULT''NOTNULL, emailchar(79) DEFAULT''NOTNULL, pagerchar(79) DEFAULT''NOTNULL, options char(159)DEFAULT''NOTNULL, stamptimestamp, PRIMARYKEY(context,mailbox) ); Thanks Brad ___ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [Asterisk-Users] Voicemail and MySQL 4.1.x
Hi Folks, I think that I found the reason for that problem. MySQL server was starting with options: -O wait_timeout=100 -O interactive_timeout=200 I restarted MySQL server without these options, and apparently the problem was solved. Thanks for the answers. Rodrigo P. Telles wrote: | Hi Matteo, | | Brancaleoni Matteo wrote: | | Hi, | | | | | |I'm using Asterisk-1.0.2 and voicemail linked with MySQL-4.1.7 library. | |I realised that asterisk is loosing connection with MySQL server and | |inform that user doesn't exist. | |Does anyone is using Asterisk voicemail linked with MySQL 4.1.x library? | | | | | | sure. never lost a connection. | | Using * + mysql 4.1 since when mysql 4.1 was in beta. | | | | So, I'm using MySQL server 4.1.7 for another applications too and I don't | have troubles with them. | I realised that: | When the Asterisk starts, it make a connection with MySQL server. I saw | that | the connection with MySQL server is ESTABLISHED (netstat). | When someone try to access his mailbox, asterisk just send the query | trough the | connection without problems. | In a few minutes, the state of the connection become in CLOSE_WAIT and | in that | moment I tried to access the voicemail and failed, but the second time | it works. | It seems that I've been having problems with connections. | | I don't know exactly what's happening. | I'll try Asterisk-1.0.1 with MySQL 4.0.20 (I never had problem with | them) and then | with Asterisk-1.0.2 with MySQL 4.0.20 and 4.1.7 just to check. | | Thanks for your answer. | Best regards. | | | also used asterisk + mysql cluster for a while, only | | in the lab, but never lost connection also | | in that case. | | | | Matteo. | | -- | | Rodrigo P. Telles [EMAIL PROTECTED] | Project Manager | Devel-IT - http://www.devel-it.com.br | TDKOM Group | ___ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: ~ http://lists.digium.com/mailman/listinfo/asterisk-users ___ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
[Asterisk-Users] Voicemail and MySQL 4.1.x
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Folks, I'm using Asterisk-1.0.2 and voicemail linked with MySQL-4.1.7 library. I realised that asterisk is loosing connection with MySQL server and inform that user doesn't exist. Does anyone is using Asterisk voicemail linked with MySQL 4.1.x library? Best Regards - -- Rodrigo P. Telles [EMAIL PROTECTED] Project Manager Devel-IT - http://www.devel-it.com.br TDKOM Group -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.7 (GNU/Linux) iD4DBQFBknoZiLK8unYgEMQRAjNOAJd3ppds/2c7wJpxhUSEGSiIj6MaAJ4wt94s bHXcLVHMcGlr+6uNi1j1ZQ== =mk0S -END PGP SIGNATURE- ___ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [Asterisk-Users] Voicemail and MySQL 4.1.x
Hi, I'm using Asterisk-1.0.2 and voicemail linked with MySQL-4.1.7 library. I realised that asterisk is loosing connection with MySQL server and inform that user doesn't exist. Does anyone is using Asterisk voicemail linked with MySQL 4.1.x library? sure. never lost a connection. Using * + mysql 4.1 since when mysql 4.1 was in beta. also used asterisk + mysql cluster for a while, only in the lab, but never lost connection also in that case. Matteo. -- Brancaleoni Matteo [EMAIL PROTECTED] Espia Srl ___ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [Asterisk-Users] Voicemail and MySQL 4.1.x
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Matteo, Brancaleoni Matteo wrote: | Hi, | | |I'm using Asterisk-1.0.2 and voicemail linked with MySQL-4.1.7 library. |I realised that asterisk is loosing connection with MySQL server and |inform that user doesn't exist. |Does anyone is using Asterisk voicemail linked with MySQL 4.1.x library? | | | sure. never lost a connection. | Using * + mysql 4.1 since when mysql 4.1 was in beta. | So, I'm using MySQL server 4.1.7 for another applications too and I don't have troubles with them. I realised that: When the Asterisk starts, it make a connection with MySQL server. I saw that the connection with MySQL server is ESTABLISHED (netstat). When someone try to access his mailbox, asterisk just send the query trough the connection without problems. In a few minutes, the state of the connection become in CLOSE_WAIT and in that moment I tried to access the voicemail and failed, but the second time it works. It seems that I've been having problems with connections. I don't know exactly what's happening. I'll try Asterisk-1.0.1 with MySQL 4.0.20 (I never had problem with them) and then with Asterisk-1.0.2 with MySQL 4.0.20 and 4.1.7 just to check. Thanks for your answer. Best regards. | also used asterisk + mysql cluster for a while, only | in the lab, but never lost connection also | in that case. | | Matteo. - -- Rodrigo P. Telles [EMAIL PROTECTED] Project Manager Devel-IT - http://www.devel-it.com.br TDKOM Group -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQFBkqGGiLK8unYgEMQRAvryAJ9GgC95nBin1wqmMrFEhEKbsIjABQCeJdZL MhyQ+lG52tfhTDd9pFuiLpY= =+poC -END PGP SIGNATURE- ___ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
[Asterisk-Users] Voicemail from MySQL and Directory
The Directory app is not working when I get the voicemail users from MySQL. No matter what I try it always tells me that there is no one with that name. Is the directory app aware that it should get the names from Mysql? All my vm users are in the default context and I call the app using; exten = 9,1,Directory(default) It used to work until I changed from the text voicemail.conf to getting the info from MySQL with the patch from asterisk-addons. Any ideas? -- Carlos Chavez Director de Tecnología Telecomunicaciones Abiertas de México S.A. de C.V. ___ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
RE: [Asterisk-Users] Voicemail from MySQL and Directory
I am successfully doing this using the ast_data patch. Everything seems to be working very well. You can download it at http://svn.asteriskdocs.org/res_data. -Original Message- From: Carlos Chavez [mailto:[EMAIL PROTECTED] Sent: Monday, July 26, 2004 6:11 PM To: Asterisk Subject: [Asterisk-Users] Voicemail from MySQL and Directory The Directory app is not working when I get the voicemail users from MySQL. No matter what I try it always tells me that there is no one with that name. Is the directory app aware that it should get the names from Mysql? All my vm users are in the default context and I call the app using; exten = 9,1,Directory(default) It used to work until I changed from the text voicemail.conf to getting the info from MySQL with the patch from asterisk-addons. Any ideas? -- Carlos Chavez Director de Tecnología Telecomunicaciones Abiertas de México S.A. de C.V. ___ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/as terisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users ___ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users