I’m making changes to an Asterisk IVR designed by someone else.
The application uses both func_odbc.conf and php agi to access an external MySQL database.
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?
In res_odbc.conf, the context “asterisk” is established, successfully referencing “asterisk-connector” in odbc.ini.
pre-connect => yes resulting in a persistent connection at startup.
Opening a connection in the php routines takes about 5 seconds, which is unacceptable.