[Asterisk-Dev] storage binary data through RealTime interface

Nathan C. Smith smith at ipmvs.com
Tue Aug 2 06:53:31 MST 2005


It is usually considered inefficient to store blob data in the database, but
there are ways it can be done.  You pay a penalty both when you insert it
and extract it.  Are you committed to doing it that way?  

-Nate

-----Original Message-----
From: Timur V. Elzhov [mailto:Timur.Elzhov at jinr.ru] 
Sent: Tuesday, August 02, 2005 8:36 AM
To: asterisk-dev at lists.digium.com
Subject: [Asterisk-Dev] storage binary data through RealTime interface



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

_______________________________________________
Asterisk-Dev mailing list
Asterisk-Dev at lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-dev
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev



More information about the asterisk-dev mailing list