[asterisk-users] asterisk -> AGI (perl) -> sqlplus(oracle)
Steve Edwards
asterisk.org at sedwards.com
Sat Jan 7 11:41:45 CST 2012
On Fri, 6 Jan 2012, Dale Noll wrote:
> I found the following lines to be helpful.
>
> $ENV{TNS_ADMIN}="/usr/lib/oracle/11.2/client/";
> $ENV{ORACLE_HOME}="/usr/lib/oracle/11.2/client/";
> $ENV{LD_LIBRARY_PATH}="/usr/lib/oracle/11.2/client/lib/";
I think a 'better practice' would be to put the 'stuff likely to change'
into the environment variables of the Asterisk process so they will
'trickle down' to sub-processes like AGIs.
This way, when you upgrade Oracle, you don't have to track down and change
all affected AGIs.
Something like this snippet from my Asterisk start up script:
nice --adjustment=-20\
env --ignore-environment\
HOSTNAME=${HOSTNAME}\
LD_LIBRARY_PATH='/usr/lib/oracle/11.2/client/lib/'\
ORACLE_HOME='/usr/lib/oracle/11.2/client/'\
PATH=${PATH}\
TNS_ADMIN='/usr/lib/oracle/11.2/client/'\
$ASTERISK $START_OPTIONS
I like to 'ignore' the environment of the process executing the script
that starts Asterisk and add in only what is needed -- I'm a 'parts left
out don't get broken' kind of guy :)
Can you give this a try and report back?
--
Thanks in advance,
-------------------------------------------------------------------------
Steve Edwards sedwards at sedwards.com Voice: +1-760-468-3867 PST
Newline Fax: +1-760-731-3000
More information about the asterisk-users
mailing list