From 1d35fc7af0ae9448d5cce6baeb4d31bffa798ca1 Mon Sep 17 00:00:00 2001 From: Stefan Sayer Date: Fri, 11 Feb 2011 03:45:00 +0100 Subject: [PATCH] b/f: remove call timer timer if set on end of call --- apps/sbc/SBC.cpp | 9 +++++++++ apps/sbc/SBC.h | 1 + 2 files changed, 10 insertions(+) diff --git a/apps/sbc/SBC.cpp b/apps/sbc/SBC.cpp index 6ad83d5e..48134d6b 100644 --- a/apps/sbc/SBC.cpp +++ b/apps/sbc/SBC.cpp @@ -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; diff --git a/apps/sbc/SBC.h b/apps/sbc/SBC.h index 484ee4fb..131e6e01 100644 --- a/apps/sbc/SBC.h +++ b/apps/sbc/SBC.h @@ -116,6 +116,7 @@ class SBCDialog : public AmB2BCallerSession void stopCall(); bool startCallTimer(); + void stopCallTimer(); void startPrepaidAccounting(); void stopPrepaidAccounting();