b/f: remove call timer timer if set on end of call

sayer/1.4-spce2.6
Stefan Sayer 16 years ago
parent 4079f32a23
commit 1d35fc7af0

@ -806,6 +806,7 @@ bool SBCDialog::onOtherReply(const AmSipReply& reply)
void SBCDialog::onOtherBye(const AmSipRequest& req)
{
stopPrepaidAccounting();
stopCallTimer();
AmB2BCallerSession::onOtherBye(req);
}
@ -830,6 +831,7 @@ void SBCDialog::onCancel()
void SBCDialog::stopCall() {
if (m_state == BB_Connected) {
stopPrepaidAccounting();
stopCallTimer();
}
terminateOtherLeg();
terminateLeg();
@ -853,6 +855,13 @@ bool SBCDialog::startCallTimer() {
return true;
}
void SBCDialog::stopCallTimer() {
if (call_profile.call_timer_enabled) {
DBG("SBC: removing call timer\n");
removeTimer(SBC_TIMER_ID_CALL_TIMER);
}
}
void SBCDialog::startPrepaidAccounting() {
if (!call_profile.prepaid_enabled)
return;

@ -116,6 +116,7 @@ class SBCDialog : public AmB2BCallerSession
void stopCall();
bool startCallTimer();
void stopCallTimer();
void startPrepaidAccounting();
void stopPrepaidAccounting();

Loading…
Cancel
Save