Hello all again,
I am really frustrated… I have a test 800Mhz Athalon test box and a production PowerEdge dual Xeon 2.0Ghz box. I am running the following on both -exact same setup-:
The mysql realtime and mysql cdr functions work perfectly on both.
The mysql command in the dialplan fails to connect no matter what I put in as a username and password (even root).
It seems somthing is broken here… Can anyone help?? Thanks!!
-Cheers, Peter.
Dear colbec,
Yes, the socket is correct… but I also tried commenting out the socket and using just the localhost IP and port… My CDR is working perfectly… just not the dialplan access… Here is my cdr_mysql.conf
Let’s assume that the permissions on 127.0.0.1 are ok for this user since cdr_mysql works.
Next is an odd typo you have in your mysql(Connect connid d!h!host…
does that have any relevance?
How about punctuation inside the parentheses? Any odd marks (you have a hyphen and an underscore to deal with)? do you have any parameter substitution?
I only have the localhost setup for the host on the user account in MySQL… but the root account which has no restrictions also did not work, so I ruled out user privileges…
Just a check, but these connects are using the MySQL shared libraries correct… so the new password hashing system should not affect this?
I am fairly certain that my command is correct as it works on my test box, just not the production system. Both with the same MySQL, asterisk, and asterisk-addon versions…
Thanks so much!!
-Cheers, Peter.
–
Here are my sql commands btw… they reside in a macro:
exten => s,3,MYSQL(Connect dbConn localhost ast-dp xxxx ast-pbx_r2)
exten => s,4,MYSQL(Query resultid ${dbConn} SELECT\ in_out\ FROM\ exen_status\ WHERE\ stat_exten=’${EXT}’)
exten => s,5,MYSQL(Fetch foundRow ${resultid} OOO)
exten => s,6,MYSQL(Clear ${resultid})
exten => s,7,MYSQL(Disconnect ${dbConn})
What error log files do you have available? When s,3 is activated do you see anything in /var/log/messages for example? Is there an access log file activated for mysql?
Eureka!!
Well, I got my answer… I rewrote parts of the add-on… I hope to submit them for integration into the trunk… Since then it works.
And I did notice on my test box, instead of a dash I used an underscore in the username. But at this point I have been fiddling so much I can not be certain that is what did it.
Either way, I have moved the username, password, and connect junk into a config file and out of the dialplan (much better in my opinion). There was a lot of inspiration that came from the work of the cdr_mysql authors… Thanks!!
And Thank You to yusuf, baconbuttie, and especially colbec for your help. Sometimes you just need to talk over a problem to find the answer.