[asterisk-users] Playback/background audio from MySQL BLOB

Jeff LaCoursiere jeff at jeff.net
Wed Sep 24 08:53:30 CDT 2014


On 09/23/2014 10:53 PM, Don Kelly wrote:
> On Tue, 23 Sep 2014, Steve Edwards wrote:
>
>>>   On 09/23/2014 02:17 PM, Steve Edwards wrote:
>>>>   For some applications, storing recorded audio (prompts and caller
>>>>   recordings) as a BLOB in MySQL has advantages.
>> On Tue, 23 Sep 2014, Don Kelly wrote:
>>
>>>   I'm curious about what the advantages are of storing audio in a blob.
>>>   Wouldn't it be more efficient to store it in a file and just put the
>>> filename in the database?
>> Multiple web servers, multiple Asterisk servers, multiple DB servers,
>> synchronizing filesystems vs db, etc.
>>
>> It appears to eliminate some problems, but Asterisk limiting audio
>> playback to files seems like a tough obstacle.
>
>
> Mike said:
> Maybe make the audio files available to all servers via a single NFS
> directory?  Probably not a good solution if the servers aren't co-located.
>
>
> Maybe someone could write a Linux device "file" that would return the blob's
> content as a file read.
>
>

I beat you to that one ;)  That is exactly what a named pipe (fifo) is.  
Asterisk would read it like a sound file, and the AGI would dump the 
BLOB to it on demand.  It would work, but you can't have more than one 
process at a time reading from it, so that's a further complication...

j



More information about the asterisk-users mailing list