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
c5202fcb
Commit
c5202fcb
authored
Feb 04, 2009
by
alexandresavard
Browse files
Terminate only one call
parent
453d14fa
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/sipvoiplink.cpp
View file @
c5202fcb
...
...
@@ -229,6 +229,23 @@ SIPVoIPLink::terminateSIPCall()
_callMap
.
clear
();
}
void
SIPVoIPLink
::
terminateOneCall
(
const
CallID
&
id
)
{
_debug
(
"SIPVoIPLink::terminateOneCall(): function called
\n
"
);
SIPCall
*
call
;
call
=
getSIPCall
(
id
);
if
(
call
)
{
// terminate the sip call
_debug
(
"SIPVoIPLink::terminateOneCall()::the call is deleted, should close recording file
\n
"
);
delete
call
;
call
=
0
;
}
}
void
SIPVoIPLink
::
getEvent
()
{
...
...
@@ -383,7 +400,7 @@ SIPVoIPLink::sendUnregister( AccountID id )
return
true
;
}
Call
*
Call
*
SIPVoIPLink
::
newOutgoingCall
(
const
CallID
&
id
,
const
std
::
string
&
toUrl
)
{
Account
*
account
;
...
...
@@ -453,6 +470,7 @@ SIPVoIPLink::answer(const CallID& id)
_debug
(
"! SIP Failure: Unable to start sound when answering %s/%d
\n
"
,
__FILE__
,
__LINE__
);
}
}
terminateOneCall
(
call
->
getCallId
());
removeCall
(
call
->
getCallId
());
return
false
;
}
...
...
@@ -489,8 +507,7 @@ SIPVoIPLink::hangup(const CallID& id)
_audiortp
->
closeRtpSession
();
}
terminateSIPCall
();
terminateOneCall
(
id
);
removeCall
(
id
);
return
true
;
...
...
@@ -504,6 +521,7 @@ SIPVoIPLink::cancel(const CallID& id)
_debug
(
"- SIP Action: Cancel call %s [cid: %3d]
\n
"
,
id
.
data
(),
call
->
getCid
());
terminateOneCall
(
id
);
removeCall
(
id
);
return
true
;
...
...
@@ -716,7 +734,7 @@ SIPVoIPLink::refuse (const CallID& id)
call
->
getInvSession
()
->
mod_data
[
getModId
()]
=
NULL
;
terminate
SIP
Call
();
terminate
One
Call
(
id
);
return
true
;
}
...
...
@@ -941,6 +959,7 @@ SIPVoIPLink::SIPCallServerFailure(SIPCall *call)
_debug
(
"Server error!
\n
"
);
CallID
id
=
call
->
getCallId
();
Manager
::
instance
().
callFailure
(
id
);
terminateOneCall
(
id
);
removeCall
(
id
);
}
//break;
...
...
@@ -965,7 +984,7 @@ SIPVoIPLink::SIPCallClosed(SIPCall *call)
}
_debug
(
"After close RTP
\n
"
);
Manager
::
instance
().
peerHungupCall
(
id
);
terminate
SIP
Call
();
terminate
One
Call
(
id
);
removeCall
(
id
);
_debug
(
"After remove call ID
\n
"
);
}
...
...
@@ -982,6 +1001,7 @@ SIPVoIPLink::SIPCallReleased(SIPCall *call)
_debug
(
"SIP call release
\n
"
);
CallID
id
=
call
->
getCallId
();
Manager
::
instance
().
callFailure
(
id
);
terminateOneCall
(
id
);
removeCall
(
id
);
}
...
...
src/sipvoiplink.h
View file @
c5202fcb
...
...
@@ -191,6 +191,11 @@ class SIPVoIPLink : public VoIPLink
* Terminate every call not hangup | brutal | Protected by mutex
*/
void
terminateSIPCall
();
/**
* Terminate only one call
*/
void
terminateOneCall
(
const
CallID
&
id
);
/**
* Build a sip address with the number that you want to call
...
...
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