On Tuesday 23 Sep 2014, Steve Edwards wrote: > For some applications, storing recorded audio (prompts and caller > recordings) as a BLOB in MySQL has advantages. > > So, once I have the audio in the database, how can I play it? > > Creating temporary files seems so tacky. > > Is there another way to playback or background audio either by specifying > a URL or from a memory buffer (either C or PHP)?
Depending how many messages you have, you could use a named pipe (FIFO) or a Unix-domain socket for each one; and have the individual backend processes interrogate the database and dump the contents of the relevant field down it. As far as Asterisk is concerned, the socket / FIFO looks just like a file; it doesn't care much that the data in it is really coming from a process on the other end. This obviously suffers from the problem of decreasing manageability, the more message "files" you have. But personally, I'd just store the filenames in the database; and rely on the unix filesystem for storing the actual file contents. After all, that's what a filesystem is for. -- AJS Note: Originating address only accepts e-mail from list! If replying off- list, change address to asterisk1list at earthshod dot co dot uk . -- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
