Skip to content
Snippets Groups Projects
Commit 35bbb8e5 authored by Tristan Matthews's avatar Tristan Matthews
Browse files

* #29004: dtmf over rtp: send 3 identical end packets

parent 46bd71b9
Branches
Tags
No related merge requests found
......@@ -129,6 +129,10 @@ void AudioRtpSession::sendDtmfEvent()
if (dtmf.newevent)
queue_.setMark(true);
// Send end packet three times (without changing it). Sequence number is
// incremented automatically by ccrtp, which is the correct behaviour.
const unsigned repetitions = dtmf.payload.ebit ? 3 : 1;
for (unsigned i = 0; i < repetitions; ++i)
queue_.sendImmediate(timestamp_, (const unsigned char *)(& (dtmf.payload)), sizeof(ost::RTPPacket::RFC2833Payload));
// This is no longer a new event
......@@ -145,7 +149,7 @@ void AudioRtpSession::sendDtmfEvent()
dtmf.length -= increment;
dtmf.payload.duration++;
// next packet is going to be the last one
// next packet is going to be the end packet (transmitted 3 times)
if ((dtmf.length - increment) < increment)
dtmf.payload.ebit = true;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment