Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
savoirfairelinux
jami-daemon
Commits
26f941ba
Commit
26f941ba
authored
Sep 03, 2009
by
Alexandre Savard
Browse files
[#2006] Deep refactoring, fix hangup bug
parent
df7e2be3
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
sflphone-common/src/managerimpl.cpp
View file @
26f941ba
This diff is collapsed.
Click to expand it.
sflphone-common/src/managerimpl.h
View file @
26f941ba
...
...
@@ -199,6 +199,8 @@ class ManagerImpl {
void
removeConference
(
const
CallID
&
conference_id
);
Conference
*
getConferenceFromCallID
(
const
CallID
&
call_id
);
void
holdConference
(
const
CallID
&
conferece_id
);
void
unHoldConference
(
const
CallID
&
conference_id
);
...
...
sflphone-common/src/sipvoiplink.cpp
View file @
26f941ba
...
...
@@ -710,6 +710,12 @@ SIPVoIPLink::hangup (const CallID& id)
return
false
;
}
// Release RTP thread
// if (Manager::instance().isCurrentCall (id)) {
_debug
(
"* SIP Info: Stopping AudioRTP for hangup %s
\n
"
,
call
->
getCallId
().
c_str
());
call
->
getAudioRtp
()
->
closeRtpSession
();
// }
// User hangup current call. Notify peer
_debug
(
"SIPVoIPLink::hangup Create inv session for call id: %s
\n
"
,
call
->
getCallId
().
c_str
());
status
=
pjsip_inv_end_session
(
call
->
getInvSession
(),
404
,
NULL
,
&
tdata
);
...
...
@@ -732,12 +738,6 @@ SIPVoIPLink::hangup (const CallID& id)
call
->
getInvSession
()
->
mod_data
[
getModId
()
]
=
NULL
;
// Release RTP thread
// if (Manager::instance().isCurrentCall (id)) {
_debug
(
"* SIP Info: Stopping AudioRTP for hangup %s
\n
"
,
call
->
getCallId
().
c_str
());
call
->
getAudioRtp
()
->
closeRtpSession
();
// }
terminateOneCall
(
id
);
_debug
(
"SIPVoIPLink::hangup removeCall
\n
"
);
...
...
@@ -754,6 +754,8 @@ SIPVoIPLink::peerHungup (const CallID& id)
pjsip_tx_data
*
tdata
=
NULL
;
SIPCall
*
call
;
_debug
(
"SIPVoIPLink::peerHungup
\n
"
);
call
=
getSIPCall
(
id
);
if
(
call
==
0
)
{
...
...
@@ -761,28 +763,35 @@ SIPVoIPLink::peerHungup (const CallID& id)
return
false
;
}
// Release RTP thread
// if (Manager::instance().isCurrentCall (id)) {
_debug
(
"* SIP Info: Stopping AudioRTP for hangup peerHungup
\n
"
);
call
->
getAudioRtp
()
->
closeRtpSession
();
// }
// User hangup current call. Notify peer
status
=
pjsip_inv_end_session
(
call
->
getInvSession
(),
404
,
NULL
,
&
tdata
);
if
(
status
!=
PJ_SUCCESS
)
if
(
status
!=
PJ_SUCCESS
){
_debug
(
" peerHungup: pjsip_inv_end_session %i
\n
"
,
status
);
return
false
;
}
if
(
tdata
==
NULL
)
return
true
;
if
(
tdata
==
NULL
){
_debug
(
" peerHungup: tdata=null
\n
"
);
return
true
;
}
status
=
pjsip_inv_send_msg
(
call
->
getInvSession
(),
tdata
);
if
(
status
!=
PJ_SUCCESS
)
if
(
status
!=
PJ_SUCCESS
){
_debug
(
" peerHungup: pjsip_inv_send_msg %i
\n
"
,
status
);
return
false
;
}
call
->
getInvSession
()
->
mod_data
[
getModId
()
]
=
NULL
;
// Release RTP thread
// if (Manager::instance().isCurrentCall (id)) {
_debug
(
"* SIP Info: Stopping AudioRTP for hangup
\n
"
);
call
->
getAudioRtp
()
->
closeRtpSession
();
// }
terminateOneCall
(
id
);
removeCall
(
id
);
...
...
@@ -1291,11 +1300,11 @@ SIPVoIPLink::SIPCallClosed (SIPCall *call)
CallID
id
=
call
->
getCallId
();
if
(
Manager
::
instance
().
isCurrentCall
(
id
))
{
call
->
setAudioStart
(
false
);
_debug
(
"* SIP Info: Stopping AudioRTP when closing
\n
"
);
call
->
getAudioRtp
()
->
closeRtpSession
();
}
//
if (Manager::instance().isCurrentCall (id)) {
//
call->setAudioStart (false);
//
_debug ("* SIP Info: Stopping AudioRTP when closing\n");
//
call->getAudioRtp()->closeRtpSession();
//
}
_debug
(
"After close RTP
\n
"
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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