On 12/3/2013 10:11 AM, Don Kelly wrote:
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
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.
Eric Wieling
Thanks, Eric. If I can't figure out why the connection takes so long, I'll
try the func_ODBC approach.
look into DNS problems. Something may be trying to do an reverse DNS
lookup and taking too long to either give up or get an answer.
--
_____________________________________________________________________
-- 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