[sr-dev] [kamailio/kamailio] Branch ordering behavior changed between v5.3 and v5.4 (#2449)

Victor Seva notifications at github.com
Wed Aug 26 09:56:21 CEST 2020


I see no changes in behavior.

My investigation details:

```
root at 10f12270eb57:/etc/kamailio# diff -uN kamailio.cfg.orig kamailio.cfg
--- kamailio.cfg.orig   2020-08-26 07:10:34.436758338 +0000
+++ kamailio.cfg        2020-08-26 07:40:20.605192222 +0000
@@ -320,6 +320,8 @@
 modparam("tm", "fr_timer", 30000)
 # default invite retransmission timeout after 1xx: 120sec
 modparam("tm", "fr_inv_timer", 120000)
+modparam("tm", "contacts_avp", "tm_contacts")
+modparam("tm", "contact_flows_avp", "tm_contacts_flows")
 
 # ----- rr params -----
 # set next param to 1 to add value to ;lr param (helps with some UAs)
@@ -457,6 +459,11 @@
 # ----- debugger params -----
 modparam("debugger", "cfgtrace", 1)
 modparam("debugger", "log_level_name", "exec")
+modparam("debugger", "mod_level_mode", 1)
+modparam("debugger", "mod_hash_size", 4)
+modparam("debugger", "mod_level", "core=1")
+modparam("debugger", "mod_level", "xlog=3")
+modparam("debugger", "mod_level", "tm=3")
 #!endif
 
 ####### Routing Logic ########
@@ -698,11 +705,25 @@
        if (is_method("INVITE")) {
                setflag(FLT_ACCMISSED);
        }
-
+       route(TEST);
        route(RELAY);
        exit;
 }
 
+route[TEST] {
+        xlog("==== $$ru:$ru\n");
+        $var(i) = 0;
+        while($var(i) < 10) {
+           xlog ("=== $$branch $var(i): uri:$(branch(uri)[$var(i)]), q:$(branch(q)[$var(i)])\n");
+           $var(i) = $var(i) + 1;
+        }
+        t_load_contacts();
+        while (t_next_contacts()) {
+           xlog ("==== $$ru:$ru\n");
+        }
+        drop;
+}
+
 # Presence server processing
 route[PRESENCE] {
        if(!is_method("PUBLISH|SUBSCRIBE")) return;
```

create locations for alice, higher the number, higher the value of q:
```
root at 10f12270eb57:/etc/kamailio# for i in 1 2 3 4 5 6 7 8 9; do kamcmd ul.add location alice sip:alice$i at 127.0.0.$i:508$i 0 0.$i . 0 0 6111 . .; done
```

kamailio **5.3.4** output:
lookup loads the 9 contacts
```
 2(461) exec: {1 1 INVITE 1-500 at 172.17.0.3} *** cfgtrace:request_route=[LOCATION] c=[/etc/kamailio/kamailio.cfg] l=689 a=25 n=lookup
 2(461) DEBUG: {1 1 INVITE 1-500 at 172.17.0.3} registrar [lookup.c:306]: lookup_helper(): contact for [alice] found by address
 2(461) DEBUG: {1 1 INVITE 1-500 at 172.17.0.3} registrar [lookup.c:510]: lookup_helper(): instance is
 2(461) DEBUG: {1 1 INVITE 1-500 at 172.17.0.3} registrar [lookup.c:510]: lookup_helper(): instance is
 2(461) DEBUG: {1 1 INVITE 1-500 at 172.17.0.3} registrar [lookup.c:510]: lookup_helper(): instance is
 2(461) DEBUG: {1 1 INVITE 1-500 at 172.17.0.3} registrar [lookup.c:510]: lookup_helper(): instance is
 2(461) DEBUG: {1 1 INVITE 1-500 at 172.17.0.3} registrar [lookup.c:510]: lookup_helper(): instance is
 2(461) DEBUG: {1 1 INVITE 1-500 at 172.17.0.3} registrar [lookup.c:510]: lookup_helper(): instance is
 2(461) DEBUG: {1 1 INVITE 1-500 at 172.17.0.3} registrar [lookup.c:510]: lookup_helper(): instance is
 2(461) DEBUG: {1 1 INVITE 1-500 at 172.17.0.3} registrar [lookup.c:510]: lookup_helper(): instance is
```
checking the branches values and calling t_load_contacts():
```
2(461) exec: {1 1 INVITE 1-500 at 172.17.0.3} *** cfgtrace:request_route=[TEST] c=[/etc/kamailio/kamailio.cfg] l=714 a=25 n=xlog
 2(461) ERROR: {1 1 INVITE 1-500 at 172.17.0.3} <script>: ==== $ru:sip:alice9 at 127.0.0.9:5089
 2(461) exec: {1 1 INVITE 1-500 at 172.17.0.3} *** cfgtrace:request_route=[TEST] c=[/etc/kamailio/kamailio.cfg] l=715 a=63 n=assign
 2(461) exec: {1 1 INVITE 1-500 at 172.17.0.3} *** cfgtrace:request_route=[TEST] c=[/etc/kamailio/kamailio.cfg] l=719 a=23 n=while
 2(461) exec: {1 1 INVITE 1-500 at 172.17.0.3} *** cfgtrace:request_route=[TEST] c=[/etc/kamailio/kamailio.cfg] l=717 a=25 n=xlog
 2(461) ERROR: {1 1 INVITE 1-500 at 172.17.0.3} <script>: === $branch 0: uri:sip:alice8 at 127.0.0.8:5088, q:800
 2(461) exec: {1 1 INVITE 1-500 at 172.17.0.3} *** cfgtrace:request_route=[TEST] c=[/etc/kamailio/kamailio.cfg] l=718 a=63 n=assign
 2(461) exec: {1 1 INVITE 1-500 at 172.17.0.3} *** cfgtrace:request_route=[TEST] c=[/etc/kamailio/kamailio.cfg] l=717 a=25 n=xlog
 2(461) ERROR: {1 1 INVITE 1-500 at 172.17.0.3} <script>: === $branch 1: uri:sip:alice7 at 127.0.0.7:5087, q:700
 2(461) exec: {1 1 INVITE 1-500 at 172.17.0.3} *** cfgtrace:request_route=[TEST] c=[/etc/kamailio/kamailio.cfg] l=718 a=63 n=assign
 2(461) exec: {1 1 INVITE 1-500 at 172.17.0.3} *** cfgtrace:request_route=[TEST] c=[/etc/kamailio/kamailio.cfg] l=717 a=25 n=xlog
 2(461) ERROR: {1 1 INVITE 1-500 at 172.17.0.3} <script>: === $branch 2: uri:sip:alice6 at 127.0.0.6:5086, q:600
 2(461) exec: {1 1 INVITE 1-500 at 172.17.0.3} *** cfgtrace:request_route=[TEST] c=[/etc/kamailio/kamailio.cfg] l=718 a=63 n=assign
 2(461) exec: {1 1 INVITE 1-500 at 172.17.0.3} *** cfgtrace:request_route=[TEST] c=[/etc/kamailio/kamailio.cfg] l=717 a=25 n=xlog
 2(461) ERROR: {1 1 INVITE 1-500 at 172.17.0.3} <script>: === $branch 3: uri:sip:alice5 at 127.0.0.5:5085, q:500
 2(461) exec: {1 1 INVITE 1-500 at 172.17.0.3} *** cfgtrace:request_route=[TEST] c=[/etc/kamailio/kamailio.cfg] l=718 a=63 n=assign
 2(461) exec: {1 1 INVITE 1-500 at 172.17.0.3} *** cfgtrace:request_route=[TEST] c=[/etc/kamailio/kamailio.cfg] l=717 a=25 n=xlog
 2(461) ERROR: {1 1 INVITE 1-500 at 172.17.0.3} <script>: === $branch 4: uri:sip:alice4 at 127.0.0.4:5084, q:400
 2(461) exec: {1 1 INVITE 1-500 at 172.17.0.3} *** cfgtrace:request_route=[TEST] c=[/etc/kamailio/kamailio.cfg] l=718 a=63 n=assign
 2(461) exec: {1 1 INVITE 1-500 at 172.17.0.3} *** cfgtrace:request_route=[TEST] c=[/etc/kamailio/kamailio.cfg] l=717 a=25 n=xlog
 2(461) ERROR: {1 1 INVITE 1-500 at 172.17.0.3} <script>: === $branch 5: uri:sip:alice3 at 127.0.0.3:5083, q:300
 2(461) exec: {1 1 INVITE 1-500 at 172.17.0.3} *** cfgtrace:request_route=[TEST] c=[/etc/kamailio/kamailio.cfg] l=718 a=63 n=assign
 2(461) exec: {1 1 INVITE 1-500 at 172.17.0.3} *** cfgtrace:request_route=[TEST] c=[/etc/kamailio/kamailio.cfg] l=717 a=25 n=xlog
 2(461) ERROR: {1 1 INVITE 1-500 at 172.17.0.3} <script>: === $branch 6: uri:sip:alice2 at 127.0.0.2:5082, q:200
 2(461) exec: {1 1 INVITE 1-500 at 172.17.0.3} *** cfgtrace:request_route=[TEST] c=[/etc/kamailio/kamailio.cfg] l=718 a=63 n=assign
 2(461) exec: {1 1 INVITE 1-500 at 172.17.0.3} *** cfgtrace:request_route=[TEST] c=[/etc/kamailio/kamailio.cfg] l=717 a=25 n=xlog
 2(461) ERROR: {1 1 INVITE 1-500 at 172.17.0.3} <script>: === $branch 7: uri:sip:alice1 at 127.0.0.1:5081, q:100
 2(461) exec: {1 1 INVITE 1-500 at 172.17.0.3} *** cfgtrace:request_route=[TEST] c=[/etc/kamailio/kamailio.cfg] l=718 a=63 n=assign
 2(461) exec: {1 1 INVITE 1-500 at 172.17.0.3} *** cfgtrace:request_route=[TEST] c=[/etc/kamailio/kamailio.cfg] l=717 a=25 n=xlog
 2(461) ERROR: {1 1 INVITE 1-500 at 172.17.0.3} <script>: === $branch 8: uri:<null>, q:<null>
 2(461) exec: {1 1 INVITE 1-500 at 172.17.0.3} *** cfgtrace:request_route=[TEST] c=[/etc/kamailio/kamailio.cfg] l=718 a=63 n=assign
 2(461) exec: {1 1 INVITE 1-500 at 172.17.0.3} *** cfgtrace:request_route=[TEST] c=[/etc/kamailio/kamailio.cfg] l=717 a=25 n=xlog
 2(461) ERROR: {1 1 INVITE 1-500 at 172.17.0.3} <script>: === $branch 9: uri:<null>, q:<null>
 2(461) exec: {1 1 INVITE 1-500 at 172.17.0.3} *** cfgtrace:request_route=[TEST] c=[/etc/kamailio/kamailio.cfg] l=718 a=63 n=assign
 2(461) exec: {1 1 INVITE 1-500 at 172.17.0.3} *** cfgtrace:request_route=[TEST] c=[/etc/kamailio/kamailio.cfg] l=720 a=24 n=t_load_contacts
 2(461) DEBUG: {1 1 INVITE 1-500 at 172.17.0.3} tm [t_serial.c:191]: ki_t_load_contacts(): nr_branches is 8
```
t_next_contacts() loop:
```
 2(461) exec: {1 1 INVITE 1-500 at 172.17.0.3} *** cfgtrace:request_route=[TEST] c=[/etc/kamailio/kamailio.cfg] l=723 a=23 n=while
 2(461) exec: {1 1 INVITE 1-500 at 172.17.0.3} *** cfgtrace:request_route=[TEST] c=[/etc/kamailio/kamailio.cfg] l=721 a=24 n=t_next_contacts
 2(461) exec: {1 1 INVITE 1-500 at 172.17.0.3} *** cfgtrace:request_route=[TEST] c=[/etc/kamailio/kamailio.cfg] l=722 a=25 n=xlog
 2(461) ERROR: {1 1 INVITE 1-500 at 172.17.0.3} <script>: ==== $ru:sip:alice9 at 127.0.0.9:5089
 2(461) exec: {1 1 INVITE 1-500 at 172.17.0.3} *** cfgtrace:request_route=[TEST] c=[/etc/kamailio/kamailio.cfg] l=721 a=24 n=t_next_contacts
 2(461) exec: {1 1 INVITE 1-500 at 172.17.0.3} *** cfgtrace:request_route=[TEST] c=[/etc/kamailio/kamailio.cfg] l=722 a=25 n=xlog
 2(461) ERROR: {1 1 INVITE 1-500 at 172.17.0.3} <script>: ==== $ru:sip:alice8 at 127.0.0.8:5088
 2(461) exec: {1 1 INVITE 1-500 at 172.17.0.3} *** cfgtrace:request_route=[TEST] c=[/etc/kamailio/kamailio.cfg] l=721 a=24 n=t_next_contacts
 2(461) exec: {1 1 INVITE 1-500 at 172.17.0.3} *** cfgtrace:request_route=[TEST] c=[/etc/kamailio/kamailio.cfg] l=722 a=25 n=xlog
 2(461) ERROR: {1 1 INVITE 1-500 at 172.17.0.3} <script>: ==== $ru:sip:alice7 at 127.0.0.7:5087
 2(461) exec: {1 1 INVITE 1-500 at 172.17.0.3} *** cfgtrace:request_route=[TEST] c=[/etc/kamailio/kamailio.cfg] l=721 a=24 n=t_next_contacts
 2(461) exec: {1 1 INVITE 1-500 at 172.17.0.3} *** cfgtrace:request_route=[TEST] c=[/etc/kamailio/kamailio.cfg] l=722 a=25 n=xlog
 2(461) ERROR: {1 1 INVITE 1-500 at 172.17.0.3} <script>: ==== $ru:sip:alice6 at 127.0.0.6:5086
 2(461) exec: {1 1 INVITE 1-500 at 172.17.0.3} *** cfgtrace:request_route=[TEST] c=[/etc/kamailio/kamailio.cfg] l=721 a=24 n=t_next_contacts
 2(461) exec: {1 1 INVITE 1-500 at 172.17.0.3} *** cfgtrace:request_route=[TEST] c=[/etc/kamailio/kamailio.cfg] l=722 a=25 n=xlog
 2(461) ERROR: {1 1 INVITE 1-500 at 172.17.0.3} <script>: ==== $ru:sip:alice5 at 127.0.0.5:5085
 2(461) exec: {1 1 INVITE 1-500 at 172.17.0.3} *** cfgtrace:request_route=[TEST] c=[/etc/kamailio/kamailio.cfg] l=721 a=24 n=t_next_contacts
 2(461) exec: {1 1 INVITE 1-500 at 172.17.0.3} *** cfgtrace:request_route=[TEST] c=[/etc/kamailio/kamailio.cfg] l=722 a=25 n=xlog
 2(461) ERROR: {1 1 INVITE 1-500 at 172.17.0.3} <script>: ==== $ru:sip:alice4 at 127.0.0.4:5084
 2(461) exec: {1 1 INVITE 1-500 at 172.17.0.3} *** cfgtrace:request_route=[TEST] c=[/etc/kamailio/kamailio.cfg] l=721 a=24 n=t_next_contacts
 2(461) exec: {1 1 INVITE 1-500 at 172.17.0.3} *** cfgtrace:request_route=[TEST] c=[/etc/kamailio/kamailio.cfg] l=722 a=25 n=xlog
 2(461) ERROR: {1 1 INVITE 1-500 at 172.17.0.3} <script>: ==== $ru:sip:alice3 at 127.0.0.3:5083
 2(461) exec: {1 1 INVITE 1-500 at 172.17.0.3} *** cfgtrace:request_route=[TEST] c=[/etc/kamailio/kamailio.cfg] l=721 a=24 n=t_next_contacts
 2(461) exec: {1 1 INVITE 1-500 at 172.17.0.3} *** cfgtrace:request_route=[TEST] c=[/etc/kamailio/kamailio.cfg] l=722 a=25 n=xlog
 2(461) ERROR: {1 1 INVITE 1-500 at 172.17.0.3} <script>: ==== $ru:sip:alice2 at 127.0.0.2:5082
 2(461) exec: {1 1 INVITE 1-500 at 172.17.0.3} *** cfgtrace:request_route=[TEST] c=[/etc/kamailio/kamailio.cfg] l=721 a=24 n=t_next_contacts
 2(461) exec: {1 1 INVITE 1-500 at 172.17.0.3} *** cfgtrace:request_route=[TEST] c=[/etc/kamailio/kamailio.cfg] l=722 a=25 n=xlog
 2(461) ERROR: {1 1 INVITE 1-500 at 172.17.0.3} <script>: ==== $ru:sip:alice1 at 127.0.0.1:5081
 2(461) exec: {1 1 INVITE 1-500 at 172.17.0.3} *** cfgtrace:request_route=[TEST] c=[/etc/kamailio/kamailio.cfg] l=721 a=24 n=t_next_contacts
 2(461) DEBUG: {1 1 INVITE 1-500 at 172.17.0.3} tm [t_serial.c:460]: ki_t_next_contacts(): no contacts in contacts_avp - we are done!
 2(461) exec: {1 1 INVITE 1-500 at 172.17.0.3} *** cfgtrace:request_route=[TEST] c=[/etc/kamailio/kamailio.cfg] l=724 a=2 n=drop
```
 
So, everything as expected, q value order is obey.

kamailio **5.4.0** output:
lookup loads the 9 contacts
```
 1(793) exec: {1 1 INVITE 1-834 at 172.17.0.2} *** cfgtrace:dbg_cfg_trace(): request_route=[LOCATION] c=[/etc/kamailio/kamailio.cfg] l=726 a=25 n=lookup
 1(793) DEBUG: {1 1 INVITE 1-834 at 172.17.0.2} registrar [lookup.c:321]: lookup_helper(): contact for [alice] found by address
 1(793) DEBUG: {1 1 INVITE 1-834 at 172.17.0.2} registrar [lookup.c:525]: lookup_helper(): instance is
 1(793) DEBUG: {1 1 INVITE 1-834 at 172.17.0.2} registrar [lookup.c:525]: lookup_helper(): instance is
 1(793) DEBUG: {1 1 INVITE 1-834 at 172.17.0.2} registrar [lookup.c:525]: lookup_helper(): instance is
 1(793) DEBUG: {1 1 INVITE 1-834 at 172.17.0.2} registrar [lookup.c:525]: lookup_helper(): instance is
 1(793) DEBUG: {1 1 INVITE 1-834 at 172.17.0.2} registrar [lookup.c:525]: lookup_helper(): instance is
 1(793) DEBUG: {1 1 INVITE 1-834 at 172.17.0.2} registrar [lookup.c:525]: lookup_helper(): instance is
 1(793) DEBUG: {1 1 INVITE 1-834 at 172.17.0.2} registrar [lookup.c:525]: lookup_helper(): instance is
 1(793) DEBUG: {1 1 INVITE 1-834 at 172.17.0.2} registrar [lookup.c:525]: lookup_helper(): instance is
```
checking the branches values and calling t_load_contacts():
```
1(793) exec: {1 1 INVITE 1-834 at 172.17.0.2} *** cfgtrace:dbg_cfg_trace(): request_route=[TEST] c=[/etc/kamailio/kamailio.cfg] l=751 a=25 n=xlog
 1(793) ERROR: {1 1 INVITE 1-834 at 172.17.0.2} <script>: ==== $ru:sip:alice9 at 127.0.0.9:5089
 1(793) exec: {1 1 INVITE 1-834 at 172.17.0.2} *** cfgtrace:dbg_cfg_trace(): request_route=[TEST] c=[/etc/kamailio/kamailio.cfg] l=752 a=63 n=assign
 1(793) exec: {1 1 INVITE 1-834 at 172.17.0.2} *** cfgtrace:dbg_cfg_trace(): request_route=[TEST] c=[/etc/kamailio/kamailio.cfg] l=756 a=23 n=while
 1(793) exec: {1 1 INVITE 1-834 at 172.17.0.2} *** cfgtrace:dbg_cfg_trace(): request_route=[TEST] c=[/etc/kamailio/kamailio.cfg] l=754 a=25 n=xlog
 1(793) ERROR: {1 1 INVITE 1-834 at 172.17.0.2} <script>: === $branch 0: uri:sip:alice8 at 127.0.0.8:5088, q:800
 1(793) exec: {1 1 INVITE 1-834 at 172.17.0.2} *** cfgtrace:dbg_cfg_trace(): request_route=[TEST] c=[/etc/kamailio/kamailio.cfg] l=755 a=63 n=assign
 1(793) exec: {1 1 INVITE 1-834 at 172.17.0.2} *** cfgtrace:dbg_cfg_trace(): request_route=[TEST] c=[/etc/kamailio/kamailio.cfg] l=754 a=25 n=xlog
 1(793) ERROR: {1 1 INVITE 1-834 at 172.17.0.2} <script>: === $branch 1: uri:sip:alice7 at 127.0.0.7:5087, q:700
 1(793) exec: {1 1 INVITE 1-834 at 172.17.0.2} *** cfgtrace:dbg_cfg_trace(): request_route=[TEST] c=[/etc/kamailio/kamailio.cfg] l=755 a=63 n=assign
 1(793) exec: {1 1 INVITE 1-834 at 172.17.0.2} *** cfgtrace:dbg_cfg_trace(): request_route=[TEST] c=[/etc/kamailio/kamailio.cfg] l=754 a=25 n=xlog
 1(793) ERROR: {1 1 INVITE 1-834 at 172.17.0.2} <script>: === $branch 2: uri:sip:alice6 at 127.0.0.6:5086, q:600
 1(793) exec: {1 1 INVITE 1-834 at 172.17.0.2} *** cfgtrace:dbg_cfg_trace(): request_route=[TEST] c=[/etc/kamailio/kamailio.cfg] l=755 a=63 n=assign
 1(793) exec: {1 1 INVITE 1-834 at 172.17.0.2} *** cfgtrace:dbg_cfg_trace(): request_route=[TEST] c=[/etc/kamailio/kamailio.cfg] l=754 a=25 n=xlog
 1(793) ERROR: {1 1 INVITE 1-834 at 172.17.0.2} <script>: === $branch 3: uri:sip:alice5 at 127.0.0.5:5085, q:500
 1(793) exec: {1 1 INVITE 1-834 at 172.17.0.2} *** cfgtrace:dbg_cfg_trace(): request_route=[TEST] c=[/etc/kamailio/kamailio.cfg] l=755 a=63 n=assign
 1(793) exec: {1 1 INVITE 1-834 at 172.17.0.2} *** cfgtrace:dbg_cfg_trace(): request_route=[TEST] c=[/etc/kamailio/kamailio.cfg] l=754 a=25 n=xlog
 1(793) ERROR: {1 1 INVITE 1-834 at 172.17.0.2} <script>: === $branch 4: uri:sip:alice4 at 127.0.0.4:5084, q:400
 1(793) exec: {1 1 INVITE 1-834 at 172.17.0.2} *** cfgtrace:dbg_cfg_trace(): request_route=[TEST] c=[/etc/kamailio/kamailio.cfg] l=755 a=63 n=assign
 1(793) exec: {1 1 INVITE 1-834 at 172.17.0.2} *** cfgtrace:dbg_cfg_trace(): request_route=[TEST] c=[/etc/kamailio/kamailio.cfg] l=754 a=25 n=xlog
 1(793) ERROR: {1 1 INVITE 1-834 at 172.17.0.2} <script>: === $branch 5: uri:sip:alice3 at 127.0.0.3:5083, q:300
 1(793) exec: {1 1 INVITE 1-834 at 172.17.0.2} *** cfgtrace:dbg_cfg_trace(): request_route=[TEST] c=[/etc/kamailio/kamailio.cfg] l=755 a=63 n=assign
 1(793) exec: {1 1 INVITE 1-834 at 172.17.0.2} *** cfgtrace:dbg_cfg_trace(): request_route=[TEST] c=[/etc/kamailio/kamailio.cfg] l=754 a=25 n=xlog
 1(793) ERROR: {1 1 INVITE 1-834 at 172.17.0.2} <script>: === $branch 6: uri:sip:alice2 at 127.0.0.2:5082, q:200
 1(793) exec: {1 1 INVITE 1-834 at 172.17.0.2} *** cfgtrace:dbg_cfg_trace(): request_route=[TEST] c=[/etc/kamailio/kamailio.cfg] l=755 a=63 n=assign
 1(793) exec: {1 1 INVITE 1-834 at 172.17.0.2} *** cfgtrace:dbg_cfg_trace(): request_route=[TEST] c=[/etc/kamailio/kamailio.cfg] l=754 a=25 n=xlog
 1(793) ERROR: {1 1 INVITE 1-834 at 172.17.0.2} <script>: === $branch 7: uri:sip:alice1 at 127.0.0.1:5081, q:100
 1(793) exec: {1 1 INVITE 1-834 at 172.17.0.2} *** cfgtrace:dbg_cfg_trace(): request_route=[TEST] c=[/etc/kamailio/kamailio.cfg] l=755 a=63 n=assign
 1(793) exec: {1 1 INVITE 1-834 at 172.17.0.2} *** cfgtrace:dbg_cfg_trace(): request_route=[TEST] c=[/etc/kamailio/kamailio.cfg] l=754 a=25 n=xlog
 1(793) ERROR: {1 1 INVITE 1-834 at 172.17.0.2} <script>: === $branch 8: uri:<null>, q:<null>
 1(793) exec: {1 1 INVITE 1-834 at 172.17.0.2} *** cfgtrace:dbg_cfg_trace(): request_route=[TEST] c=[/etc/kamailio/kamailio.cfg] l=755 a=63 n=assign
 1(793) exec: {1 1 INVITE 1-834 at 172.17.0.2} *** cfgtrace:dbg_cfg_trace(): request_route=[TEST] c=[/etc/kamailio/kamailio.cfg] l=754 a=25 n=xlog
 1(793) ERROR: {1 1 INVITE 1-834 at 172.17.0.2} <script>: === $branch 9: uri:<null>, q:<null>
 1(793) exec: {1 1 INVITE 1-834 at 172.17.0.2} *** cfgtrace:dbg_cfg_trace(): request_route=[TEST] c=[/etc/kamailio/kamailio.cfg] l=755 a=63 n=assign
 1(793) exec: {1 1 INVITE 1-834 at 172.17.0.2} *** cfgtrace:dbg_cfg_trace(): request_route=[TEST] c=[/etc/kamailio/kamailio.cfg] l=757 a=24 n=t_load_contacts
 1(793) DEBUG: {1 1 INVITE 1-834 at 172.17.0.2} tm [t_serial.c:526]: t_load_contacts(): load_contact mode not selected, using: 0
 1(793) DEBUG: {1 1 INVITE 1-834 at 172.17.0.2} tm [t_serial.c:340]: ki_t_load_contacts_mode(): nr_branches is 8
```
t_next_contacts() loop:
```
 1(793) exec: {1 1 INVITE 1-834 at 172.17.0.2} *** cfgtrace:dbg_cfg_trace(): request_route=[TEST] c=[/etc/kamailio/kamailio.cfg] l=760 a=23 n=while
 1(793) exec: {1 1 INVITE 1-834 at 172.17.0.2} *** cfgtrace:dbg_cfg_trace(): request_route=[TEST] c=[/etc/kamailio/kamailio.cfg] l=758 a=24 n=t_next_contacts
 1(793) exec: {1 1 INVITE 1-834 at 172.17.0.2} *** cfgtrace:dbg_cfg_trace(): request_route=[TEST] c=[/etc/kamailio/kamailio.cfg] l=759 a=25 n=xlog
 1(793) ERROR: {1 1 INVITE 1-834 at 172.17.0.2} <script>: ==== $ru:sip:alice9 at 127.0.0.9:5089
 1(793) exec: {1 1 INVITE 1-834 at 172.17.0.2} *** cfgtrace:dbg_cfg_trace(): request_route=[TEST] c=[/etc/kamailio/kamailio.cfg] l=758 a=24 n=t_next_contacts
 1(793) exec: {1 1 INVITE 1-834 at 172.17.0.2} *** cfgtrace:dbg_cfg_trace(): request_route=[TEST] c=[/etc/kamailio/kamailio.cfg] l=759 a=25 n=xlog
 1(793) ERROR: {1 1 INVITE 1-834 at 172.17.0.2} <script>: ==== $ru:sip:alice8 at 127.0.0.8:5088
 1(793) exec: {1 1 INVITE 1-834 at 172.17.0.2} *** cfgtrace:dbg_cfg_trace(): request_route=[TEST] c=[/etc/kamailio/kamailio.cfg] l=758 a=24 n=t_next_contacts
 1(793) exec: {1 1 INVITE 1-834 at 172.17.0.2} *** cfgtrace:dbg_cfg_trace(): request_route=[TEST] c=[/etc/kamailio/kamailio.cfg] l=759 a=25 n=xlog
 1(793) ERROR: {1 1 INVITE 1-834 at 172.17.0.2} <script>: ==== $ru:sip:alice7 at 127.0.0.7:5087
 1(793) exec: {1 1 INVITE 1-834 at 172.17.0.2} *** cfgtrace:dbg_cfg_trace(): request_route=[TEST] c=[/etc/kamailio/kamailio.cfg] l=758 a=24 n=t_next_contacts
 1(793) exec: {1 1 INVITE 1-834 at 172.17.0.2} *** cfgtrace:dbg_cfg_trace(): request_route=[TEST] c=[/etc/kamailio/kamailio.cfg] l=759 a=25 n=xlog
 1(793) ERROR: {1 1 INVITE 1-834 at 172.17.0.2} <script>: ==== $ru:sip:alice6 at 127.0.0.6:5086
 1(793) exec: {1 1 INVITE 1-834 at 172.17.0.2} *** cfgtrace:dbg_cfg_trace(): request_route=[TEST] c=[/etc/kamailio/kamailio.cfg] l=758 a=24 n=t_next_contacts
 1(793) exec: {1 1 INVITE 1-834 at 172.17.0.2} *** cfgtrace:dbg_cfg_trace(): request_route=[TEST] c=[/etc/kamailio/kamailio.cfg] l=759 a=25 n=xlog
 1(793) ERROR: {1 1 INVITE 1-834 at 172.17.0.2} <script>: ==== $ru:sip:alice5 at 127.0.0.5:5085
 1(793) exec: {1 1 INVITE 1-834 at 172.17.0.2} *** cfgtrace:dbg_cfg_trace(): request_route=[TEST] c=[/etc/kamailio/kamailio.cfg] l=758 a=24 n=t_next_contacts
 1(793) exec: {1 1 INVITE 1-834 at 172.17.0.2} *** cfgtrace:dbg_cfg_trace(): request_route=[TEST] c=[/etc/kamailio/kamailio.cfg] l=759 a=25 n=xlog
 1(793) ERROR: {1 1 INVITE 1-834 at 172.17.0.2} <script>: ==== $ru:sip:alice4 at 127.0.0.4:5084
 1(793) exec: {1 1 INVITE 1-834 at 172.17.0.2} *** cfgtrace:dbg_cfg_trace(): request_route=[TEST] c=[/etc/kamailio/kamailio.cfg] l=758 a=24 n=t_next_contacts
 1(793) exec: {1 1 INVITE 1-834 at 172.17.0.2} *** cfgtrace:dbg_cfg_trace(): request_route=[TEST] c=[/etc/kamailio/kamailio.cfg] l=759 a=25 n=xlog
 1(793) ERROR: {1 1 INVITE 1-834 at 172.17.0.2} <script>: ==== $ru:sip:alice3 at 127.0.0.3:5083
 1(793) exec: {1 1 INVITE 1-834 at 172.17.0.2} *** cfgtrace:dbg_cfg_trace(): request_route=[TEST] c=[/etc/kamailio/kamailio.cfg] l=758 a=24 n=t_next_contacts
 1(793) exec: {1 1 INVITE 1-834 at 172.17.0.2} *** cfgtrace:dbg_cfg_trace(): request_route=[TEST] c=[/etc/kamailio/kamailio.cfg] l=759 a=25 n=xlog
 1(793) ERROR: {1 1 INVITE 1-834 at 172.17.0.2} <script>: ==== $ru:sip:alice2 at 127.0.0.2:5082
 1(793) exec: {1 1 INVITE 1-834 at 172.17.0.2} *** cfgtrace:dbg_cfg_trace(): request_route=[TEST] c=[/etc/kamailio/kamailio.cfg] l=758 a=24 n=t_next_contacts
 1(793) exec: {1 1 INVITE 1-834 at 172.17.0.2} *** cfgtrace:dbg_cfg_trace(): request_route=[TEST] c=[/etc/kamailio/kamailio.cfg] l=759 a=25 n=xlog
 1(793) ERROR: {1 1 INVITE 1-834 at 172.17.0.2} <script>: ==== $ru:sip:alice1 at 127.0.0.1:5081
 1(793) exec: {1 1 INVITE 1-834 at 172.17.0.2} *** cfgtrace:dbg_cfg_trace(): request_route=[TEST] c=[/etc/kamailio/kamailio.cfg] l=758 a=24 n=t_next_contacts
 1(793) DEBUG: {1 1 INVITE 1-834 at 172.17.0.2} tm [t_serial.c:627]: ki_t_next_contacts(): no contacts in contacts_avp - we are done!
 1(793) exec: {1 1 INVITE 1-834 at 172.17.0.2} *** cfgtrace:dbg_cfg_trace(): request_route=[TEST] c=[/etc/kamailio/kamailio.cfg] l=761 a=2 n=drop
```

Everything as expected, q value order is obey, same behavior as I can see

-- 
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/2449#issuecomment-680722311
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20200826/ac8f7f3e/attachment-0001.htm>


More information about the sr-dev mailing list