Module: sems
Branch: rco/offer_answer
Commit: 76c8604312f8b93d2d0d474232c4268fad8139fd
URL:    
http://git.sip-router.org/cgi-bin/gitweb.cgi/sems/?a=commit;h=76c8604312f8b93d2d0d474232c4268fad8139fd

Author: Raphael Coeffic <[email protected]>
Committer: Raphael Coeffic <[email protected]>
Date:   Mon May 16 11:28:39 2011 +0200

b/f: bye() should send 487 when in Cancelling state.

---

 core/AmB2BSession.cpp |   25 +++++++++++++------------
 core/AmSipDialog.cpp  |    6 ++++--
 2 files changed, 17 insertions(+), 14 deletions(-)

diff --git a/core/AmB2BSession.cpp b/core/AmB2BSession.cpp
index 1e5b45e..05258c8 100644
--- a/core/AmB2BSession.cpp
+++ b/core/AmB2BSession.cpp
@@ -531,18 +531,19 @@ void AmB2BSession::terminateLeg()
   if (rtp_relay_enabled)
     clearRtpReceiverRelay();
 
-  switch(dlg.getStatus()){
-  case AmSipDialog::Trying:
-  case AmSipDialog::Proceeding:
-  case AmSipDialog::Early:
-  case AmSipDialog::Connected:
-    dlg.bye("", SIP_FLAGS_VERBATIM);
-    break;
-
-  default:
-    DBG("terminateLeg() not sending any BYE or CANCEL\n");
-    break;
-  }
+  // switch(dlg.getStatus()){
+  // case AmSipDialog::Trying:
+  // case AmSipDialog::Proceeding:
+  // case AmSipDialog::Early:
+  // case AmSipDialog::Connected:
+  dlg.bye("", SIP_FLAGS_VERBATIM);
+  //   break;
+
+  // default:
+  //   DBG("terminateLeg() not sending any BYE or CANCEL (state=%s)\n",
+  //   dlg.getStatusStr());
+  //   break;
+  // }
 }
 
 void AmB2BSession::terminateOtherLeg()
diff --git a/core/AmSipDialog.cpp b/core/AmSipDialog.cpp
index 19bffbe..1bf7345 100644
--- a/core/AmSipDialog.cpp
+++ b/core/AmSipDialog.cpp
@@ -1133,6 +1133,7 @@ int AmSipDialog::bye(const string& hdrs, int flags)
     case Trying:
     case Proceeding:
     case Early:
+    case Cancelling:
        if(getUACInvTransPending())
            return cancel();
        else {  
@@ -1147,8 +1148,9 @@ int AmSipDialog::bye(const string& hdrs, int flags)
 
            // missing AmSipRequest to be able
            // to send the reply on behalf of the app.
-           ERROR("ignoring bye() in Pending state: "
-                 "no UAC transaction to cancel.\n");
+           ERROR("ignoring bye() in %s state: "
+                 "no UAC transaction to cancel.\n",
+                 getStatusStr());
            status = Disconnected;
        }
        return 0;

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

Reply via email to