|
|
@ -60,11 +60,11 @@ route[PRESENCE_FAST_PICKUP_ATTEMPT] |
|
|
route(PRESENCE_FAST_PICKUP_OPTION); |
|
|
route(PRESENCE_FAST_PICKUP_OPTION); |
|
|
$du = $sht(fp=>$var(md5)); |
|
|
$du = $sht(fp=>$var(md5)); |
|
|
append_hf("Replaces: $var(replaced_call_id)$var(Pickup)\r\n"); |
|
|
append_hf("Replaces: $var(replaced_call_id)$var(Pickup)\r\n"); |
|
|
|
|
|
append_hf("k-cid: $var(replaced_call_id)\r\n"); |
|
|
xlog("L_INFO", "$ci|log|fast|found shortcut for call-id $var(replaced_call_id) , redirecting ($(ru{uri.user})) to $du\n"); |
|
|
xlog("L_INFO", "$ci|log|fast|found shortcut for call-id $var(replaced_call_id) , redirecting ($(ru{uri.user})) to $du\n"); |
|
|
route(RELAY); |
|
|
route(RELAY); |
|
|
exit(); |
|
|
exit(); |
|
|
} else { |
|
|
} else { |
|
|
$var(replaced_call_id) = "none"; |
|
|
|
|
|
xlog("L_INFO", "$ci|log|fast|shortcut $var(md5) invalid in this server, using standard routing\n"); |
|
|
xlog("L_INFO", "$ci|log|fast|shortcut $var(md5) invalid in this server, using standard routing\n"); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
@ -88,6 +88,7 @@ route[PRESENCE_FAST_PICKUP_ATTEMPT] |
|
|
} |
|
|
} |
|
|
remove_hf_re("^Replaces"); |
|
|
remove_hf_re("^Replaces"); |
|
|
append_hf("Replaces: $var(rep)\r\n"); |
|
|
append_hf("Replaces: $var(rep)\r\n"); |
|
|
|
|
|
append_hf("k-cid: $var(replaced_call_id)\r\n"); |
|
|
xlog("L_INFO", "$ci|log|call-id $var(replaced_call_id) found, redirecting call ($(ru{uri.user})) to $du => $var(rep)\n"); |
|
|
xlog("L_INFO", "$ci|log|call-id $var(replaced_call_id) found, redirecting call ($(ru{uri.user})) to $du => $var(rep)\n"); |
|
|
route(RELAY); |
|
|
route(RELAY); |
|
|
exit(); |
|
|
exit(); |
|
|
@ -108,6 +109,7 @@ route[PRESENCE_FAST_PICKUP_ATTEMPT] |
|
|
$var(park) = $_s(*3$(ru{uri.user}{s.substr,2,0})@$(ru{uri.domain})); |
|
|
$var(park) = $_s(*3$(ru{uri.user}{s.substr,2,0})@$(ru{uri.domain})); |
|
|
if($sht(park=>$var(park)) != $null) { |
|
|
if($sht(park=>$var(park)) != $null) { |
|
|
$du = $sht(park=>$var(park)); |
|
|
$du = $sht(park=>$var(park)); |
|
|
|
|
|
append_hf("k-cid: $sht(park=>$var(park)::callid)\r\n"); |
|
|
xlog("L_INFO", "$ci|log|redirecting park request to $du , callid : $sht(park=>$var(park)::callid)\n"); |
|
|
xlog("L_INFO", "$ci|log|redirecting park request to $du , callid : $sht(park=>$var(park)::callid)\n"); |
|
|
route(RELAY); |
|
|
route(RELAY); |
|
|
exit(); |
|
|
exit(); |
|
|
@ -117,6 +119,7 @@ route[PRESENCE_FAST_PICKUP_ATTEMPT] |
|
|
|
|
|
|
|
|
if($sht(park=>$(ru{uri.user})@$(ru{uri.domain})) != $null) { |
|
|
if($sht(park=>$(ru{uri.user})@$(ru{uri.domain})) != $null) { |
|
|
$du = $sht(park=>$(ru{uri.user})@$(ruri{uri.domain})); |
|
|
$du = $sht(park=>$(ru{uri.user})@$(ruri{uri.domain})); |
|
|
|
|
|
append_hf("k-cid: $sht(park=>$(ru{uri.user})@$(ruri{uri.domain})::callid)\r\n"); |
|
|
xlog("L_INFO", "$ci|log|redirecting park request to $du, callid: $sht(park=>$(ru{uri.user})@$(ruri{uri.domain})::callid)\n"); |
|
|
xlog("L_INFO", "$ci|log|redirecting park request to $du, callid: $sht(park=>$(ru{uri.user})@$(ruri{uri.domain})::callid)\n"); |
|
|
route(RELAY); |
|
|
route(RELAY); |
|
|
exit(); |
|
|
exit(); |
|
|
@ -135,6 +138,7 @@ route[PRESENCE_FAST_PICKUP_ATTEMPT] |
|
|
$du = $(kzR{kz.json,Channels[0].switch_url}); |
|
|
$du = $(kzR{kz.json,Channels[0].switch_url}); |
|
|
if($du != $null) { |
|
|
if($du != $null) { |
|
|
xlog("L_INFO", "$ci|log|redirecting park request to $du from realtime query reply\n"); |
|
|
xlog("L_INFO", "$ci|log|redirecting park request to $du from realtime query reply\n"); |
|
|
|
|
|
append_hf("k-cid: $(kzR{kz.json,Channels[0].call_id})\r\n"); |
|
|
route(RELAY); |
|
|
route(RELAY); |
|
|
exit(); |
|
|
exit(); |
|
|
} |
|
|
} |
|
|
|