[Asterisk-Dev] storage binary data through RealTime interface

Timur V. Elzhov Timur.Elzhov at jinr.ru
Tue Aug 2 06:35:32 MST 2005


Dear experts,

I'd like to implement voicemail storage to DB through RealTime
interface. I succeded to store all the information *about* incoming
voice message, but I've been stuck with storage of voice message
(blob data) itself. I had a glance at the ODBC and MySQL driver
codes and found that with SQL tamplate which is hardcoded in drivers
(say, in res_config_mysql.c),

"SELECT * FROM %s WHERE %s%s '%s'", table, newparam, op, newval

It seems to be not possible for one to build the correct SQL query
with this template, because the problem would take place with reading
of '\0' symbol, apart from wrong query if bytes with ASCII code "\'"
will be included in the value.

So, how the database binary (in/out)put is planned to be supported
in RealTime?


-- 
Best regards,
Timur Elzhov




More information about the asterisk-dev mailing list