Module: kamailio
Branch: master
Commit: 73a523ba02cc4f4d25636a03344c45a5af7ac295
URL: 
https://github.com/kamailio/kamailio/commit/73a523ba02cc4f4d25636a03344c45a5af7ac295

Author: Sergey Safarov <s.safa...@gmail.com>
Committer: Sergey Safarov <s.safa...@gmail.com>
Date: 2020-06-25T22:46:35+03:00

dispatcher: cfg - simplified WITHINDLG

route[RELAY] contains exit command, so we can simplify construction

---

Modified: src/modules/dispatcher/doc/dispatcher.cfg

---

Diff:  
https://github.com/kamailio/kamailio/commit/73a523ba02cc4f4d25636a03344c45a5af7ac295.diff
Patch: 
https://github.com/kamailio/kamailio/commit/73a523ba02cc4f4d25636a03344c45a5af7ac295.patch

---

diff --git a/src/modules/dispatcher/doc/dispatcher.cfg 
b/src/modules/dispatcher/doc/dispatcher.cfg
index f79e9c762d..ef72be49d9 100644
--- a/src/modules/dispatcher/doc/dispatcher.cfg
+++ b/src/modules/dispatcher/doc/dispatcher.cfg
@@ -221,25 +221,25 @@ route[WITHINDLG] {
                        setflag(FLT_ACCFAILED); # ... even if the transaction 
fails
                }
                route(RELAY);
-       } else {
-               if (is_method("SUBSCRIBE") && uri == myself) {
-                       # in-dialog subscribe requests
-                       route(PRESENCE);
+       }
+
+       if (is_method("SUBSCRIBE") && uri == myself) {
+               # in-dialog subscribe requests
+               route(PRESENCE);
+               exit;
+       }
+       if ( is_method("ACK") ) {
+               if ( t_check_trans() ) {
+                       # non loose-route, but stateful ACK;
+                       # must be ACK after a 487 or e.g. 404 from upstream 
server
+                       t_relay();
+                       exit;
+               } else {
+                       # ACK without matching transaction ... ignore and 
discard.
                        exit;
                }
-               if ( is_method("ACK") ) {
-                       if ( t_check_trans() ) {
-                               # non loose-route, but stateful ACK;
-                               # must be ACK after a 487 or e.g. 404 from 
upstream server
-                               t_relay();
-                               exit;
-                       } else {
-                               # ACK without matching transaction ... ignore 
and discard.
-                               exit;
-                       }
-               }
-               sl_send_reply("404","Not here");
        }
+       sl_send_reply("404","Not here");
        exit;
 }
 


_______________________________________________
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to