Kamailio version: 5.1.6 (x86_64/linux)
cfgtrace reports strange call route flow going back and forward from the parent route.
For example, if the cfg file looks like the following:
###############################################
loadmodule "cfgt.so"
modparam("cfgt", "mask", 30)
modparam("cfgt", "basedir", "/tmp/cfgtest/")
loadmodule "debugger.so"
modparam("debugger", "cfgtrace", 1)
modparam("debugger", "mod_level_mode", 1)
modparam("debugger", "mod_hash_size", 4)
modparam("debugger", "mod_level", "core=3")
modparam("debugger", "cfgtest", 1)
request_route
{
route(ENTRY);
route(TEST_1);
}
route[ENTRY]
{
xlog("L_NOTICE", "New request\n");
}
route[TEST_2]
{
xlog("L_NOTICE", "End\n");
}
route[TEST_1]
{
xlog("L_NOTICE", "I'm here\n");
if(is_method("BYE"))
{
xlog("L_NOTICE", "I'm here, again\n");
route(TEST_2);
}
xlog("L_NOTICE", "I'm still here\n");
return;
}
###############################################
If I send an INVITE message, I get the following cfgtrace:
DEBUG: <core> [core/parser/msg_parser.c:89]: get_hdr_field(): found end of header
ERROR: *** cfgtrace:request_route=[DEFAULT_ROUTE] c=[/etc/kamailio/proxy/kamailio.cfg] l=472 a=5 n=route
ERROR: *** cfgtrace:request_route=[ENTRY] c=[/etc/kamailio/proxy/kamailio.cfg] l=479 a=26 n=xlog
NOTICE: <script>: New request
ERROR: *** cfgtrace:request_route=[DEFAULT_ROUTE] c=[/etc/kamailio/proxy/kamailio.cfg] l=474 a=5 n=route
ERROR: *** cfgtrace:request_route=[TEST_1] c=[/etc/kamailio/proxy/kamailio.cfg] l=489 a=26 n=xlog
NOTICE: <script>: I'm here
ERROR: *** cfgtrace:request_route=[DEFAULT_ROUTE] c=[/etc/kamailio/proxy/kamailio.cfg] l=497 a=16 n=if
ERROR: *** cfgtrace:request_route=[TEST_1] c=[/etc/kamailio/proxy/kamailio.cfg] l=491 a=25 n=is_method
ERROR: *** cfgtrace:request_route=[DEFAULT_ROUTE] c=[/etc/kamailio/proxy/kamailio.cfg] l=497 a=26 n=xlog
NOTICE: <script>: I'm still here
ERROR: *** cfgtrace:request_route=[DEFAULT_ROUTE] c=[/etc/kamailio/proxy/kamailio.cfg] l=499 a=2 n=return
DEBUG: <core> [core/receive.c:298]: receive_msg(): request-route executed in: 395 usec
As you see some actions are assigned to route "DEFAULT_ROUTE" even if they are in TEST_1.
The issue completely disappear if I remove "route(TEST_2);" line inside the IF.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/1668
Module: kamailio
Branch: master
Commit: 2b35fc28a6cef63158e29e322171621d2c66fa1c
URL: https://github.com/kamailio/kamailio/commit/2b35fc28a6cef63158e29e322171621…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2018-10-17T13:01:32+02:00
modules: readme files regenerated - pipelimit ... [skip ci]
---
Modified: src/modules/pipelimit/README
---
Diff: https://github.com/kamailio/kamailio/commit/2b35fc28a6cef63158e29e322171621…
Patch: https://github.com/kamailio/kamailio/commit/2b35fc28a6cef63158e29e322171621…
---
diff --git a/src/modules/pipelimit/README b/src/modules/pipelimit/README
index 810b5d48ca..05d05f27a8 100644
--- a/src/modules/pipelimit/README
+++ b/src/modules/pipelimit/README
@@ -42,8 +42,9 @@ Daniel-Constantin Mierla
3.6. plp_algorithm_column (string)
3.7. timer_interval (integer)
3.8. timer_mode (integer)
- 3.9. reply_code (integer)
- 3.10. reply_reason (string)
+ 3.9. load_fetch (integer)
+ 3.10. reply_code (integer)
+ 3.11. reply_reason (string)
4. Functions
@@ -70,12 +71,13 @@ Daniel-Constantin Mierla
1.6. Set plp_algorithm_column parameter
1.7. Set timer_interval parameter
1.8. Set timer_mode parameter
- 1.9. Set reply_code parameter
- 1.10. Set reply_code parameter at runtime
- 1.11. Set reply_reason parameter
- 1.12. Set reply_reason parameter at runtime
- 1.13. pl_check usage
- 1.14. pl_drop usage
+ 1.9. Set load_fetch parameter
+ 1.10. Set reply_code parameter
+ 1.11. Set reply_code parameter at runtime
+ 1.12. Set reply_reason parameter
+ 1.13. Set reply_reason parameter at runtime
+ 1.14. pl_check usage
+ 1.15. pl_drop usage
Chapter 1. Admin Guide
@@ -100,8 +102,9 @@ Chapter 1. Admin Guide
3.6. plp_algorithm_column (string)
3.7. timer_interval (integer)
3.8. timer_mode (integer)
- 3.9. reply_code (integer)
- 3.10. reply_reason (string)
+ 3.9. load_fetch (integer)
+ 3.10. reply_code (integer)
+ 3.11. reply_reason (string)
4. Functions
@@ -211,8 +214,9 @@ Chapter 1. Admin Guide
3.6. plp_algorithm_column (string)
3.7. timer_interval (integer)
3.8. timer_mode (integer)
- 3.9. reply_code (integer)
- 3.10. reply_reason (string)
+ 3.9. load_fetch (integer)
+ 3.10. reply_code (integer)
+ 3.11. reply_reason (string)
3.1. hash_size (int)
@@ -314,36 +318,49 @@ modparam("pipelimit", "timer_interval", 5)
modparam("pipelimit", "timer_mode", 1)
...
-3.9. reply_code (integer)
+3.9. load_fetch (integer)
+
+ Control if the module should fetch the load for CPU and network
+ traffic. If set to 0, no load is fetched; if set to 1, the load is
+ fetched every timer interval.
+
+ Default value is 1.
+
+ Example 1.9. Set load_fetch parameter
+...
+modparam("pipelimit", "load_fetch", 0)
+...
+
+3.10. reply_code (integer)
The code of the reply sent by Kamailio while limiting.
Default value is 503.
- Example 1.9. Set reply_code parameter
+ Example 1.10. Set reply_code parameter
...
modparam("pipelimit", "reply_code", 505)
...
This value can be modified at runtime using kamcmd
- Example 1.10. Set reply_code parameter at runtime
+ Example 1.11. Set reply_code parameter at runtime
kamcmd cfg.set_now_int pipelimit reply_code 505
-3.10. reply_reason (string)
+3.11. reply_reason (string)
The reason of the reply sent by Kamailio while limiting.
Default value is "Server Unavailable".
- Example 1.11. Set reply_reason parameter
+ Example 1.12. Set reply_reason parameter
...
modparam("pipelimit", "reply_reason", "Limiting")
...
This value can be modified at runtime using kamcmd
- Example 1.12. Set reply_reason parameter at runtime
+ Example 1.13. Set reply_reason parameter at runtime
kamcmd cfg.set_now_string pipelimit reply_reason "Limiting"
4. Functions
@@ -378,7 +395,7 @@ kamcmd cfg.set_now_string pipelimit reply_reason "Limiting"
This function can be used from ANY_ROUTE.
- Example 1.13. pl_check usage
+ Example 1.14. pl_check usage
...
# perform pipe match for current method
if (!pl_check("one")) {
@@ -447,7 +464,7 @@ with unexpected retcode=$var(check_result)\n");
This function can be used from
REQUEST_ROUTE|BRANCH_ROUTE|FAILURE_ROUTE|ONSEND_ROUTE.
- Example 1.14. pl_drop usage
+ Example 1.15. pl_drop usage
...
if (!pl_check("one")) {
# send back a "503 - Server Unavailable"
Module: kamailio
Branch: master
Commit: fc1f16e52433257ad7abf2cbbf26e72f0ac94e7a
URL: https://github.com/kamailio/kamailio/commit/fc1f16e52433257ad7abf2cbbf26e72…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2018-10-17T09:31:37+02:00
modules: readme files regenerated - pipelimit ... [skip ci]
---
Modified: src/modules/pipelimit/README
---
Diff: https://github.com/kamailio/kamailio/commit/fc1f16e52433257ad7abf2cbbf26e72…
Patch: https://github.com/kamailio/kamailio/commit/fc1f16e52433257ad7abf2cbbf26e72…
---
diff --git a/src/modules/pipelimit/README b/src/modules/pipelimit/README
index 3b48f2e0d6..810b5d48ca 100644
--- a/src/modules/pipelimit/README
+++ b/src/modules/pipelimit/README
@@ -41,8 +41,9 @@ Daniel-Constantin Mierla
3.5. plp_limit_column (string)
3.6. plp_algorithm_column (string)
3.7. timer_interval (integer)
- 3.8. reply_code (integer)
- 3.9. reply_reason (string)
+ 3.8. timer_mode (integer)
+ 3.9. reply_code (integer)
+ 3.10. reply_reason (string)
4. Functions
@@ -68,12 +69,13 @@ Daniel-Constantin Mierla
1.5. Set plp_limit_column parameter
1.6. Set plp_algorithm_column parameter
1.7. Set timer_interval parameter
- 1.8. Set reply_code parameter
- 1.9. Set reply_code parameter at runtime
- 1.10. Set reply_reason parameter
- 1.11. Set reply_reason parameter at runtime
- 1.12. pl_check usage
- 1.13. pl_drop usage
+ 1.8. Set timer_mode parameter
+ 1.9. Set reply_code parameter
+ 1.10. Set reply_code parameter at runtime
+ 1.11. Set reply_reason parameter
+ 1.12. Set reply_reason parameter at runtime
+ 1.13. pl_check usage
+ 1.14. pl_drop usage
Chapter 1. Admin Guide
@@ -97,8 +99,9 @@ Chapter 1. Admin Guide
3.5. plp_limit_column (string)
3.6. plp_algorithm_column (string)
3.7. timer_interval (integer)
- 3.8. reply_code (integer)
- 3.9. reply_reason (string)
+ 3.8. timer_mode (integer)
+ 3.9. reply_code (integer)
+ 3.10. reply_reason (string)
4. Functions
@@ -207,8 +210,9 @@ Chapter 1. Admin Guide
3.5. plp_limit_column (string)
3.6. plp_algorithm_column (string)
3.7. timer_interval (integer)
- 3.8. reply_code (integer)
- 3.9. reply_reason (string)
+ 3.8. timer_mode (integer)
+ 3.9. reply_code (integer)
+ 3.10. reply_reason (string)
3.1. hash_size (int)
@@ -298,36 +302,48 @@ modparam("pipelimit", "plp_algorithm_column", "name")
modparam("pipelimit", "timer_interval", 5)
...
-3.8. reply_code (integer)
+3.8. timer_mode (integer)
+
+ Control what timer process to be used: 0 - use main fast timer; 1 - use
+ secondary wheel timer.
+
+ Default value is 0.
+
+ Example 1.8. Set timer_mode parameter
+...
+modparam("pipelimit", "timer_mode", 1)
+...
+
+3.9. reply_code (integer)
The code of the reply sent by Kamailio while limiting.
Default value is 503.
- Example 1.8. Set reply_code parameter
+ Example 1.9. Set reply_code parameter
...
modparam("pipelimit", "reply_code", 505)
...
This value can be modified at runtime using kamcmd
- Example 1.9. Set reply_code parameter at runtime
+ Example 1.10. Set reply_code parameter at runtime
kamcmd cfg.set_now_int pipelimit reply_code 505
-3.9. reply_reason (string)
+3.10. reply_reason (string)
The reason of the reply sent by Kamailio while limiting.
Default value is "Server Unavailable".
- Example 1.10. Set reply_reason parameter
+ Example 1.11. Set reply_reason parameter
...
modparam("pipelimit", "reply_reason", "Limiting")
...
This value can be modified at runtime using kamcmd
- Example 1.11. Set reply_reason parameter at runtime
+ Example 1.12. Set reply_reason parameter at runtime
kamcmd cfg.set_now_string pipelimit reply_reason "Limiting"
4. Functions
@@ -362,7 +378,7 @@ kamcmd cfg.set_now_string pipelimit reply_reason "Limiting"
This function can be used from ANY_ROUTE.
- Example 1.12. pl_check usage
+ Example 1.13. pl_check usage
...
# perform pipe match for current method
if (!pl_check("one")) {
@@ -431,7 +447,7 @@ with unexpected retcode=$var(check_result)\n");
This function can be used from
REQUEST_ROUTE|BRANCH_ROUTE|FAILURE_ROUTE|ONSEND_ROUTE.
- Example 1.13. pl_drop usage
+ Example 1.14. pl_drop usage
...
if (!pl_check("one")) {
# send back a "503 - Server Unavailable"