Yehavi Bourvine +972-8-9489444
2007-May-01 11:23 UTC
[asterisk-users] MYSQL application in dial plan
Hello, I would like to implement a few decision making process inside the dialplan using information stored in MySQL (like LCR, etc.). I see the MYSQL() application, but as far as I understand I have to connect to the database each time I want to query it; this seems a CPU eater to me. Is this indeed the case, or can I open it once Asterisk starts and leave it open? Thanks, __Yehavi:
Well, you should be able to leave it open. However, I don't know what would happen if MySQL times out and disconnects the connection because it considers it stale. I don't know if you can check that error and reconnect. Yehavi Bourvine +972-8-9489444 wrote:> Hello, > > I would like to implement a few decision making process inside the dialplan > using information stored in MySQL (like LCR, etc.). I see the MYSQL() > application, but as far as I understand I have to connect to the database each > time I want to query it; this seems a CPU eater to me. Is this indeed the case, > or can I open it once Asterisk starts and leave it open? > > Thanks, __Yehavi: > _______________________________________________ > --Bandwidth and Colocation provided by Easynews.com -- > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users > >
Yehavi Bourvine +972-8-9489444 wrote:> Hello, > > I would like to implement a few decision making process inside the dialplan > using information stored in MySQL (like LCR, etc.). I see the MYSQL() > application, but as far as I understand I have to connect to the database each > time I want to query it; this seems a CPU eater to me. Is this indeed the case, > or can I open it once Asterisk starts and leave it open? >or, you can use func_odbc that comes with * 1.4. Now you don't have to connect to your db every time you use it, I think.> Thanks, __Yehavi: > _______________________________________________ > --Bandwidth and Colocation provided by Easynews.com -- > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users-- Remco Post "I didn't write all this code, and I can't even pretend that all of it makes sense." -- Glen Hattrup