Browse Source

KAZOO-3308 call-park enabled

3.20
lazedo 11 years ago
parent
commit
1cba6cade5
3 changed files with 2 additions and 10 deletions
  1. +2
    -4
      kamailio/default.cfg
  2. +0
    -5
      kamailio/dispatcher-role.cfg
  3. +0
    -1
      kamailio/local.cfg

+ 2
- 4
kamailio/default.cfg View File

@ -530,13 +530,12 @@ route[EXTERNAL_TO_INTERNAL_RELAY]
} }
#!endif #!endif
#!ifdef CALL-PARK-REDIRECT-ROLE
##### CALL-PARK ####
if(is_method("REFER")) { if(is_method("REFER")) {
$avp(refer_to) = $hdr(Refer-To); $avp(refer_to) = $hdr(Refer-To);
$avp(refer_to_uri) = $rt; $avp(refer_to_uri) = $rt;
$avp(referred_by) = $hdr(Referred-By); $avp(referred_by) = $hdr(Referred-By);
} }
#!endif
remove_hf_re("^X-.*"); remove_hf_re("^X-.*");
append_hf("X-AUTH-IP: $si\r\n"); append_hf("X-AUTH-IP: $si\r\n");
@ -586,12 +585,11 @@ onreply_route[INTERNAL_REPLY]
setflag(FLAG_SESSION_PROGRESS); setflag(FLAG_SESSION_PROGRESS);
} }
#!ifdef CALL-PARK-REDIRECT-ROLE
##### CALL-PARK ####
if (is_method("REFER") && $T_reply_code == "202" ) { if (is_method("REFER") && $T_reply_code == "202" ) {
$sht(park=>$(avp(refer_to_uri){uri.user})@$(avp(refer_to_uri){uri.domain})) = "sip:" + $(ct{tobody.uri}{uri.host}) + ":" + $(ct{tobody.uri}{uri.port}); $sht(park=>$(avp(refer_to_uri){uri.user})@$(avp(refer_to_uri){uri.domain})) = "sip:" + $(ct{tobody.uri}{uri.host}) + ":" + $(ct{tobody.uri}{uri.port});
xlog("L_INFO", "PARK $(avp(refer_to_uri){uri.user})@$(avp(refer_to_uri){uri.domain}) = sip:$(ct{tobody.uri}{uri.host}):$(ct{tobody.uri}{uri.port})"); xlog("L_INFO", "PARK $(avp(refer_to_uri){uri.user})@$(avp(refer_to_uri){uri.domain}) = sip:$(ct{tobody.uri}{uri.host}):$(ct{tobody.uri}{uri.port})");
} }
#!endif
if ($rs < 300) { if ($rs < 300) {
xlog("L_INFO", "$ci|pass|$T_req($si):$T_req($sp)"); xlog("L_INFO", "$ci|pass|$T_req($si):$T_req($sp)");


+ 0
- 5
kamailio/dispatcher-role.cfg View File

@ -1,9 +1,6 @@
######## Generic Hash Table container in shared memory ######## ######## Generic Hash Table container in shared memory ########
modparam("htable", "htable", "failover=>size=16;autoexpire=120") modparam("htable", "htable", "failover=>size=16;autoexpire=120")
#!ifdef CALL-PARK-REDIRECT-ROLE
modparam("htable", "htable", "park=>size=4;autoexpire=600") modparam("htable", "htable", "park=>size=4;autoexpire=600")
#!endif
####### Dispatcher module ######## ####### Dispatcher module ########
loadmodule "dispatcher.so" loadmodule "dispatcher.so"
@ -89,14 +86,12 @@ route[DISPATCHER_FIND_ROUTES]
} }
##### CALL-PARK #### ##### CALL-PARK ####
#!ifdef CALL-PARK-REDIRECT-ROLE
if($(ru{uri.user}) =~ "\*3" && $sht(park=>$(ru{uri.user})@$(ru{uri.domain})) != $null) { if($(ru{uri.user}) =~ "\*3" && $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}));
$sht(park=>$(ru{uri.user})@$(ruri{uri.domain})) = $null; $sht(park=>$(ru{uri.user})@$(ruri{uri.domain})) = $null;
xlog("L_INFO", "$ci|log|redirecting park request to $du"); xlog("L_INFO", "$ci|log|redirecting park request to $du");
return; return;
} }
#!endif
} }


+ 0
- 1
kamailio/local.cfg View File

@ -18,7 +18,6 @@ debug = L_INFO
# # #!trydef TLS-ROLE # # #!trydef TLS-ROLE
# # #!trydef ANTIFLOOD-ROLE # # #!trydef ANTIFLOOD-ROLE
# # #!trydef MESSAGE-ROLE # # #!trydef MESSAGE-ROLE
# # #!trydef CALL-PARK-REDIRECT-ROLE
################################################################################ ################################################################################
## SERVER INFORMATION ## SERVER INFORMATION


Loading…
Cancel
Save