I have updated from Asterisk 1.6 to Asterisk 11. I was using MySQL command in asterisk dialplan to access the data base on Asterisk 1.6, but now this command seems to be not working. After going through some previous posts, I guess that MySQL command is not supported by Asterisk 11. Can someone please tell me what can be the alternative to MySQL and how can i configure such alternative?
Following is what I’m trying to do in dialplan:
exten => _xxxx,n,MYSQL(Connect connid localhost user pswd db)
exten => _xxxx,n(noerror),MYSQL(Query resultid ${connid} SELECT system FROM user_to_system WHERE callerID='${CID}')
exten => _xxxx,n(fetchrow),MYSQL(Fetch foundRow ${resultid} system)
exten => _xxxx,n,MYSQL(Clear ${resultid})
exten => _xxxx,n,MYSQL(Disconnect ${connid})
I dislike this kind of manipulation of command output strings. There are probably cases that you’ve overlooked, which will cause it to break in mysterious ways. Better to write a custom AGI script.