UnixODBC hell

Realtime is not all it is cracked up to be. In particular Asterisk and Realtime is bar none the most aggressively hostile piece of software towards Firebird databases which is what I use in everything (9 years and counting). So far I have counted 5 reserved words I have tried to deal with.

I got very lucky modifying the source with voicemail to make it use the column name ‘secret’ instead of ‘password’ which is reserved with Firebird.

Is there a way to do column mappings anywhere in any configuration file to route around these reserved words? I asked the same question in the UnixODBC mailing lists too.

Worst case scenario I can modify the source but I have spent days pouring through the Asterisk source just trying to find ‘insert into’ statements and looking for the reserved words in the source has not lead me to any lines of code I could modify.

If anybody knows where I can find the realtime database code (source file or line) for Queues, Queue logs, SIP, Extensions, etc. it would be greatly appreciated.

You may want to look into using Curl to talk to a script which talks to a database. This way you don’t run into reserved word issues. Using Curl is supported in Asterisk 1.6.X. Also see the script ‘dbsep.cgi’ under contrib/scripts in the Asterisk source.

CURL?

I write API’s all the time and that would be absolutely ideal. However, how do you specify this in extconfig.conf for Realtime?

Not looking for Realtime extensions (yet) or using switch or anything like that in a dialplan.

I need to hook up to databases for queue logging, cdr, queues, etc.

To use Curl you would specify it as the driver like so in extconfig.conf:

Make sure to install the correct dependencies and use the menuselect to include res_curl.

In Asterisk 1.6.X you can also store the queue_log in a DB. Just use a 1.6 version and you should be able to do everything you want.