|
|
|
@ -353,9 +353,6 @@ route[ROUTE_LOAD_PEER_OUT_PREF]
|
|
|
|
|
avp_copy("$avp(s:use_rtpproxy)", "$avp(s:callee_use_rtpproxy)/d");
|
|
|
|
|
avp_copy("$avp(s:ipv46_for_rtpproxy)", "$avp(s:peer_callee_ipv46_for_rtpproxy)/d");
|
|
|
|
|
|
|
|
|
|
avp_copy("$avp(s:concurrent_max)", "$avp(s:peer_callee_concurrent_max)/d");
|
|
|
|
|
avp_copy("$avp(s:concurrent_max_out)", "$avp(s:peer_callee_concurrent_max_out)/d");
|
|
|
|
|
|
|
|
|
|
avp_copy("$avp(s:outbound_socket)", "$avp(s:peer_callee_outbound_socket)/d");
|
|
|
|
|
|
|
|
|
|
if($avp(s:sst_enable) == $null)
|
|
|
|
@ -495,33 +492,31 @@ route[ROUTE_LOAD_PEER_IN_PREF]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
avp_copy("$avp(s:concurrent_max)", "$avp(s:caller_peer_concurrent_max)/d");
|
|
|
|
|
if($avp(s:sst_enable) == $null)
|
|
|
|
|
{
|
|
|
|
|
$(avp(s:sst_enable)[*]) = "[% sems.sbc.session_timer.enable %]";
|
|
|
|
|
}
|
|
|
|
|
avp_copy("$avp(s:sst_enable)", "$avp(s:peer_caller_sst_enable)/d");
|
|
|
|
|
if($avp(s:sst_expires) == $null)
|
|
|
|
|
{
|
|
|
|
|
$(avp(s:sst_expires)[*]) = [% sems.sbc.session_timer.session_expires %];
|
|
|
|
|
}
|
|
|
|
|
avp_copy("$avp(s:sst_expires)", "$avp(s:peer_caller_sst_expires)/d");
|
|
|
|
|
if($avp(s:sst_min_timer) == $null)
|
|
|
|
|
{
|
|
|
|
|
$(avp(s:sst_min_timer)[*]) = [% sems.sbc.session_timer.min_timer %];
|
|
|
|
|
}
|
|
|
|
|
avp_copy("$avp(s:sst_min_timer)", "$avp(s:peer_caller_sst_min_timer)/d");
|
|
|
|
|
if($avp(s:sst_max_timer) == $null)
|
|
|
|
|
{
|
|
|
|
|
$(avp(s:sst_max_timer)[*]) = [% sems.sbc.session_timer.max_timer %];
|
|
|
|
|
}
|
|
|
|
|
avp_copy("$avp(s:sst_max_timer)", "$avp(s:peer_caller_sst_max_timer)/d");
|
|
|
|
|
if($avp(s:sst_refresh_method) == $null)
|
|
|
|
|
{
|
|
|
|
|
$(avp(s:sst_refresh_method)[*]) = "UPDATE_FALLBACK_INVITE";
|
|
|
|
|
}
|
|
|
|
|
avp_copy("$avp(s:sst_refresh_method)", "$avp(s:peer_caller_sst_refresh_method)/d");
|
|
|
|
|
avp_copy("$avp(s:sst_enable)", "$avp(s:peer_caller_sst_enable)/d");
|
|
|
|
|
if($avp(s:sst_expires) == $null)
|
|
|
|
|
{
|
|
|
|
|
$(avp(s:sst_expires)[*]) = [% sems.sbc.session_timer.session_expires %];
|
|
|
|
|
}
|
|
|
|
|
avp_copy("$avp(s:sst_expires)", "$avp(s:peer_caller_sst_expires)/d");
|
|
|
|
|
if($avp(s:sst_min_timer) == $null)
|
|
|
|
|
{
|
|
|
|
|
$(avp(s:sst_min_timer)[*]) = [% sems.sbc.session_timer.min_timer %];
|
|
|
|
|
}
|
|
|
|
|
avp_copy("$avp(s:sst_min_timer)", "$avp(s:peer_caller_sst_min_timer)/d");
|
|
|
|
|
if($avp(s:sst_max_timer) == $null)
|
|
|
|
|
{
|
|
|
|
|
$(avp(s:sst_max_timer)[*]) = [% sems.sbc.session_timer.max_timer %];
|
|
|
|
|
}
|
|
|
|
|
avp_copy("$avp(s:sst_max_timer)", "$avp(s:peer_caller_sst_max_timer)/d");
|
|
|
|
|
if($avp(s:sst_refresh_method) == $null)
|
|
|
|
|
{
|
|
|
|
|
$(avp(s:sst_refresh_method)[*]) = "UPDATE_FALLBACK_INVITE";
|
|
|
|
|
}
|
|
|
|
|
avp_copy("$avp(s:sst_refresh_method)", "$avp(s:peer_caller_sst_refresh_method)/d");
|
|
|
|
|
|
|
|
|
|
# explicitely clear them as they're reloaded later
|
|
|
|
|
$(avp(s:outbound_from_display)[*]) = $null;
|
|
|
|
@ -631,19 +626,14 @@ route[ROUTE_LOAD_CALLER_PREF]
|
|
|
|
|
|
|
|
|
|
avp_copy("$avp(s:force_outbound_calls_to_peer)", "$avp(s:caller_dom_force_outbound_calls_to_peer)/d");
|
|
|
|
|
|
|
|
|
|
avp_copy("$avp(s:concurrent_max)", "$avp(s:caller_dom_concurrent_max)/d");
|
|
|
|
|
avp_copy("$avp(s:concurrent_max_out)", "$avp(s:caller_dom_concurrent_max_out)/d");
|
|
|
|
|
avp_copy("$avp(s:concurrent_max_per_account)", "$avp(s:caller_dom_concurrent_max_per_account)/d");
|
|
|
|
|
avp_copy("$avp(s:concurrent_max_out_per_account)", "$avp(s:caller_dom_concurrent_max_out_per_account)/d");
|
|
|
|
|
|
|
|
|
|
avp_copy("$avp(s:inbound_upn)", "$avp(s:caller_dom_inbound_upn)/d");
|
|
|
|
|
avp_copy("$avp(s:inbound_upn)", "$avp(s:caller_dom_inbound_upn)/d");
|
|
|
|
|
avp_copy("$avp(s:inbound_uprn)", "$avp(s:caller_dom_inbound_uprn)/d");
|
|
|
|
|
avp_copy("$avp(s:extension_in_npn)", "$avp(s:caller_dom_extension_in_npn)/d");
|
|
|
|
|
|
|
|
|
|
avp_copy("$avp(s:rewrite_caller_in_dpid)", "$avp(s:caller_dp_dom_caller_in)/d");
|
|
|
|
|
avp_copy("$avp(s:rewrite_callee_in_dpid)", "$avp(s:caller_dp_dom_callee_in)/d");
|
|
|
|
|
avp_delete("$avp(s:rewrite_caller_out_dpid)/g");
|
|
|
|
|
avp_delete("$avp(s:rewrite_callee_out_dpid)/g");
|
|
|
|
|
avp_copy("$avp(s:rewrite_callee_in_dpid)", "$avp(s:caller_dp_dom_callee_in)/d");
|
|
|
|
|
avp_delete("$avp(s:rewrite_caller_out_dpid)/g");
|
|
|
|
|
avp_delete("$avp(s:rewrite_callee_out_dpid)/g");
|
|
|
|
|
|
|
|
|
|
avp_copy("$avp(s:ipv46_for_rtpproxy)", "$avp(s:caller_dom_ipv46_for_rtpproxy)/d");
|
|
|
|
|
|
|
|
|
@ -917,41 +907,6 @@ route[ROUTE_LOAD_CALLER_PREF]
|
|
|
|
|
}
|
|
|
|
|
#!endif
|
|
|
|
|
|
|
|
|
|
#manwe: put this at the end of caller preferences for the moment
|
|
|
|
|
avp_copy("$avp(s:concurrent_max)", "$avp(s:caller_concurrent_max)/d");
|
|
|
|
|
avp_copy("$avp(s:concurrent_max_out)", "$avp(s:caller_concurrent_max_out)/d");
|
|
|
|
|
avp_copy("$avp(s:concurrent_max_per_account)", "$avp(s:caller_concurrent_max_per_account)/d");
|
|
|
|
|
avp_copy("$avp(s:concurrent_max_out_per_account)", "$avp(s:caller_concurrent_max_out_per_account)/d");
|
|
|
|
|
|
|
|
|
|
if($avp(s:caller_concurrent_max) == $null || $avp(s:caller_concurrent_max) == 0)
|
|
|
|
|
{
|
|
|
|
|
if($avp(s:caller_dom_concurrent_max) != $null && $avp(s:caller_dom_concurrent_max) != 0)
|
|
|
|
|
{
|
|
|
|
|
$(avp(s:caller_concurrent_max)[*]) = $avp(s:caller_dom_concurrent_max);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if($avp(s:caller_concurrent_max_out) == $null || $avp(s:caller_concurrent_max_out) == 0)
|
|
|
|
|
{
|
|
|
|
|
if($avp(s:caller_dom_concurrent_max_out) != $null && $avp(s:caller_dom_concurrent_max_out) != 0)
|
|
|
|
|
{
|
|
|
|
|
$(avp(s:caller_concurrent_max_out)[*]) = $avp(s:caller_dom_concurrent_max_out);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if($avp(s:caller_concurrent_max_per_account) == $null || $avp(s:caller_concurrent_max_per_account) == 0)
|
|
|
|
|
{
|
|
|
|
|
if($avp(s:caller_dom_concurrent_max_per_account) != $null && $avp(s:caller_dom_concurrent_max_per_account) != 0)
|
|
|
|
|
{
|
|
|
|
|
$(avp(s:caller_concurrent_max_per_account)[*]) = $avp(s:caller_dom_concurrent_max_per_account);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if($avp(s:caller_concurrent_max_out_per_account) == $null || $avp(s:caller_concurrent_max_out_per_account) == 0)
|
|
|
|
|
{
|
|
|
|
|
if($avp(s:caller_dom_concurrent_max_out_per_account) != $null && $avp(s:caller_dom_concurrent_max_out_per_account) != 0)
|
|
|
|
|
{
|
|
|
|
|
$(avp(s:caller_concurrent_max_out_per_account)[*]) = $avp(s:caller_dom_concurrent_max_out_per_account);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
avp_copy("$avp(s:sst_enable)", "$avp(s:caller_sst_enable)/d");
|
|
|
|
|
if($avp(s:caller_sst_enable) == $null)
|
|
|
|
|
{
|
|
|
|
@ -1039,10 +994,7 @@ route[ROUTE_LOAD_CALLEE_PREF]
|
|
|
|
|
# load domain specific avps
|
|
|
|
|
avp_db_load("$ru/domain", "*/dom_preferences");
|
|
|
|
|
avp_copy("$avp(s:cc)", "$avp(s:callee_cc)/d");
|
|
|
|
|
avp_copy("$avp(s:concurrent_max)", "$avp(s:callee_dom_concurrent_max)/d");
|
|
|
|
|
$(avp(s:concurrent_max_out)[*]) = $null;
|
|
|
|
|
avp_copy("$avp(s:concurrent_max_per_account)", "$avp(s:callee_dom_concurrent_max_per_account)/d");
|
|
|
|
|
$(avp(s:concurrent_max_out_per_account)[*]) = $null;
|
|
|
|
|
|
|
|
|
|
avp_copy("$avp(s:force_inbound_calls_to_peer)", "$avp(s:callee_dom_force_inbound_calls_to_peer)/d");
|
|
|
|
|
|
|
|
|
|
avp_copy("$avp(s:rewrite_caller_out_dpid)", "$avp(s:callee_dp_dom_caller_out)/d");
|
|
|
|
@ -1099,25 +1051,7 @@ route[ROUTE_LOAD_CALLEE_PREF]
|
|
|
|
|
avp_copy("$avp(s:peer_auth_pass)", "$avp(s:callee_peer_auth_pass)/d");
|
|
|
|
|
avp_copy("$avp(s:peer_auth_realm)", "$avp(s:callee_peer_auth_realm)/d");
|
|
|
|
|
|
|
|
|
|
avp_copy("$avp(s:concurrent_max)", "$avp(s:callee_concurrent_max)/d");
|
|
|
|
|
if($avp(s:callee_concurrent_max) == $null || $avp(s:callee_concurrent_max) == 0)
|
|
|
|
|
{
|
|
|
|
|
if($avp(s:callee_dom_concurrent_max) != $null && $avp(s:callee_dom_concurrent_max) != 0)
|
|
|
|
|
{
|
|
|
|
|
$(avp(s:callee_concurrent_max)[*]) = $avp(s:callee_dom_concurrent_max);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
$(avp(s:concurrent_max_out)[*]) = $null;
|
|
|
|
|
avp_copy("$avp(s:concurrent_max_per_account)", "$avp(s:callee_concurrent_max_per_account)/d");
|
|
|
|
|
if($avp(s:callee_concurrent_max_per_account) == $null || $avp(s:callee_concurrent_max_per_account) == 0)
|
|
|
|
|
{
|
|
|
|
|
if($avp(s:callee_dom_concurrent_max_per_account) != $null && $avp(s:callee_dom_concurrent_max_per_account) != 0)
|
|
|
|
|
{
|
|
|
|
|
$(avp(s:callee_concurrent_max_per_account)[*]) = $avp(s:callee_dom_concurrent_max_per_account);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
$(avp(s:concurrent_max_out_per_account)[*]) = $null;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
avp_copy("$avp(s:sound_set)", "$avp(s:callee_sound_set)/d");
|
|
|
|
|
if($avp(s:callee_sound_set) == $null && $avp(s:callee_dom_sound_set) != $null)
|
|
|
|
|
{
|
|
|
|
@ -1275,11 +1209,11 @@ route[ROUTE_LOAD_CALLEE_PREF]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# dialog count for callee subscriber/dom concurrent max
|
|
|
|
|
if($avp(s:callee_concurrent_max) != $null && $avp(s:callee_concurrent_max) != 0)
|
|
|
|
|
if($xavp(callee_real_prefs=>concurrent_max) != $null && $xavp(callee_real_prefs=>concurrent_max) != 0)
|
|
|
|
|
{
|
|
|
|
|
if(get_profile_size("user","$avp(s:callee_uuid)","$avp(s:size)"))
|
|
|
|
|
{
|
|
|
|
|
if ($avp(s:size) > $avp(s:callee_concurrent_max))
|
|
|
|
|
if ($avp(s:size) > $xavp(callee_real_prefs=>concurrent_max))
|
|
|
|
|
{
|
|
|
|
|
xlog("L_INFO", "Concurrent max calls exceeded for callee '$avp(s:callee_uuid)' - [% logreq -%]\n");
|
|
|
|
|
route(ROUTE_ACC_FAILURE);
|
|
|
|
@ -1293,11 +1227,11 @@ route[ROUTE_LOAD_CALLEE_PREF]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
# dialog count for callee subscriber/dom concurrent max per account
|
|
|
|
|
if($avp(s:callee_concurrent_max_per_account) != $null && $avp(s:callee_concurrent_max_per_account) != 0)
|
|
|
|
|
if($xavp(callee_real_prefs=>concurrent_max_per_account) != $null && $xavp(callee_real_prefs=>concurrent_max_per_account) != 0)
|
|
|
|
|
{
|
|
|
|
|
if(get_profile_size("account","$avp(s:callee_account_id)","$avp(s:size)"))
|
|
|
|
|
{
|
|
|
|
|
if ($avp(s:size) > $avp(s:callee_concurrent_max_per_account))
|
|
|
|
|
if ($avp(s:size) > $xavp(callee_real_prefs=>concurrent_max_per_account))
|
|
|
|
|
{
|
|
|
|
|
xlog("L_INFO", "Concurrent max calls per account exceeded for callee '$avp(s:callee_uuid)' in account '$avp(s:callee_account_id)' - [% logreq -%]\n");
|
|
|
|
|
route(ROUTE_ACC_FAILURE);
|
|
|
|
@ -2500,11 +2434,11 @@ route[ROUTE_FIND_CALLEE]
|
|
|
|
|
|
|
|
|
|
# Dialog count for caller. Need to check after emergency calls have been detected not to drop them.
|
|
|
|
|
# Dialog count caller subscriber/domain concurrent_max
|
|
|
|
|
if($avp(s:caller_concurrent_max) != $null && $avp(s:caller_concurrent_max) != 0)
|
|
|
|
|
if($xavp(caller_real_prefs=>concurrent_max) != $null && $xavp(caller_real_prefs=>concurrent_max) != 0)
|
|
|
|
|
{
|
|
|
|
|
if(get_profile_size("user","$avp(s:caller_uuid)","$avp(s:size)"))
|
|
|
|
|
{
|
|
|
|
|
if ($avp(s:size) > $avp(s:caller_concurrent_max))
|
|
|
|
|
if ($avp(s:size) > $xavp(caller_real_prefs=>concurrent_max))
|
|
|
|
|
{
|
|
|
|
|
xlog("L_INFO", "Concurrent_max calls exceeded for caller '$avp(s:caller_uuid)' - [% logreq -%]\n");
|
|
|
|
|
$avp(s:acc_callee_user_in) = $rU;
|
|
|
|
@ -2520,11 +2454,11 @@ route[ROUTE_FIND_CALLEE]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
# Dialog count caller subscriber/domain concurrent_max_out
|
|
|
|
|
if($avp(s:caller_concurrent_max_out) != $null && $avp(s:caller_concurrent_max_out) != 0)
|
|
|
|
|
if($xavp(caller_real_prefs=>concurrent_max_out) != $null && $xavp(caller_real_prefs=>concurrent_max_out) != 0)
|
|
|
|
|
{
|
|
|
|
|
if(get_profile_size("userout","$avp(s:caller_uuid)","$avp(s:size)"))
|
|
|
|
|
{
|
|
|
|
|
if ($avp(s:size) > $avp(s:caller_concurrent_max_out))
|
|
|
|
|
if ($avp(s:size) > $xavp(caller_real_prefs=>concurrent_max_out))
|
|
|
|
|
{
|
|
|
|
|
xlog("L_INFO", "Concurrent_max outbound calls exceeded for caller '$avp(s:caller_uuid)' - [% logreq -%]\n");
|
|
|
|
|
$avp(s:acc_callee_user_in) = $rU;
|
|
|
|
@ -2541,11 +2475,11 @@ route[ROUTE_FIND_CALLEE]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Dialog count caller subscriber/domain concurrent_max per account
|
|
|
|
|
if($avp(s:caller_concurrent_max_per_account) != $null && $avp(s:caller_concurrent_max_per_account) != 0)
|
|
|
|
|
if($xavp(caller_real_prefs=>concurrent_max_per_account) != $null && $xavp(caller_real_prefs=>concurrent_max_per_account) != 0)
|
|
|
|
|
{
|
|
|
|
|
if(get_profile_size("account","$avp(s:caller_account_id)","$avp(s:size)"))
|
|
|
|
|
{
|
|
|
|
|
if ($avp(s:size) > $avp(s:caller_concurrent_max_per_account))
|
|
|
|
|
if ($avp(s:size) > $xavp(caller_real_prefs=>concurrent_max_per_account))
|
|
|
|
|
{
|
|
|
|
|
xlog("L_INFO", "Concurrent_max calls per account exceeded for caller '$avp(s:caller_uuid)' in account '$avp(s:caller_account_id)' - [% logreq -%]\n");
|
|
|
|
|
$avp(s:acc_callee_user_in) = $rU;
|
|
|
|
@ -2561,11 +2495,11 @@ route[ROUTE_FIND_CALLEE]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
# Dialog count caller subscriber/domain concurrent_max_out per account
|
|
|
|
|
if($avp(s:caller_concurrent_max_out_per_account) != $null && $avp(s:caller_concurrent_max_out_per_account) != 0)
|
|
|
|
|
if($xavp(caller_real_prefs=>concurrent_max_out_per_account) != $null && $xavp(caller_real_prefs=>concurrent_max_out_per_account) != 0)
|
|
|
|
|
{
|
|
|
|
|
if(get_profile_size("accountout","$avp(s:caller_account_id)","$avp(s:size)"))
|
|
|
|
|
{
|
|
|
|
|
if ($avp(s:size) > $avp(s:caller_concurrent_max_out_per_account))
|
|
|
|
|
if ($avp(s:size) > $xavp(caller_real_prefs=>concurrent_max_out_per_account))
|
|
|
|
|
{
|
|
|
|
|
xlog("L_INFO", "Concurrent_max outbound calls per account exceeded for caller '$avp(s:caller_uuid) in account '$avp(s:caller_account_id)' - [% logreq -%]\n");
|
|
|
|
|
$avp(s:acc_callee_user_in) = $rU;
|
|
|
|
@ -2582,11 +2516,11 @@ route[ROUTE_FIND_CALLEE]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Dialog count caller peer concurrent_max
|
|
|
|
|
if($avp(s:from_pstn) == 1 && $avp(s:caller_peer_concurrent_max) != $null && $avp(s:caller_peer_concurrent_max) != 0)
|
|
|
|
|
if($avp(s:from_pstn) == 1 && $xavp(caller_peer_prefs=>concurrent_max) != $null && $xavp(caller_peer_prefs=>concurrent_max) != 0)
|
|
|
|
|
{
|
|
|
|
|
if(get_profile_size("peer","$avp(s:lcr_flags)","$avp(s:size)"))
|
|
|
|
|
{
|
|
|
|
|
if ($avp(s:size) > $avp(s:caller_peer_concurrent_max))
|
|
|
|
|
if ($avp(s:size) > $xavp(caller_peer_prefs=>concurrent_max))
|
|
|
|
|
{
|
|
|
|
|
xlog("L_INFO", "Concurrent_max calls exceeded for peer '$avp(s:lcr_flags)' - [% logreq -%]\n");
|
|
|
|
|
$avp(s:acc_callee_user_in) = $rU;
|
|
|
|
@ -3720,12 +3654,12 @@ route[ROUTE_PSTN]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#Dialog handle callee peer concurrent_max
|
|
|
|
|
if($avp(s:peer_callee_concurrent_max) != $null && $avp(s:peer_callee_concurrent_max) != 0 && $avp(s:em_call) != 1)
|
|
|
|
|
if($xavp(callee_peer_prefs=>concurrent_max) != $null && $xavp(callee_peer_prefs=>concurrent_max) != 0 && $avp(s:em_call) != 1)
|
|
|
|
|
{
|
|
|
|
|
if(get_profile_size("peer","$avp(s:lcr_flags)","$avp(s:size)"))
|
|
|
|
|
{
|
|
|
|
|
#check greater or equal because the callee peer hasn't been marked yet
|
|
|
|
|
if ($avp(s:size) >= $avp(s:peer_callee_concurrent_max))
|
|
|
|
|
if ($avp(s:size) >= $xavp(callee_peer_prefs=>concurrent_max))
|
|
|
|
|
{
|
|
|
|
|
xlog("L_INFO", "Concurrent_max calls exceeded for peer '$avp(s:lcr_flags)' - [% logreq -%]\n");
|
|
|
|
|
$var(allow_peer) = 0;
|
|
|
|
@ -3733,12 +3667,12 @@ route[ROUTE_PSTN]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
#Dialog handle callee peer concurrent_max_out
|
|
|
|
|
if($avp(s:peer_callee_concurrent_max_out) != $null && $avp(s:peer_callee_concurrent_max_out) != 0 && $avp(s:em_call) != 1)
|
|
|
|
|
if($xavp(callee_peer_prefs=>concurrent_max_out) != $null && $xavp(callee_peer_prefs=>concurrent_max_out) != 0 && $avp(s:em_call) != 1)
|
|
|
|
|
{
|
|
|
|
|
if(get_profile_size("peerout","$avp(s:lcr_flags)","$avp(s:size)"))
|
|
|
|
|
{
|
|
|
|
|
#check greater or equal because the callee peerout hasn't been marked yet
|
|
|
|
|
if ($avp(s:size) >= $avp(s:peer_callee_concurrent_max_out))
|
|
|
|
|
if ($avp(s:size) >= $xavp(callee_peer_prefs=>concurrent_max_out))
|
|
|
|
|
{
|
|
|
|
|
xlog("L_INFO", "Concurrent_max_out calls exceeded for peer '$avp(s:lcr_flags)' - [% logreq -%]\n");
|
|
|
|
|
$var(allow_peer) = 0;
|
|
|
|
@ -4455,25 +4389,25 @@ failure_route[FAILURE_ROUTE_PSTN]
|
|
|
|
|
route(ROUTE_LOAD_PEER_OUT_PREF);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if($avp(s:peer_callee_concurrent_max) != $null && $avp(s:peer_callee_concurrent_max) != 0 && $avp(s:em_call) != 1)
|
|
|
|
|
if($xavp(callee_peer_prefs=>concurrent_max) != $null && $xavp(callee_peer_prefs=>concurrent_max) != 0 && $avp(s:em_call) != 1)
|
|
|
|
|
{
|
|
|
|
|
if(get_profile_size("peer","$avp(s:lcr_flags)","$avp(s:size)"))
|
|
|
|
|
{
|
|
|
|
|
if ($avp(s:size) >= $avp(s:peer_callee_concurrent_max))
|
|
|
|
|
if ($avp(s:size) >= $xavp(callee_peer_prefs=>concurrent_max))
|
|
|
|
|
{
|
|
|
|
|
xlog("L_INFO", "Concurrent_max calls exceeded for peer '$avp(s:lcr_flags)' - [% logreq -%]\n");
|
|
|
|
|
$var(allow_peer) = 0;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if($avp(s:peer_callee_concurrent_max_out) != $null && $avp(s:peer_callee_concurrent_max_out) != 0 && $avp(s:em_call) != 1)
|
|
|
|
|
if($xavp(callee_peer_prefs=>concurrent_max_out) != $null && $xavp(callee_peer_prefs=>concurrent_max_out) != 0 && $avp(s:em_call) != 1)
|
|
|
|
|
{
|
|
|
|
|
if(get_profile_size("peerout","$avp(s:lcr_flags)","$avp(s:size)"))
|
|
|
|
|
{
|
|
|
|
|
if ($avp(s:size) >= $avp(s:peer_callee_concurrent_max_out))
|
|
|
|
|
if ($avp(s:size) >= $xavp(callee_peer_prefs=>concurrent_max_out))
|
|
|
|
|
{
|
|
|
|
|
xlog("L_INFO", "Concurrent_max_out calls exceeded for peer '$avp(s:lcr_flags)' - [% logreq -%]\n");
|
|
|
|
|
$var(allow_peer) = 0;
|
|
|
|
|
$var(allow_peer) = 0;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|