Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
savoirfairelinux
jami-daemon
Commits
35bbb8e5
Commit
35bbb8e5
authored
Aug 22, 2013
by
Tristan Matthews
Browse files
* #29004: dtmf over rtp: send 3 identical end packets
parent
46bd71b9
Changes
1
Hide whitespace changes
Inline
Side-by-side
daemon/src/audio/audiortp/audio_rtp_session.cpp
View file @
35bbb8e5
...
...
@@ -129,7 +129,11 @@ void AudioRtpSession::sendDtmfEvent()
if
(
dtmf
.
newevent
)
queue_
.
setMark
(
true
);
queue_
.
sendImmediate
(
timestamp_
,
(
const
unsigned
char
*
)(
&
(
dtmf
.
payload
)),
sizeof
(
ost
::
RTPPacket
::
RFC2833Payload
));
// 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
if
(
dtmf
.
newevent
)
{
...
...
@@ -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
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment