I have an extension that when called i want to write some data to the DB.
func_odbc.conf
[some]
prefix=data
DSN=mydns
writesql=INSERT INTO activeCalls(channel, extension, cid, fname, time) VALUES ($[VAL1],$[VAL2],$[VAL3],$[VAL4],$[VAL5])
from my extensions.conf
[ConferenceRooms]
exten => 6300,1,NoOp()
same => n,Set(data_some()=$(${CHANNEL}\,${EXTEN}\,${CALLERID(ani)}\,${CALLERID(name)}\,${STRFTIME(${EPOCH},,%Y%m%d-%H%M%S)})
same => n,ConfBridge(${EXTEN})
I know my code gets to my database and can write data because i wrapped ‘$[VALx]’ around my $[VALx] and they show up in the db.
I suspect the issue is the code from the value from extensions.com don’t get passed to the func_odbc.conf . My output from the CLI is
Executing [6300@LocalSets:2] Set(“SIP/xxxSomeValuexxx-00000000”, “data_some()=$(SIP/xxxSomeValuexxx-00000000,6300,1235551212,Some Caller,20140417-201225”) in new stack