DOES ANYONE HAVE ANY EXPERIENCE OF ASTERISK TO ORACLE
For the last 6 months trying to move my asterisk call logging from mysql to an Oracle DB. All existing questions raised on this forum do no show an answer, and have been through every asterisk/oracle resource I can find.
I have created the odbc/odbcinst ini files, and can connect to the database via isql without any problems, and retrieve data.
When connecting via asterisk, the message log states:
cdr_odbc.c: cdr_odbc: Unable to connect to datasource: ora11db
On the server where asterisk is located is a working 11db, which I can also connect to via other remote tools.
I have made the following configuration:
modules.conf - made sure that cdr_mysql is not loaded, and cdr_odbc is loaded.
The TNS connection via the listener is call ora11db, and also the DNS name in odbc.ini
Checking via the CLI, CDR shows the corect DNS, username and password.
There are configurations in cdr_odbc too.
Does anyone have a working CDR to unixodbc on Fedora ? I would be interested to compare configurations
since my original post, i have got a little further. All my configs are and turned on unix odbc debug and discovered that it looks like a permissions issue between unixodbc and oracle. using verbose loggin in asterisk, cdr_odbc gets ll tne config details, but the sql_connect fails with an IM004 error.
Looking through oracle errors this looks like unixodbc cannot access/read some part of the oracle environment.
I’m using an oracle 11 db on the same server, so trying to use the existing oracle so libraries. I also tried installing the oracle instant client, but has the same errors.
So still looks like a oracle / unixodbc permission problem. However ISQL connects to the database without any problems.
i had asterisk in the relevant groups, but the asterisk user did not have the environment variables set. So just added the oracle environment to the .bash_profile, and can now sqlplus from the asterisk user.
just working on something else at the moment, so will have to test a little later
have tried everything again. Changed odbc connections as per your config, and still the same errors.
For each change of configs, I have performed a reboot just to be sure it’s a clean asterisk. Also after each test, checked isql which is still working.
So got to a sticking point again. I am still unsure whether the oracle library libsqora.so.11.1 is the correct one. I am using befora 8, and there was a unixodbc patch last week, but that has made no difference either.
Will continue experimenting when I get chance, but have to use my production/working asterisk to do the testing, availability is limited.
thanks for you help so far - at least I know that oracle does work, and will carry on with the battle of trying to get it to work
Loaded the 10g xe client - at this point don’t want to move db back to 10g.
Pointed the environment to the xe client libraries, changed asterisk configs, and still getting the same errors. Isql still works ok.
My C is only ‘basic’, but going to do some more work on trying to debug the SqlConnect more in the cdr_odbc.c . I know which statement is failing on the Init function.
Just a little busy with other things at the moment, so will have a look next week.
Still using MYSQL = no-one has updated this thread since I was last looking at it.
I do know that if asterisk and oracle is on the same server, that you shouldn’t need a client.
Everyone I spoke to was using the client to talk from an asterisk server to a database server.
Sorry, but cannot offer any help, as I was not able to resolve this problem. I currently use Fedora 8, and in the process of moving/creating a new service in fedora 9, and am going to try again to see if I can get asterisk talking to oracle.
[global]
dsn=PRD11R1
username=usr_asterisk
password=xyz
loguniqueid=yes
dispositionstring=yes
table=bubs_asterisk_cdr_r
;usegmtime=no ; set to “yes” to log in GMT
res_odbc.conf:
;;; odbc setup file
; ENV is a global set of environmental variables that will get set.
; Note that all environmental variables can be seen by all connections,
; so you can’t have different values for different connections.
[ENV]
ORACLE_HOME=>/var/opt/oracle
TNS_ADMIN=>/var/opt/oracle/network/admin
NLS_LANG=>AMERICAN_AMERICA.AL32UTF8
NLS_NCHAR=>AL32UTF8
[quote=“iasgoscouk”]I never got asterisk working with oracle.
Still using MYSQL = no-one has updated this thread since I was last looking at it.
I do know that if asterisk and oracle is on the same server, that you shouldn’t need a client.
Everyone I spoke to was using the client to talk from an asterisk server to a database server.
Sorry, but cannot offer any help, as I was not able to resolve this problem. I currently use Fedora 8, and in the process of moving/creating a new service in fedora 9, and am going to try again to see if I can get asterisk talking to oracle.[/quote]
… Hi there,
I’m in the same situation. I spent the last week trying to set up Asterisk 1.4.24.1 on a Virtual CentOS 5.0 machine with Oracle 10g in a remote server, but i miserably failed.
I installed the oracle-odbc instant client… but no luck at all.
Asterisk-RealTime-MySQL-odbc runs nice and smoothly…
You may try you luck with Easysoft Oracle ODBC drivers. But the purpose wont be served for long, as sooner or later you will be inclined to take advantage of Multithreaded Oracle Connection Pooling. But let me tell you what I did. I have written a Multithreaded TCP server which serves the request from Asterisk CDR, AGI, API, AMI, ARA (Real Time) components etc and connected the TCP server with Oracle 11g/10g using Oracle OCI Libraries. In this way I am able to use Oracle mutlithreaded OCI libraries with connection pooling. So the response is as fast as that of MySQL with additional benefit I am able to put all the business logic relating to calls (IVR, VoiceLogger, Dialer, IP PBX) in the time tested Oracle Stored Procedures with J2EE support. Secondly I connected Pocket Sphinx (Automatic Speech Recognition Engine) with my TCP server while taking advantage of storing Sphinx Linguistic Model, Language Model, Grammar, Transcription, Speech Corpus, Sound Files for Sphinx training all in the Oracle Database, taking advantage of deciding (in run time) about the sphinx related data just according to the requirement.