I’ve been messing with the func_odbc (new in trunk). It looks promising but I can’t seem to make it work as described.
I’ve got this in my dialplan
exten => 2,n,Set(ODBC_LOG_DATA()=val1,val2)
And this in func_odbc.conf
[LOG_DATA]
dsn=asterisk
write=INSERT INTO data (val1,val2) VALUES (’${VAL1}’, ‘${VAL2}’)
I would expect this to insert the tuple into the database. However what actually happens is only the first value is used. So the SQL statement comes out like
INSERT INTO data (val1,val2) VALUES (‘val1’, ‘’)
It seems like anything after the first parameter in the dialplan is discarded. Can anyone confirm this?
Are functions allowed be receive multiple values? i.e.
exten => 1,1,Set(FUNC()=val1|val2)
Dan