[asterisk-users] Save directly to database , and play directly from database

Steve Edwards asterisk.org at sedwards.com
Fri Aug 21 12:10:02 CDT 2009


> On Fri, Aug 21, 2009 at 9:26 PM, Steve Edwards
>
>> If you told Asterisk to record to a file on a RAM disk and then 
>> inserted the file's data in the database, you could achieve your goal 
>> without a major performance hit.
>>
>> Inelegant, but functional.

On Fri, 21 Aug 2009, ABBAS SHAKEEL wrote:

> Ahan Steve how can i achieve this ?

Of the top of my head...

Write an AGI - record-to-database:

1) Use the "record file" AGI command, specifying a path to the RAM disk 
and a unique filename (process id?).

2) Open the file.

3) Read the contents.

4) Close the file.

5) Write the contents to the database.

6) Delete the recorded file.

Write another AGI - playback-from-database:

1) Create a unique file on the RAM disk.

2) Read the contents from the database.

3) Write the contents to the file.

4) Close the file.

5) Play the file using "stream file" AGI command.

Or, write me a check and tell your boss it's take care of :)

-- 
Thanks in advance,
-------------------------------------------------------------------------
Steve Edwards       sedwards at sedwards.com      Voice: +1-760-468-3867 PST
Newline                                              Fax: +1-760-731-3000



More information about the asterisk-users mailing list