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
9c395522
Commit
9c395522
authored
Feb 03, 2009
by
alexandresavard
Browse files
Function terminateSIPCall added in sipvoiplink and managerimpl
parent
347e4330
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/audio/audiortp.cpp
View file @
9c395522
...
...
@@ -142,7 +142,7 @@ AudioRtpRTX::~AudioRtpRTX () {
_debugException
(
"! ARTP: Thread destructor didn't terminate correctly"
);
throw
;
}
_debug
(
"terminate audiortprtx ended...
\n
"
);
_debug
(
"
AudioRtpRTX::~AudioRtpRTX() ::
terminate audiortprtx ended...
\n
"
);
_ca
=
0
;
if
(
!
_sym
)
{
delete
_sessionRecv
;
_sessionRecv
=
NULL
;
...
...
@@ -161,8 +161,6 @@ AudioRtpRTX::~AudioRtpRTX () {
delete
time
;
time
=
NULL
;
delete
converter
;
converter
=
NULL
;
_debug
(
"AudioRtpRTX::~AudioRtpRTX () : Deleting the call instance
\n
"
);
}
...
...
src/managerimpl.cpp
View file @
9c395522
...
...
@@ -249,6 +249,7 @@ ManagerImpl::answerCall(const CallID& id)
bool
ManagerImpl
::
hangupCall
(
const
CallID
&
id
)
{
_debug
(
"ManagerImpl::hangupCall(): This function is called when user hangup
\n
"
);
PulseLayer
*
pulselayer
;
AccountID
accountid
;
bool
returnValue
;
...
...
@@ -370,6 +371,7 @@ ManagerImpl::transferCall(const CallID& id, const std::string& to)
bool
ManagerImpl
::
refuseCall
(
const
CallID
&
id
)
{
_debug
(
"ManagerImpl::refuseCall(): method called"
);
stopTone
(
true
);
AccountID
accountid
=
getAccountFromCall
(
id
);
if
(
accountid
==
AccountNULL
)
{
...
...
@@ -631,8 +633,10 @@ ManagerImpl::peerRingingCall(const CallID& id)
void
ManagerImpl
::
peerHungupCall
(
const
CallID
&
id
)
{
_debug
(
"ManagerImpl::peerHungupCall():this function is called when peer hangup
\n
"
);
PulseLayer
*
pulselayer
;
AccountID
accountid
;
bool
returnValue
;
accountid
=
getAccountFromCall
(
id
);
if
(
accountid
==
AccountNULL
)
{
...
...
@@ -648,6 +652,8 @@ ManagerImpl::peerHungupCall(const CallID& id)
switchCall
(
""
);
}
returnValue
=
getAccountLink
(
accountid
)
->
hangup
(
id
);
removeWaitingCall
(
id
);
removeCallAccount
(
id
);
...
...
src/sipvoiplink.cpp
View file @
9c395522
...
...
@@ -149,6 +149,8 @@ SIPVoIPLink* SIPVoIPLink::_instance = NULL;
,
_useStun
(
false
)
,
_clients
(
0
)
{
_debug
(
"SIPVoIPLink::~SIPVoIPLink(): sipvoiplink constructor called
\n
"
);
// to get random number for RANDOM_PORT
srand
(
time
(
NULL
));
...
...
@@ -161,6 +163,7 @@ SIPVoIPLink* SIPVoIPLink::_instance = NULL;
SIPVoIPLink
::~
SIPVoIPLink
()
{
_debug
(
"SIPVoIPLink::~SIPVoIPLink(): sipvoiplink destructor called
\n
"
);
terminate
();
}
...
...
@@ -210,7 +213,7 @@ SIPVoIPLink::terminate()
void
SIPVoIPLink
::
terminateSIPCall
()
{
_debug
(
"SIPVoIPLink::terminateSIPCall(): function called"
);
_debug
(
"SIPVoIPLink::terminateSIPCall(): function called
\n
"
);
ost
::
MutexLock
m
(
_callMapMutex
);
CallMap
::
iterator
iter
=
_callMap
.
begin
();
SIPCall
*
call
;
...
...
@@ -218,7 +221,7 @@ SIPVoIPLink::terminateSIPCall()
call
=
dynamic_cast
<
SIPCall
*>
(
iter
->
second
);
if
(
call
)
{
// terminate the sip call
_debug
(
"SIPV
O
IP::the call is deleted, should close recording file
\n
"
);
_debug
(
"SIPV
o
IP
Link::terminateSIPCall()
::the call is deleted, should close recording file
\n
"
);
delete
call
;
call
=
0
;
}
iter
++
;
...
...
@@ -485,6 +488,8 @@ SIPVoIPLink::hangup(const CallID& id)
_debug
(
"* SIP Info: Stopping AudioRTP for hangup
\n
"
);
_audiortp
->
closeRtpSession
();
}
terminateSIPCall
();
removeCall
(
id
);
...
...
@@ -686,7 +691,7 @@ SIPVoIPLink::refuse (const CallID& id)
pj_status_t
status
;
pjsip_tx_data
*
tdata
;
_debug
(
"SIPVoIPLink::refuse() : teh call is refused
\n
"
);
call
=
getSIPCall
(
id
);
if
(
call
==
0
)
{
...
...
@@ -710,6 +715,8 @@ SIPVoIPLink::refuse (const CallID& id)
return
false
;
call
->
getInvSession
()
->
mod_data
[
getModId
()]
=
NULL
;
terminateSIPCall
();
return
true
;
}
...
...
@@ -929,6 +936,8 @@ SIPVoIPLink::SIPCallServerFailure(SIPCall *call)
void
SIPVoIPLink
::
SIPCallClosed
(
SIPCall
*
call
)
{
_debug
(
"SIPVoIPLink::SIPCallClosed():: function called when peer hangup"
);
// it was without did before
//SIPCall* call = findSIPCallWithCid(event->cid);
if
(
!
call
)
{
return
;
}
...
...
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