Browse Source

fast pickup for *5, looks into *3

4.3
lazedo 7 years ago
committed by Luis Azedo
parent
commit
5437a8e86d
1 changed files with 10 additions and 1 deletions
  1. +10
    -1
      kamailio/fast-pickup-role.cfg

+ 10
- 1
kamailio/fast-pickup-role.cfg View File

@ -97,6 +97,15 @@ route[FAST_PICKUP_ATTEMPT]
} }
##### CALL-PARK #### ##### CALL-PARK ####
if($(ru{uri.user}) =~ "\*5") {
$var(park) = $_s(*3$(ru{uri.user}{s.substr,2,0})@$(ru{uri.domain}));
if($sht(park=>$var(park)) != $null) {
$du = $sht(park=>$var(park));
xlog("L_INFO", "$ci|log|redirecting park request to $du\n");
route(EXTERNAL_TO_INTERNAL_RELAY);
exit();
}
}
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}));
xlog("L_INFO", "$ci|log|redirecting park request to $du\n"); xlog("L_INFO", "$ci|log|redirecting park request to $du\n");
@ -105,7 +114,7 @@ route[FAST_PICKUP_ATTEMPT]
} }
##### CALL-PARK IN KAZOO #### ##### CALL-PARK IN KAZOO ####
if($(ru{uri.user}) =~ "\*[3-4]" && !($rd =~ "[0-9]{1,3}\.[0-9]{1,3}.[0-9]{1,3}\.[0-9]{1,3}") ) {
if($(ru{uri.user}) =~ "\*[3,5]" && !($rd =~ "[0-9]{1,3}\.[0-9]{1,3}.[0-9]{1,3}\.[0-9]{1,3}") ) {
xlog("L_INFO", "$ci|log|checking park request to $(ru{uri.user})@$(ru{uri.domain})\n"); xlog("L_INFO", "$ci|log|checking park request to $(ru{uri.user})@$(ru{uri.domain})\n");
$var(amqp_payload_request) = '{"Event-Category" : "call_event" , "Event-Name" : "query_user_channels_req", "Username" : "$(ru{uri.user})", "Realm" : "$(ru{uri.domain})", "Active-Only" : true }'; $var(amqp_payload_request) = '{"Event-Category" : "call_event" , "Event-Name" : "query_user_channels_req", "Username" : "$(ru{uri.user})", "Realm" : "$(ru{uri.domain})", "Active-Only" : true }';
$var(amqp_routing_key) = "call.status_req." + $(var(replaced_call_id){kz.encode}); $var(amqp_routing_key) = "call.status_req." + $(var(replaced_call_id){kz.encode});


Loading…
Cancel
Save