Browse Source

use descending order to remove preferred route from list

4.3 4.3.23
lazedo 6 years ago
parent
commit
a2933334ca
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      kamailio/dispatcher-role-5.2.cfg

+ 4
- 4
kamailio/dispatcher-role-5.2.cfg View File

@ -173,12 +173,12 @@ route[DISPATCHER_PREFERRED_ROUTE]
xlog("L_INFO", "$ci|log|re-ordering the dispatcher list to maintain association with $var(prefered_route)\n");
$var(i) = 0;
while($var(i) < $xavp(ds_ctx=>cnt)) {
$var(i) = $xavp(ds_ctx=>cnt) - 1;
while($var(i) >= 0) {
if($xavp(ds_dst[$var(i)]=>uri) == $var(prefered_route)) {
$xavp(ds_dst[$var(i)]=>*) = $null;
$xavp(ds_dst[$var(i)]) = $null;
}
$var(i) = $var(i) + 1;
$var(i) = $var(i) - 1;
}
$xavp(ds_dst=>uri) = $var(prefered_route);


Loading…
Cancel
Save