|
|
@ -3,7 +3,7 @@ modparam("htable", "htable", "failover=>size=16;autoexpire=120") |
|
|
|
|
|
|
|
|
####### Dispatcher module ######## |
|
|
####### Dispatcher module ######## |
|
|
loadmodule "dispatcher.so" |
|
|
loadmodule "dispatcher.so" |
|
|
modparam("dispatcher", "list_file", "/etc/kazoo/kamailio/dispatcher.list") |
|
|
|
|
|
|
|
|
modparam("dispatcher", "list_file", "/etc/kazoo/kamailio/dbtext/dispatcher") |
|
|
modparam("dispatcher", "flags", 2) |
|
|
modparam("dispatcher", "flags", 2) |
|
|
modparam("dispatcher", "use_default", 0) |
|
|
modparam("dispatcher", "use_default", 0) |
|
|
modparam("dispatcher", "force_dst", 1) |
|
|
modparam("dispatcher", "force_dst", 1) |
|
|
@ -100,9 +100,13 @@ route[DISPATCHER_FIND_ROUTES] |
|
|
$var(from_uri) = @from.uri.user + "@" + @from.uri.host; |
|
|
$var(from_uri) = @from.uri.user + "@" + @from.uri.host; |
|
|
if ($sht(associations=>$var(from_uri)) != $null) { |
|
|
if ($sht(associations=>$var(from_uri)) != $null) { |
|
|
$var(association) = $var(from_uri); |
|
|
$var(association) = $var(from_uri); |
|
|
|
|
|
$var(prefered_route) = $sht(associations=>$var(association)); |
|
|
|
|
|
xlog("L_INFO", "$ci|log|from uri $var(from_uri) associated with media server $var(prefered_route)"); |
|
|
route(DISPATCHER_REORDER_ROUTES); |
|
|
route(DISPATCHER_REORDER_ROUTES); |
|
|
} else if ($sht(associations=>$var(contact_uri)) != $null) { |
|
|
} else if ($sht(associations=>$var(contact_uri)) != $null) { |
|
|
$var(association) = $var(contact_uri); |
|
|
$var(association) = $var(contact_uri); |
|
|
|
|
|
$var(prefered_route) = $sht(associations=>$var(association)); |
|
|
|
|
|
xlog("L_INFO", "$ci|log|contact uri $var(contact_uri) associated with media server $var(prefered_route)"); |
|
|
route(DISPATCHER_REORDER_ROUTES); |
|
|
route(DISPATCHER_REORDER_ROUTES); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
@ -111,7 +115,6 @@ route[DISPATCHER_REORDER_ROUTES] |
|
|
{ |
|
|
{ |
|
|
$var(i) = 0; |
|
|
$var(i) = 0; |
|
|
$var(found) = 0; |
|
|
$var(found) = 0; |
|
|
$var(prefered_route) = $sht(associations=>$var(association)); |
|
|
|
|
|
while($(avp(ds_dst)[$var(i)]) != $null) { |
|
|
while($(avp(ds_dst)[$var(i)]) != $null) { |
|
|
if($(avp(ds_dst)[$var(i)]) != $var(prefered_route)) { |
|
|
if($(avp(ds_dst)[$var(i)]) != $var(prefered_route)) { |
|
|
$avp(tmp_ds_dst) = $(avp(ds_dst)[$var(i)]); |
|
|
$avp(tmp_ds_dst) = $(avp(ds_dst)[$var(i)]); |
|
|
|