Browse Source

MT#55283 fix DTMF end event sequencing

Make sure we increase the output RTP sequence
number for each generated packet in the case
of packets that need to be duplicated or sent
repeatedly (DTMF end event)

Change-Id: Ia16ffefc0791d01575248ac5d8025eb30ccaec67
pull/1819/head
Richard Fuchs 2 years ago
parent
commit
41a9894cce
2 changed files with 5 additions and 3 deletions
  1. +2
    -0
      daemon/codec.c
  2. +3
    -3
      t/auto-daemon-tests.pl

+ 2
- 0
daemon/codec.c View File

@ -2295,10 +2295,12 @@ static tc_code packet_dtmf(struct codec_ssrc_handler *ch, struct codec_ssrc_hand
ret = TCC_CONSUMED; ret = TCC_CONSUMED;
else else
ret = packet_dtmf_fwd(ch, input_ch, dup, mp); ret = packet_dtmf_fwd(ch, input_ch, dup, mp);
mp->ssrc_out->parent->seq_diff++;
if (ret != TCC_CONSUMED) if (ret != TCC_CONSUMED)
__transcode_packet_free(dup); __transcode_packet_free(dup);
} }
mp->ssrc_out->parent->seq_diff--;
// discard the received event // discard the received event
do_blocking = true; do_blocking = true;


+ 3
- 3
t/auto-daemon-tests.pl View File

@ -1807,12 +1807,12 @@ snd($sock_a, $port_b, rtp(101, 1028, 6040, 0x1234, "\x03\xa6\x03\xc0"));
rcv_no($sock_b); rcv_no($sock_b);
# send audio, receive end event # send audio, receive end event
snd($sock_a, $port_b, rtp(8, 1029, 7000, 0x1234, "\x00" x 160)); snd($sock_a, $port_b, rtp(8, 1029, 7000, 0x1234, "\x00" x 160));
rcv($sock_b, $port_a, rtpm(101, 1029, 6200, 0x1234, "\x01\x8c\x03\xc0"));
rcv($sock_b, $port_a, rtpm(101, 1030, 6200, 0x1234, "\x01\x8c\x03\xc0"));
rcv($sock_b, $port_a, rtpm(101, 1031, 6200, 0x1234, "\x01\x8c\x03\xc0")); rcv($sock_b, $port_a, rtpm(101, 1031, 6200, 0x1234, "\x01\x8c\x03\xc0"));
rcv($sock_b, $port_a, rtpm(101, 1032, 6200, 0x1234, "\x01\x8c\x03\xc0"));
rcv($sock_b, $port_a, rtpm(101, 1033, 6200, 0x1234, "\x01\x8c\x03\xc0"));
snd($sock_a, $port_b, rtp(8, 1030, 7160, 0x1234, "\x00" x 160)); snd($sock_a, $port_b, rtp(8, 1030, 7160, 0x1234, "\x00" x 160));
rcv($sock_b, $port_a, rtpm(8, 1034, 7160, 0x1234, "\x00" x 160));
rcv($sock_b, $port_a, rtpm(8, 1032, 7160, 0x1234, "\x00" x 160));


Loading…
Cancel
Save