Asterisk , php and oracledb


#1

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.


#2

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.


#3

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


#4

Hi!

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

Thank you in advance.


#5

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


#6

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.


#7

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


#8

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

Thank you in advance.


#9

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.


#10

Hi,

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


#11

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