[HELP] Record to WAV File Playback before Finished Recording

Hello, I am using Asterisk 1.2.2 on fedora linux to create an audio broadcasting system. I have direct “live” broadcasting working but would like to be able to queue up broadcasters so they come out one after another.

If A is broadcasting live and B comes in to broadcast they are told they are recording (not live) and a beep tells them to begin. At this point I am using the Record application to save the file to disk, which I could send over the live line after B is finished recording… however I would like to be able to begin broadcasting as soon as A finishes their broadcast.

Is it possible to read from the beginning of a wav file with one program while asterisk is still writing to the end of it? Thank you for your help.

I’m not sure it’s possible cause the file is locked by Asterisk, so any other process will fail in reading it.

I can see other interesting applications for this functionality…

How tough would it be for asterisk coders to create a buffer data structure (FIFO queue of samples?) that audio sources can push data into and multiple processes or apps can copy out of? Audio samples can just keep feeding into this thing, and oldest samples fall off the end whether or not anything is connected on the back end to listen. Makes the process of writing files a little more complex, but provides a tee point to meet the needs of the application in this thread and others.

heres another example application for emergency call centers (public safety answering points) in north america. They have a long-term logging recorder and a real-time recorder, where they have to be able to play back segments of a call while the call is still in progress and recording.

^ Yah, what he said :smiley: