Module: sems
Branch: master
Commit: 1d35fc7af0ae9448d5cce6baeb4d31bffa798ca1
URL:    
http://git.sip-router.org/cgi-bin/gitweb.cgi/sems/?a=commit;h=1d35fc7af0ae9448d5cce6baeb4d31bffa798ca1

Author: Stefan Sayer <[email protected]>
Committer: Stefan Sayer <[email protected]>
Date:   Fri Feb 11 03:45:00 2011 +0100

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(+), 0 deletions(-)

diff --git a/apps/sbc/SBC.cpp b/apps/sbc/SBC.cpp
index 6ad83d5..48134d6 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 484ee4f..131e6e0 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();
 

_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev

Reply via email to