I have been able to write to my database and pull information. However when I upgraded from 1.6.1.18 to 1.6.2*, I can no longer write entries to the database. The functions remain the same and I receive this error:
Here is my gunc_odbc.conf
[db2log]
dsn=ksn
writesql=INSERT INTO knpgroup/callog (clpsrc,cldate,cltime,clpdst,cltype,clerrm) VALUES ('${CALLERID(number)}','${STRFTIME(${EPOCH},,%Y%m%d)}','${STRFTIME(${EPOCH},,%H%M%S)}','${CALLERID(dnid)}','${ARG1}','${ARG2}')[/code]
And here is my dialplan:
[code];If the extension is number 7, answer the extension, and hangup
exten => 7,1,Answer()
exten => 7,n,Set(runST=${ODBC_db2log(A,)})
exten => 7,n,Playback(hello)
exten => 7,n,Read(empNumber,employee-number,5,,,10)
;Test if the user is signed in
;If I'm I got to 50 and ask if tasks are completed
exten => 7,n,Set(lastcode=${ODBC_db2gtime(${empNumber})})
exten => 7,n,GotoIf($["${lastcode}" = "I"]?50)
#[... tons of redirection code I did not include]
;Close Call, exit call
exten => 7,9000,Playback(goodby)
exten => 7,n,Set(runST=${ODBC_db2log(H,)})
exten => 7,n,Hangup()
See whole stack bellow:
[quote] == Using SIP RTP CoS mark 5
– Executing [7@myphones:1] Answer(“SIP/1000-00000001”, “”) in new stack
[Mar 14 15:39:32] ERROR[2046]: pbx.c:3381 ast_func_read: Function ODBC_db2log cannot be read
– Executing [7@myphones:2] Set(“SIP/1000-00000001”, “runST=”) in new stack
– Executing [7@myphones:3] Playback(“SIP/1000-00000001”, “hello”) in new stack
– <SIP/1000-00000001> Playing ‘hello.ulaw’ (language ‘en’)
– Executing [7@myphones:4] Read(“SIP/1000-00000001”, “empNumber,employee-number,5,10”) in new stack
– Accepting a maximum of 5 digits.
– <SIP/1000-00000001> Playing ‘employee-number.ulaw’ (language ‘en’)
– User entered ‘71408’
– Executing [7@myphones:5] Set(“SIP/1000-00000001”, “lastcode=”) in new stack
– Executing [7@myphones:6] GotoIf(“SIP/1000-00000001”, “0?50”) in new stack
[Mar 14 15:39:34] ERROR[2046]: pbx.c:3381 ast_func_read: Function ODBC_db2tlog cannot be read
– Executing [7@myphones:7] Set(“SIP/1000-00000001”, “runST=”) in new stack
– Executing [7@myphones:8] Playback(“SIP/1000-00000001”, “signed-in”) in new stack
– <SIP/1000-00000001> Playing ‘signed-in.ulaw’ (language ‘en’)
– Executing [7@myphones:9] Goto(“SIP/1000-00000001”, “9000”) in new stack
– Goto (myphones,7,9000)
– Executing [7@myphones:9000] Playback(“SIP/1000-00000001”, “goodby”) in new stack
– <SIP/1000-00000001> Playing ‘goodby.ulaw’ (language ‘en’)
== Spawn extension (myphones, 7, 9000) exited non-zero on ‘SIP/1000-00000001’
– Executing [h@myphones:1] Answer(“SIP/1000-00000001”, “”) in new stack
== Spawn extension (myphones, h, 1) exited non-zero on ‘SIP/1000-00000001’
[/quote]