[asterisk-dev] res_monitor information

Paulo Garcia paulo.astdev at gmail.com
Tue Feb 16 13:07:39 CST 2010


Hi,

I'm analyzing the way the Monitor application works in Asterisk 1.4. At
first it seems very simple, however the code in channel.c (__ast_read
function around line 2390):

int jump = chan->outsmpl - chan->insmpl - 4 * f->samples;
if (jump >= 0) {
jump = chan->outsmpl - chan->insmpl;
if (ast_seekstream(chan->monitor->read_stream, jump, SEEK_FORCECUR) == -1)
ast_log(LOG_WARNING, "Failed to perform seek in monitoring read stream,
synchronization between the files may be broken\n");
chan->insmpl += jump + f->samples;
} else
chan->insmpl+= f->samples;

seems confusing to me. What is being done here?

Is it a way to keep the in and out files synchronized? If yes, how does it
work? Is it possible that one file can present chunks of silence (80ms long
for example) if this way of the call doesn't receive samples in the same
rate of the other?

Thanks in advance

Paulo Garcia
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-dev/attachments/20100216/30f0e0fb/attachment.htm 


More information about the asterisk-dev mailing list