Browse Source

Merge pull request #8 from 2600hz/KAZOO-2411-master

KAZOO-2411-master: add check for invite type
KAZOO-5650
bitbashing 9 years ago
committed by GitHub
parent
commit
e3a7dab2a0
1 changed files with 9 additions and 8 deletions
  1. +9
    -8
      kamailio/default.cfg

+ 9
- 8
kamailio/default.cfg View File

@ -604,7 +604,15 @@ route[INTERNAL_TO_EXTERNAL_RELAY]
#!ifdef REGISTRAR_ROLE
if ($hdr(X-KAZOO-AOR) != $null) {
xlog("L_INFO", "$ci|log|using AOR $hdr(X-KAZOO-AOR)\n");
if (reg_fetch_contacts("location", "$hdr(X-KAZOO-AOR)", "callee")) {
if ($hdr(X-KAZOO-INVITE-FORMAT) == "contact") {
if(lookup("location", "$hdr(X-KAZOO-AOR)") > 0){
xlog("L_INFO", "$ci|end|routing to contact $ru\n");
} else {
xlog("L_INFO", "$ci|end|lookup for AOR $hdr(X-KAZOO-AOR) failed\n");
sl_send_reply("404", "Not registered");
exit;
}
} else if (reg_fetch_contacts("location", "$hdr(X-KAZOO-AOR)", "callee")) {
$du = $(ulc(callee=>received));
$fs = $(ulc(callee=>socket));
xlog("L_INFO", "$ci|log|routing $hdr(X-KAZOO-AOR) to $du via $fs\n");
@ -617,13 +625,6 @@ route[INTERNAL_TO_EXTERNAL_RELAY]
#!endif
remove_hf_re("^X-.*");
if( $avp(kazoo_aor) != $null)
{
$du = $avp(kazoo_du);
xlog("L_INFO", "$ci|end|routing to $ruid : AOR : $avp(kazoo_aor)\n");
}
t_on_reply("EXTERNAL_REPLY");


Loading…
Cancel
Save