[asterisk-users] Retrieving sound files from DB as opposed to filesystem

Tzafrir Cohen tzafrir.cohen at xorcom.com
Tue May 3 04:19:55 CDT 2011


On Tue, May 03, 2011 at 01:09:14AM -0400, A E [Gmail] wrote:
> On Mon, May 2, 2011 at 9:45 PM, C F <shmaltz at gmail.com> wrote:
> 
> > Just from my experience with different DBs, stay away from BLOB data
> > types as much as possible.
> >
> > Hi CF,
> any particular reason why? I've had a good experience with it, in fact
> that's recommended by DB developers when it's a case of small files. They
> say only larger files greater than 500K-1MB should be stored on the
> filesystem using filestream or similar etc.
> 
> Although at this point, this might be a moot point, as so far no one's been
> able to suggest a way to be able to stream the content of the BLOB field to
> Asterisk over the AGI connection into the current channel, such that
> Asterisk can just play it on the fly. We'll have to just go with getting the
> file to the requesting * server and then play it

Short answer: Asterisk has support for playing local files. As for
performance: The file system already caches reading the file once it has
been read once, so you're likely to read it from memory. Especialy small
files and frequently-used files. If you want to play sounds from a DB,
you'll need to provide some infrastructure.

The sound file to be played is a file that should be read and consumed
(played by Asterisk into a channel) in a steady manner. You can't afford
any delays. That's not a typical constraint with e.g. web content
serving where you can easily wait a while to cache content.

-- 
               Tzafrir Cohen
icq#16849755              jabber:tzafrir.cohen at xorcom.com
+972-50-7952406           mailto:tzafrir.cohen at xorcom.com
http://www.xorcom.com  iax:guest at local.xorcom.com/tzafrir



More information about the asterisk-users mailing list