[asterisk-users] Record() Cmd and My SQL

Govind, Mahesh (NSN - IN/Bangalore) mahesh.govind at nsn.com
Sun Sep 26 21:49:36 CDT 2010


Sorry . Week end I was away . 

Another reason for storing in the database is to , enable some other
apps to access the recording at some point of time .

Regards
Mahesh


-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of ext Don
Kelly
Sent: Friday, September 24, 2010 11:49 PM
To: 'Asterisk Users Mailing List - Non-Commercial Discussion'
Subject: Re: [asterisk-users] Record() Cmd and My SQL

I hadn't considered writing to the db real-time; was actually planning
on
recording locally and moving it to the db.

Thanks for the suggestions.

  --Don


-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of David
Backeberg
Sent: Friday, September 24, 2010 12:56 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Record() Cmd and My SQL

On Fri, Sep 24, 2010 at 1:32 PM, Don Kelly <dk at donkelly.biz> wrote:
> Don sez: I don't know how to make Outlook indent. I usually top-post,
but
I
> don't like getting yelled at.
>
> Why do you say "Don't do that"? Is there a real reason that it would
be
bad?

Performance is a real reason. Multiple simultaneous write streams into
a database sounds like a disaster. While trying to read from the db
and use it to listen to recordings sounds like a bigger disaster.

/path/to/the/recording

is a short varchar string

the actual recording is a massive, usually multi-megabyte, potentially
multi-gigabyte blob.
http://en.wikipedia.org/wiki/Blob_(computing)

If you're not actually taking advantage of the recording being in the
database, doing computing that is easier because of the database, such
as nearest neighbor searches, indexing, and the like, you're just
slowing down your ability to store and retrieve recordings.

> I'd like to put the recordings in a database so they are available to
> another application that has no other relationship to the Asterisk
server.

Sounds like a filesystem. I can store my pdf file with my web browser,
and read it on another computer after I store it to my shared
filesystem.

> The application uses the database to determine if the recording has
been
> listened to, by whom and if it needs additional attention.

Database can maintain metadata (as can a filesystem, owner, creation
date, access date), but you could still just store a pointer to the
actual file in the db. If you were paranoid about the filesystem and
db getting out of step you could do referential integrity checks in
the application.

If you want to do something wholesale to all the recordings, like
carve off the first five seconds, it's quite straightforward with a
batched sox call against the filesystem. If you want to do that in a
db, it's a select, write output to a file, convert the file, and
replace on the value to store it back into the db.

-- 
_____________________________________________________________________


-- 
_____________________________________________________________________
-- 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



More information about the asterisk-users mailing list