Israel Gottlieb
2013-Oct-20 11:12 UTC
[asterisk-users] error cant write to function ODBC_DEVICES
Hi all asterisk 1.8.23 I have odbc all setup to mysql but cant figure out why the dialplan wont write to the odbc function fubc_odbc.conf [DEVICES] dsn=device-conn ;dsn in res_odbc not odbc.ini readsql=SELECT call.callNum, call.city, devices.callId, devices.id FROM call INNER JOIN devices ON call.id = devices.callId WHERE deviceNumber = '${ SQL_ESC(${ARG1})}' writesql=insert into voted (callId,callNum,city,deviceId,SerialNum, serverResponse) values (${VAL1},"${VAL2}",${VAL3},${VAL4},${VAL5},"${VAL6}" extension.conf the relevant line same => n,set(ODBC_DEVICES()=${callid},${call},1,${deviceid},${num},${ serverupdate}) when sending the values from the cli using odbc write it works ok reading from the dialplan works ok i tried sending plain values without variables but from the dialplan gives me a error " cant write to function ODBC _DEVICES" happy to hear any ideas -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20131020/345bb494/attachment.html>
Rusty Newton
2013-Oct-23 17:15 UTC
[asterisk-users] error cant write to function ODBC_DEVICES
On Sun, Oct 20, 2013 at 6:12 AM, Israel Gottlieb <isrlgb at gmail.com> wrote:><snip>> > but from the dialplan gives me a error " cant write to function > ODBC_DEVICES" > > happy to hear any ideasI don't use func_odbc on a regular basis, but from looking at the sample file and looking at the functions provided within Asterisk. The ODBC_DEVICES function does not exist. The three functions available for configuration within func_odbc.conf appear to be ODBC_SQL,ODBC_ANTIGF,ODBC_PRESENCE Also the only examples of the string "ODBC_DEVICES" out on the web according to Google show up at the various forums you have asked about it. :) So.. "can't write to function" is definitely expected behavior. Hope that helps! -- Rusty Newton Digium, Inc. | Community Support Manager 445 Jan Davis Drive NW - Huntsville, AL 35806 - US direct: +1 256 428 6200 Check us out at: http://digium.com & http://asterisk.org