@unison wrote:
Hi
I am wanting to look up a MySQL database as part of my dial plan. I have got the database referenced by Asterisk…
odbc show ODBC DSN Settings ----------------- Name: davos DSN: MySQL-davos Last connection attempt: 1970-01-01 12:00:00 Number of active connections: 1 (out of 1) Name: asteriskcdrdb DSN: MySQL-asteriskcdrdb Last connection attempt: 1970-01-01 12:00:00 Number of active connections: 1 (out of 1)
However, everything I find says I need to put the query into func_odbc.conf file, this fine didnt exist; so I created it… but I’m not sure if it is actually used:
[SQL] dns=MySQL-davos readsql=select * from tblevent where restoretime > NOW();
Ive referenced this in my dial plan:
[davostest] exten => s,1(hastings),NoOp(Test: Hastings) exten => s,n,set(resultset=${ODBC_SQL()})
However this
[2018-05-09 07:52:58] ERROR[13892][C-0000000c]: pbx_functions.c:608 ast_func_read: Function ODBC_SQL not registered
Any ideas what I’m missing here?
Posts: 1
Participants: 1