Module: kamailio
Branch: master
Commit: df73f60011497a7346c122cd4328e9564862a448
URL:
https://github.com/kamailio/kamailio/commit/df73f60011497a7346c122cd4328e95…
Author: Sergey Safarov <s.safarov(a)gmail.com>
Committer: Sergey Safarov <s.safarov(a)gmail.com>
Date: 2020-06-25T22:39:14+03:00
dispatcher: cfg - more simple nesing for route[WITHINDLG]
---
Modified: src/modules/dispatcher/doc/dispatcher.cfg
---
Diff:
https://github.com/kamailio/kamailio/commit/df73f60011497a7346c122cd4328e95…
Patch:
https://github.com/kamailio/kamailio/commit/df73f60011497a7346c122cd4328e95…
---
diff --git a/src/modules/dispatcher/doc/dispatcher.cfg
b/src/modules/dispatcher/doc/dispatcher.cfg
index 98492ec5c2..f79e9c762d 100644
--- a/src/modules/dispatcher/doc/dispatcher.cfg
+++ b/src/modules/dispatcher/doc/dispatcher.cfg
@@ -209,36 +209,38 @@ route[REQINIT] {
# Handle requests within SIP dialogs
route[WITHINDLG] {
- if (has_totag()) {
- # sequential request withing a dialog should
- # take the path determined by record-routing
- if (loose_route()) {
- if (is_method("BYE")) {
- setflag(FLT_ACC); # do accounting ...
- setflag(FLT_ACCFAILED); # ... even if the transaction fails
- }
- route(RELAY);
- } else {
- if (is_method("SUBSCRIBE") && uri == myself) {
- # in-dialog subscribe requests
- route(PRESENCE);
+ if (!has_totag()) {
+ return;
+ }
+
+ # sequential request withing a dialog should
+ # take the path determined by record-routing
+ if (loose_route()) {
+ if (is_method("BYE")) {
+ setflag(FLT_ACC); # do accounting ...
+ setflag(FLT_ACCFAILED); # ... even if the transaction fails
+ }
+ route(RELAY);
+ } else {
+ 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");
}
- exit;
+ sl_send_reply("404","Not here");
}
+ exit;
}
# Handle SIP registrations