Merge "RTP: need to reset DTMF last seqno/timestamp on voice packet with marker bit" into 16

This commit is contained in:
Joshua Colp 2018-11-26 13:47:10 -06:00 committed by Gerrit Code Review
commit 450ca98220
1 changed files with 10 additions and 0 deletions

View File

@ -6445,6 +6445,16 @@ static struct ast_frame *ast_rtp_interpret(struct ast_rtp_instance *instance, st
switch (ast_format_get_type(rtp->f.subclass.format)) {
case AST_MEDIA_TYPE_AUDIO:
rtp->f.frametype = AST_FRAME_VOICE;
/* The marker bit set on the voice packet indicates the start
* of a new stream and a new time stamp. Need to reset the DTMF
* last sequence number and the timestamp of the last END packet.
*/
if (mark) {
rtp->last_seqno = 0;
rtp->last_end_timestamp = 0;
}
break;
case AST_MEDIA_TYPE_VIDEO:
rtp->f.frametype = AST_FRAME_VIDEO;