Hello list,
Hope you are all doing fine!

While playing around with the MixMonitor, I've found out that it is
possible to start the MixMonitor multiple times to the same output file.
It is very easy to reproduce, via the CLI or via the dialplan. If the
MixMonitor is called twice from the same channel, to the same output file
and with option append. After that, with the "mixmonitor list" command we
can see two running instances, and also from Linux open files "lsof" we can
see two Asterisk process with the same file opened. Nevertheless, in this
case the file does not gets corrupted and the recording is completely fine.
However after observing such behavior I decided to call MixMonitor twice to
the same file but from different channels. The observed behavior is that
the output file has the contents of the first call until the second
MixMonitor command is called for the second call. After that only the
second call is recorded. If this is stopped, the first call is recorded
again.
I know we can consider an application/dialplan error to call MixMonitor
twice for the same output file like this, but I am just curious to know if
this situation is actually being handled by the Asterisk/MixMonitor code or
if it is completely undefined behavior, since the behavior I described  is
actually consistent.
Anyway, to avoid confusion and weird behavior, I think it would be probably
better if Asterisk just not allow creating a MixMonitor thread to a file
that is already opened by some other MixMonitor thread. Or is there any
reason/situation in which this is not desired?

Kind regards,
Cheers,
Patrick Wakano
-- 
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
      https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to