[prev in list] [next in list] [prev in thread] [next in thread] 

List:       semsdev
Subject:    [Semsdev] git:master: core: check for codes terminating the dialog also on reply sent .
From:       Raphael Coeffic <rco () iptel ! org>
Date:       2013-06-25 14:46:03
Message-ID: 20130625144603.74C4BEF8074 () rimmer ! ryngle ! com
[Download RAW message or body]

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


Author: Raphael Coeffic <rco@iptel.org>
Committer: Raphael Coeffic <rco@iptel.org>
Date:   Tue Jun 25 16:37:04 2013 +0200

core: check for codes terminating the dialog also on reply sent.

---

 core/AmBasicSipDialog.cpp |   23 +++++++++++++++++++++++
 1 files changed, 23 insertions(+), 0 deletions(-)

diff --git a/core/AmBasicSipDialog.cpp b/core/AmBasicSipDialog.cpp
index 402163e..8f4751a 100644
--- a/core/AmBasicSipDialog.cpp
+++ b/core/AmBasicSipDialog.cpp
@@ -469,6 +469,29 @@ void AmBasicSipDialog::onReplyTxed(const AmSipRequest& req,
 {
   if(hdl) hdl->onReplySent(req, reply);
 
+  /**
+   * Error code list from RFC 5057:
+   * those error codes terminate the dialog
+   *
+   * Note: 408, 480 should only terminate
+   *       the usage according to RFC 5057.
+   */
+  switch(reply.code){
+  case 404:
+  case 408:
+  case 410:
+  case 416:
+  case 480:
+  case 482:
+  case 483:
+  case 484:
+  case 485:
+  case 502:
+  case 604:
+    if(hdl) hdl->onLocalTerminate(reply);
+    break;
+  }
+
   if ((reply.code >= 200) && 
       (reply.cseq_method != SIP_METH_CANCEL)) {
     

_______________________________________________
Semsdev mailing list
Semsdev@lists.iptel.org
http://lists.iptel.org/mailman/listinfo/semsdev


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic