Re: [asterisk-users] Playback/background audio from MySQL BLOB
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
Re: [asterisk-users] Playback/background audio from MySQL BLOB
Hello, Le 23/09/2014 23:38, Steve Edwards a écrit : 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. We solved this problem by storing the voicemail with IMAP. It is possible to access IMAP simultaneously from different locations, and a lot of implementations offer the ability to integrate IMAP into web-applications. That's how we did it anyway. Best regards. signature.asc Description: OpenPGP digital signature -- _ -- 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
Re: [asterisk-users] Playback/background audio from MySQL BLOB
On 24/9/14 10:36 am, A J Stiles wrote: 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. This. Shocking as it might appear, filesystems are remarkably good at storing files. They were designed to do it. Why try to shoehorn a database into doing something it wasn't designed to do (and isn't particularly good at doing)? Kind regards, Chris -- This email is made from 100% recycled electrons -- _ -- 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
Re: [asterisk-users] Playback/background audio from MySQL BLOB
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 -- _ -- 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
[asterisk-users] Playback/background audio from MySQL BLOB
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)? -- Thanks in advance, - Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST Newline Fax: +1-760-731-3000 -- _ -- 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
Re: [asterisk-users] Playback/background audio from MySQL BLOB
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. 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)? How about a named pipe (fifo)? Of course then you might have issues with simultaneous calls. You would have to have a pool of them and somehow manage locking them... j -- _ -- 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
Re: [asterisk-users] Playback/background audio from MySQL BLOB
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. Jeff sez: How about a named pipe (fifo)? Of course then you might have issues with simultaneous calls. You would have to have a pool of them and somehow manage locking them... J 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? --Don -- _ -- 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
Re: [asterisk-users] Playback/background audio from MySQL BLOB
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. -- Thanks in advance, - Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST Newline Fax: +1-760-731-3000 -- _ -- 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
Re: [asterisk-users] Playback/background audio from MySQL BLOB
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. 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. -- _ -- 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
Re: [asterisk-users] Playback/background audio from MySQL BLOB
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. --Don -- _ -- 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