Browse Source

Merge branch 'KAZOO-3840-1' into 3.20

3.20
karl anderson 11 years ago
parent
commit
bb60dbbef9
2 changed files with 11 additions and 5 deletions
  1. +9
    -3
      kamailio/default.cfg
  2. +2
    -2
      kamailio/message-role.cfg

+ 9
- 3
kamailio/default.cfg View File

@ -517,9 +517,15 @@ route[PREPARE_INITIAL_REQUESTS]
}
if (loose_route()) {
xlog("L_WARN", "$ci|end|denying initial request with route-set");
sl_send_reply("403", "No pre-loaded routes");
exit();
$xavp(regcfg=>match_received) = $su;
$xavp(regcfg[0]=>match_contact) = $(ct{nameaddr.uri});
if(registered("location", "$rz:$Au", 6) == 1) {
xlog("L_INFO", "$ci|log|allowing initial route-set for $Au");
} else {
xlog("L_WARN", "$ci|end|dropping initial request with route-set");
sl_send_reply("403", "No pre-loaded routes");
exit();
}
}
if (!is_method("MESSAGE")) {


+ 2
- 2
kamailio/message-role.cfg View File

@ -39,8 +39,8 @@ onreply_route[MESSAGE_REPLY]
$var(Result) = "Success";
}
$var(Payload) = '{ "Event-Category" : "message", "Event-Name" : "delivery", "Call-ID" : "' + $(sht(msg=>$ci){kz.json,Call-ID}) + '", "Message-ID" : "' + $(sht(msg=>$ci){kz.json,Message-ID}) +'" , "Delivery-Result-Code" : "sip:" + $T_reply_code + '" , "Msg-ID" : "' + $(sht(msg=>$ci){kz.json,Msg-ID}) + '" , "Status" : "' + $var(Result) + '"}';
$var(Payload) = '{ "Event-Category" : "message", "Event-Name" : "delivery", "Call-ID" : "$(sht(msg=>$ci){kz.json,Call-ID})", "Message-ID" : "$(sht(msg=>$ci){kz.json,Message-ID})" , "Delivery-Result-Code" : "sip:$T_reply_code", "Msg-ID" : "$(sht(msg=>$ci){kz.json,Msg-ID})" , "Status" : "$var(Result)"}';
$var(RoutingKey) = $(sht(msg=>$ci){kz.json,Server-ID});
$var(exchange) = "targeted";
if($var(RoutingKey) == "") {


Loading…
Cancel
Save