Browse Source

KAZOO-3840 allow pre-loaded routes for grandstream

3.20
lazedo 11 years ago
parent
commit
526f912683
1 changed files with 9 additions and 3 deletions
  1. +9
    -3
      kamailio/default.cfg

+ 9
- 3
kamailio/default.cfg View File

@ -517,9 +517,15 @@ route[PREPARE_INITIAL_REQUESTS]
} }
if (loose_route()) { 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 && ($ua =~ "Grandstream") ) {
xlog("L_INFO", "$ci|chk|allowing initial route-set for $Au");
} else {
xlog("L_WARN", "$ci|end|denying initial request with route-set");
sl_send_reply("403", "No pre-loaded routes");
exit();
}
} }
if (!is_method("MESSAGE")) { if (!is_method("MESSAGE")) {


Loading…
Cancel
Save