Asterisk , php and oracledb

Hi is it possible in asterisk to connect to oracle by using php ? …can you please show me simple code that php can connect to oracle database… also is there some other dependencies to install in asterisk in other php can connect to oracle ?

Thank you in advance.

You can connect to an Oracle DB using the PHP’s function oci_connect() there re many examples on the PHP official website. Related to the integration between Asterisk and PHP you can use the class PHPAGI, no special package required to use this class.

Ok thank you for the reply. is there tutorial for this?.

Hi!

I am using PDO in php, where should I enable this in asterisk php_pdo_oci.dll

Thank you in advance.

wrong forum, this is the Asterisk forum. Your question is not related at all with Asterisk. This need to be addressed on the PHP comunity

Ok thanks, Never mind I thought I need to do this in asterisk configuration…because I am using external database.which is already exist and I need to connect it.

You can connect to external DB on the Asterisk side, using ODBC connector, I just dont know if works with Oracle DB

I have question I downloaded the PHPAGI, where will I put this in asterisk, what folder ?

Thank you in advance.

You can put the the files in any location just make sure you specify the correct path on the diaplan, but by default /var/lib/asterisk/agi-bin, Asterisk looks here for the AGI scripts by default.

1 Like

Hi,

Thank you so much for the quick reply. Ok I put it now.

If you have any other questions, open a new thread, don’t make this thread endless