[asterisk-users] How to record and playback at the same time

Jim Dickenson dickenson at cfmc.com
Thu Jul 29 09:51:10 CDT 2010


Depending on what you are recording there might be two files, one for each leg of a call, until the call ends and the files are mixed.
-- 
Jim Dickenson
mailto:dickenson at cfmc.com

CfMC
http://www.cfmc.com/



On Jul 29, 2010, at 7:46 AM, Motiejus Jakštys wrote:

> On Thu, Jul 29, 2010 at 2:32 PM, Benny Amorsen <benny+usenet at amorsen.dk> wrote:
>> Sherwood McGowan <sherwood.mcgowan at gmail.com> writes:
>> 
>>> I'm going to go ahead and say that while I'm not one of the
>>> developers, I think it's safe to say that you cannot record to a file
>>> and play it back at the same time. Probably something like file
>>> locking (for the record, locks it from access by other processes,
>>> etc)...
>> 
>> There is nothing in Unix/Linux which prevents the playback of a file
>> while it is being recorded. File locks in Linux are purely advisory; it
>> is up to the applications whether they choose to respect them.
>> 
>> The only challenge is whether the header has been written correctly, and
>> you should be able to do without that in a pinch. What happens if you
>> copy the half-written file to a computer with speakers and try to play
>> it through the speakers?
>> 
> 
> Even (incorrect) headers are not a problem if you know the exact file format.
> apt-get/yum/pacman/emerge/whatever install/-S/whatever sox
> man (sox|play)
> Quick grep through sox source did not yield any fcntl functions, IMHO
> sox should ignore any "locked" files and you should be able to play
> them without problems.
> 
> Motiejus
> 
> -- 
> _____________________________________________________________________
> -- 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