func_odbc is not running oracle stored procedure

Hi, guys thanks for your time and help

i have a asterisk using func_odbc for connect to oracle i can do a normal query
using the readsql=“query”

But i need to use a stored procedure(pkg) from oracle db

i try this:
[vpin]
dsn=hd_test
readsql= DECLARE
readsql+= var1 varchar2(100);
readsql+= var2 varchar2(100);
readsql+= var3 varchar2(100);
readsql+= var4 varchar2(100);
readsql+= BEGIN HD.IVR_AUTENTIC(4,4020003802,0883,var1,var2,var3,var);
readsql+= END;
readsql+= /

Error:

[Aug 2 11:55:20] NOTICE[19753][C-00000002] res_odbc.c: res_odbc: Connected to hd_test [OracleODBC-11g]
[Aug 2 11:55:20] WARNING[19753][C-00000002] func_odbc.c: SQL Execute returned an error -1: HY000: [Oracle][ODBC][Ora]ORA-06550: line 1, column 33:
PLS-00103: Encountered the symbol “var2” when expecting one of the following:

:= ; not null default character
The symbol “;” was substituted for “var2” to continue.
ORA-06550: line 1, column 5 (1022)
[Aug 2 11:55:20] WARNING[19753][C-00000002] func_odbc.c: SQL Exec Direct failed (-1)![DECLARE var1 varchar2(100) var2 varchar2(100) var3 varchar2(100) var4 varchar2(100) BEGIN HD_BDI.IVR_AUTENTIC(4,4020003802,0883,var1,var2,var3,var) END /]

I assume it is an Oracle syntax error. I would guess that you need some punctuation, if not a completely new DECLARE, at the start of each clause in the DECLARE. Take it up with an Oracle forum.

NB this forum is not the right one on this board for any sort of support question.

Hi, thanks for your time and help
but the sintaxi of Oracle Work fine on any SQL Script Lenguaje

this query not working only in the func_odbc of asterisk
Client: SQL WorkBench
DB: Oracle
Query:
DECLARE
var1 varchar2(100);
var2 varchar2(100);
var3 varchar2(100);
var4 varchar2(100);
BEGIN HD.IVR_AUTENTIC(4,4020003802,0883,var1,var2,var3,var);
END;
/
Result:
executed successfully

There are ;s in the directly entered SQL but not in the machine generated SQL.

yes i know
but the func_odbc remove the ";"
look this is my func_odbc readsql confiuration
i test in this way:
readsql= DECLARE var1 number; var2 number; var3 number; var4 varchar2; BEGIN HD.IVR_AUTENTIC(4,4020003802,0883,var1,var2,var3,var4); END; /

and this way:
readsql= DECLARE
readsql+= var1 number;
readsql+= var2 number;
readsql+= var3 number;
readsql+= var4 varchar2;
readsql+= BEGIN HD.IVR_AUTENTIC(4,4020003802,0883,var1,var2,var3,var4);
readsql+= END;
readsql+= /

and the same result!
the func_odbc remove the ;

The basic command parser removes them. I’m assuming you are using AEL and AEL uses the same comment delimiter as extensions.conf. Few people use AEL.

ok, thanks for your time and help i will check AEL