[SR-Users] Proposal for dialog: DLG_STATE_EARLY

Halina Nowak halina at mbdsys.com
Fri Jun 14 14:10:59 CEST 2013


These modifications were implementated for dialogs having PRACK and UPDATE

--- a/modules/dialog/dlg_handlers.c    Fri Jun 14 13:45:41 2013 +0200
+++ b/modules/dialog/dlg_handlers.c    Fri Jun 14 13:55:24 2013 +0200
@@ -1249,16 +1249,18 @@
      }

      if ( (event==DLG_EVENT_REQ || event==DLG_EVENT_REQACK)
-    && new_state==DLG_STATE_CONFIRMED) {
+         && (new_state==DLG_STATE_CONFIRMED || 
new_state==DLG_STATE_EARLY)) {

          timeout = get_dlg_timeout(req);
          if (timeout!=default_timeout) {
              dlg->lifetime = timeout;
          }
-        if (update_dlg_timer( &dlg->tl, dlg->lifetime )==-1) {
+        if (new_state!=DLG_STATE_EARLY) {
+          if (update_dlg_timer( &dlg->tl, dlg->lifetime )==-1) {
              LM_ERR("failed to update dialog lifetime\n");
+          }
          }
-        if (update_cseqs(dlg, req, dir)!=0) {
+        if ((event != DLG_EVENT_REQACK) && (update_cseqs(dlg, req, 
dir)!=0)) {
              LM_ERR("cseqs update failed\n");
          } else {
              dlg->dflags |= DLG_FLAG_CHANGED;

--- a/modules/dialog/dlg_hash.c    Fri Jun 14 13:45:41 2013 +0200
+++ b/modules/dialog/dlg_hash.c    Fri Jun 14 13:55:24 2013 +0200
@@ -883,6 +883,7 @@
              break;
          case DLG_EVENT_REQACK:
              switch (dlg->state) {
+                         case DLG_STATE_EARLY:
                  case DLG_STATE_CONFIRMED_NA:
                      dlg->state = DLG_STATE_CONFIRMED;
                      break;

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20130614/7ec2a119/attachment.html>


More information about the sr-users mailing list