[asterisk-bugs] [JIRA] (ASTERISK-24573) Out of sync conversation recording when divided in multiple recordings

Matt Jordan (JIRA) noreply at issues.asterisk.org
Tue Dec 2 13:55:29 CST 2014


    [ https://issues.asterisk.org/jira/browse/ASTERISK-24573?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=223803#comment-223803 ] 

Matt Jordan commented on ASTERISK-24573:
----------------------------------------

Two points:

# 1.8 is no longer supported for bug fixes. For this patch to be considered, it will need to be written against Asterisk 11. Since the channel API was opaquified, that will require some minor tweaks to the patch.
# I don't think the issue described here adequately describes the need for the patch. Can you explain why this fixed the issue?

Specifically, I'm concerned about the impact of this patch on the normal frame writing that occurs in {{channel.c}}. Setting both to {{0}} would ensure that no jump occurs when attempting to perform a seek in the stream, and I'm not sure if that's a good thing or a bad thing.

{code}
#ifndef MONITOR_CONSTANT_DELAY
				int jump = ast_channel_insmpl(chan) - ast_channel_outsmpl(chan) - 4 * cur->samples;
				if (jump >= 0) {
					jump = calc_monitor_jump((ast_channel_insmpl(chan) - ast_channel_outsmpl(chan)), ast_format_rate(&f->subclass.format), ast_format_rate(&ast_channel_monitor(chan)->read_stream->fmt->format));
					if (ast_seekstream(ast_channel_monitor(chan)->write_stream, jump, SEEK_FORCECUR) == -1) {
						ast_log(LOG_WARNING, "Failed to perform seek in monitoring write stream, synchronization between the files may be broken\n");
					}
					ast_channel_outsmpl_set(chan, ast_channel_outsmpl(chan) + (ast_channel_insmpl(chan) - ast_channel_outsmpl(chan)) + cur->samples);
				} else {
					ast_channel_outsmpl_set(chan, ast_channel_outsmpl(chan) + cur->samples);
				}
#else
				int jump = calc_monitor_jump((ast_channel_insmpl(chan) - ast_channel_outsmpl(chan)), ast_format_rate(f->subclass.codec), ast_format_rate(ast_channel_monitor(chan)->read_stream->fmt->format));
				if (jump - MONITOR_DELAY >= 0) {
					if (ast_seekstream(ast_channel_monitor(chan)->write_stream, jump - cur->samples, SEEK_FORCECUR) == -1) {
						ast_log(LOG_WARNING, "Failed to perform seek in monitoring write stream, synchronization between the files may be broken\n");
					}
					ast_channel_outsmpl_set(chan, ast_channel_outsmpl(chan) + ast_channel_insmpl(chan) - ast_channel_outsmpl(chan));
				} else {
					ast_channel_outsmpl_set(chan, ast_channel_outsmpl(chan) + cur->samples);
				}
#endif
{code}

> Out of sync conversation recording when divided in multiple recordings
> ----------------------------------------------------------------------
>
>                 Key: ASTERISK-24573
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-24573
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Resources/res_monitor
>    Affects Versions: 1.8.32.1
>            Reporter: Nuno Borges
>            Severity: Minor
>         Attachments: 24573.patch
>
>
> In order to avoid big recording files we have decided to segment the recording in bulks of 5 minutes, issuing a stop and a start recording via AMI. We started to notice that some of the segments get the voice out of sync, when at the time of the recording the voice streaming was correct.



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list