this my func_odbc
[IVRTICKETLOOKUP]
dsn=bluenergy
writesql= INSERT INTO ticket (data,ora,numero_chiamante,codice_cliente,numero_contratto,kg_bombola) VALUES (’${SQL_ESC(${ARG1})}’,’${SQL_ESC(${ARG2})}’,’${SQL_ESC(${ARG3})}’,’${SQL_ESC(${ARG4})}’,’${SQL_ESC(${ARG5})}’,’${SQL_ESC(${ARG6})}’)
res_odbc it’s ok because i can see connection on cli with ODBC SHOW command
app_mysql works with these statements inside Dialplan
same => n,MYSQL(Connect connid localhost root pwd bluenergy)
same => n,MYSQL(QUERY resultid ${connid} INSERT INTO ticket (data,ora,numero_chiamante,codice_cliente,numero_contratto,kg_bombola) values (${ticket01},${ticket02},${ticket03},${ticket04},${ticket05},${ticket06}))
This one via ODBC It’s not functioning
same => n,Set(wrticket=${ODBC_IVRTICKETLOOKUP(‘INSERT INTO ticket (data,ora,numero_chiamante,codice_cliente,numero_contratto,kg_bombola) VALUES (${ticket01},${ticket02},${ticket03},${ticket04},${ticket05},${ticket05})’)})
$ticket variable it’s correctly evalueated
same => n,Set(ticket01=${SHELL(/var/tmp/adesso.sh):0:-1})
same => n,Set(ticket02=${SHELL(/var/tmp/hours.sh):0:-1})
same => n,Set(ticket03=${CALLERID(num)})
same => n,Set(ticket04=${codicecliente})
same => n,Set(ticket05=${num_contck})
same => n,Set(ticket06=${ideticck})
I always get Function IVRTICKETLOOKUP can not be read
this is my mysql table
CREATE TABLE ticket (numero_ticket INT NOT NULL AUTO_INCREMENT PRIMARY KEY,data DATE,ora CHAR(5),numero_chiamante CHAR(15),codice_cliente CHAR(5),numero_contratto INT,kg_bombola CHAR(10)) ;
Thanks…