Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-daemon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-daemon
Commits
cac91e03
Commit
cac91e03
authored
10 years ago
by
Adrien Béraud
Committed by
Guillaume Roguez
10 years ago
Browse files
Options
Downloads
Patches
Plain Diff
sipcall: stop rtp when call is closed
Refs #63196 Change-Id: Id21496098bd2f446500efa3d7cb8bc3d72a10dcc
parent
4ef5e293
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
daemon/src/sip/sipcall.cpp
+21
-21
21 additions, 21 deletions
daemon/src/sip/sipcall.cpp
daemon/src/sip/sipcall.h
+1
-1
1 addition, 1 deletion
daemon/src/sip/sipcall.h
with
22 additions
and
22 deletions
daemon/src/sip/sipcall.cpp
+
21
−
21
View file @
cac91e03
...
...
@@ -148,21 +148,6 @@ SIPCall::~SIPCall()
}
}
void
SIPCall
::
stopRtpIfCurrent
()
{
if
(
Manager
::
instance
().
isCurrentCall
(
*
this
))
{
#if USE_CCRTP
audiortp_
.
stop
();
#else
avformatrtp_
->
stop
();
#endif
#ifdef RING_VIDEO
videortp_
.
stop
();
#endif
}
}
SIPAccountBase
&
SIPCall
::
getSIPAccount
()
const
{
...
...
@@ -337,6 +322,9 @@ void SIPCall::answer()
void
SIPCall
::
hangup
(
int
reason
)
{
// Stop all RTP streams
stopAllMedias
();
if
(
not
inv
or
not
inv
->
dlg
)
throw
VoipLinkException
(
"No invite session for this call"
);
...
...
@@ -372,6 +360,7 @@ SIPCall::hangup(int reason)
sip_utils
::
addContactHeader
(
&
contactStr
,
tdata
);
if
(
pjsip_inv_send_msg
(
inv
.
get
(),
tdata
)
!=
PJ_SUCCESS
)
{
RING_ERR
(
"Error sending hangup message"
);
inv
.
reset
();
return
;
}
...
...
@@ -379,9 +368,6 @@ SIPCall::hangup(int reason)
// Make sure user data is NULL in callbacks
inv
->
mod_data
[
getSIPVoIPLink
()
->
getModId
()]
=
NULL
;
// Stop all RTP streams
stopRtpIfCurrent
();
removeCall
();
}
...
...
@@ -706,6 +692,9 @@ SIPCall::internalOffHold(const std::function<void()> &SDPUpdateFunc)
void
SIPCall
::
peerHungup
()
{
// Stop all RTP streams
stopAllMedias
();
if
(
not
inv
)
throw
VoipLinkException
(
"No invite session for this call"
);
...
...
@@ -722,9 +711,6 @@ SIPCall::peerHungup()
inv
.
reset
();
sip_utils
::
sip_strerror
(
ret
);
}
// Stop all RTP streams
stopRtpIfCurrent
();
}
void
...
...
@@ -967,3 +953,17 @@ SIPCall::startAllMedia()
RING_ERR
(
"%s"
,
rtpException
.
what
());
}
}
void
SIPCall
::
stopAllMedias
()
{
RING_DBG
(
"SIPCall %s: stopping all medias"
,
getCallId
().
c_str
());
#if USE_CCRTP
audiortp_
.
stop
();
#else
avformatrtp_
->
stop
();
#endif
#ifdef RING_VIDEO
videortp_
.
stop
();
#endif
}
This diff is collapsed.
Click to expand it.
daemon/src/sip/sipcall.h
+
1
−
1
View file @
cac91e03
...
...
@@ -198,7 +198,7 @@ class SIPCall : public Call
std
::
map
<
std
::
string
,
std
::
string
>
createHistoryEntry
()
const
;
void
stop
RtpIfCurrent
();
void
stop
AllMedias
();
/**
* Transfer method used for both type of transfer
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment