VoIP Mailing List Archives
Mailing list archives for the VoIP community |
|
View previous topic :: View next topic |
Author |
Message |
asterisk.org at sedwar... Guest
|
Posted: Tue Sep 23, 2014 2:18 pm Post subject: [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 sedwards@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 |
|
Back to top |
|
|
jeff at jeff.net Guest
|
Posted: Tue Sep 23, 2014 2:34 pm Post subject: [asterisk-users] Playback/background audio from MySQL BLOB |
|
|
On 09/23/2014 02:17 PM, Steve Edwards wrote:
Quote: | 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 |
|
Back to top |
|
|
dk at donkelly.biz Guest
|
Posted: Tue Sep 23, 2014 3:06 pm Post subject: [asterisk-users] Playback/background audio from MySQL BLOB |
|
|
On 09/23/2014 02:17 PM, Steve Edwards wrote:
Quote: | 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 |
|
Back to top |
|
|
asterisk.org at sedwar... Guest
|
Posted: Tue Sep 23, 2014 4:39 pm Post subject: [asterisk-users] Playback/background audio from MySQL BLOB |
|
|
Quote: | On 09/23/2014 02:17 PM, Steve Edwards wrote:
|
Quote: | Quote: | 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:
Quote: | 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 sedwards@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 |
|
Back to top |
|
|
mike352 at microdel.org Guest
|
Posted: Tue Sep 23, 2014 10:05 pm Post subject: [asterisk-users] Playback/background audio from MySQL BLOB |
|
|
On Tue, 23 Sep 2014, Steve Edwards wrote:
Quote: | Quote: | On 09/23/2014 02:17 PM, Steve Edwards wrote:
|
Quote: | Quote: | 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:
Quote: | 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 |
|
Back to top |
|
|
dk at donkelly.biz Guest
|
Posted: Tue Sep 23, 2014 10:53 pm Post subject: [asterisk-users] Playback/background audio from MySQL BLOB |
|
|
On Tue, 23 Sep 2014, Steve Edwards wrote:
Quote: | Quote: | On 09/23/2014 02:17 PM, Steve Edwards wrote:
|
Quote: | Quote: | 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:
Quote: | 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 |
|
Back to top |
|
|
asterisk_list at earth... Guest
|
Posted: Wed Sep 24, 2014 4:36 am Post subject: [asterisk-users] Playback/background audio from MySQL BLOB |
|
|
On Tuesday 23 Sep 2014, Steve Edwards wrote:
Quote: | 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 |
|
Back to top |
|
|
asterisk at lists.mino... Guest
|
Posted: Wed Sep 24, 2014 5:06 am Post subject: [asterisk-users] Playback/background audio from MySQL BLOB |
|
|
On 24/9/14 10:36 am, A J Stiles wrote:
Quote: | 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 |
|
Back to top |
|
|
jeff at jeff.net Guest
|
Posted: Wed Sep 24, 2014 8:53 am Post subject: [asterisk-users] Playback/background audio from MySQL BLOB |
|
|
On 09/23/2014 10:53 PM, Don Kelly wrote:
Quote: | On Tue, 23 Sep 2014, Steve Edwards wrote:
Quote: | Quote: | On 09/23/2014 02:17 PM, Steve Edwards wrote:
Quote: | 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:
Quote: | 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 |
|
Back to top |
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|