Retrieving/Streaming audio/video files from DB using over AGI

Home » Asterisk Users » Retrieving/Streaming audio/video files from DB using over AGI
Asterisk Users 1 Comment

On Mon, May 2, 2011 at 3:15 AM, A E [Gmail] wrote:

> Hello All,
> Probably a silly question, but we’re wondering if people have had any
> experience and have data to demonstrate if the performance of the Asterisk
> system might suffer in terms of latency etc. if we’re to have it retrieve
> sound files from a database using odbc as opposed to storing them locally on
> the filesystem. Note, these are not prompts…these are sound files that are
> being created through a web-app and being stored in the DB as BLOB or
> similar datatype that’s good/efficient to store audio/video files in a DB.
> We need these be made available through the asterisk system to play over the
> phone. Although the DB uses a SAN, the Asterisk System has no connectivity
> to the SAN but is connected on the same physical ethernet switch with a
> multi-Gbps backplane.
> The way the system is being designed, it’s possible for us to end up with
> 000s of these sound files stored in the DB, not to mention several asterisk
> systems in a pool/cluster/farm requesting these files, so using the local
> filesystem might not be scalable or efficient.
> Any advice/comments/suggestions welcome 🙂
> Just realised that this can better be described another way:

What we’re essentially trying to do is be able to do any one of these

a) stream an audio/video file stored in the DB via AGI into the current
channel so that it plays on the phone


b) Do something like what Realtime Voicemail does, where it gets the file
from the DB, saves as a temp file in the user mailbox directory and then
plays it to the caller but this needs to happen through AGI, something along
the lines of readsql (a la func_odbc) inside of AGI


c) Anything else that’s better than a) and b) above that someone can

P.S> I do know about the AGI AddOn of PUT SOUNDFILE and GET SOUNDFILE which
seems to be the only solution we can think of right now, other than of
course having the DB machine exporting the SAN volume as an NFS share for
the Asterisk server to mount, but that sounds like it’ll be bad for

Thanks again

One thought on - Retrieving/Streaming audio/video files from DB using over AGI