|
|
|
@ -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"); |
|
|
|
|
|
|
|
|