[asterisk-users] link to MySQL connection
Eric Wieling
EWieling at nyigc.com
Tue Dec 3 08:52:42 CST 2013
Yes. Use func_odbc in your PHP AGI. In Asterisk dialplan functions are treated like dialplan variables so you can get and set them just like you would other dialplan variables.
If it takes 5 seconds to open a PDO DB connection inside PHP you have some OTHER problem.
-----Original Message-----
From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Don Kelly
Sent: Tuesday, December 03, 2013 9:50 AM
To: 'Asterisk Users Mailing List - Non-Commercial Discussion'
Subject: Re: [asterisk-users] link to MySQL connection
> In the php routines, I would like to use the persistent connection
> that is established in the dialplan, rather than creating a new
> connection each time they run. How can I do this?
You can't, they are completely separate processes and code.
Joshua Colp
Thanks--that's not the answer I wanted, but it sure was quick. :) Is there anything that would enable me to use a persistent connection in the agi?
--Don
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
More information about the asterisk-users
mailing list