|
|
|
@ -652,18 +652,16 @@ 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 ($hdr(X-KAZOO-INVITE-FORMAT) == "contact") { |
|
|
|
if(lookup("location", "$hdr(X-KAZOO-AOR)") > 0){ |
|
|
|
if (lookup("location", "$hdr(X-KAZOO-AOR)") > 0) { |
|
|
|
if ($hdr(X-KAZOO-INVITE-FORMAT) == "contact") { |
|
|
|
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"); |
|
|
|
reg_fetch_contacts("location", "$hdr(X-KAZOO-AOR)", "callee"); |
|
|
|
$du = $(ulc(callee=>received)); |
|
|
|
$fs = $(ulc(callee=>socket)); |
|
|
|
reg_free_contacts("callee"); |
|
|
|
xlog("L_INFO", "$ci|log|routing $hdr(X-KAZOO-AOR) to $du via $fs\n"); |
|
|
|
} |
|
|
|
} else if ($hdr(X-KAZOO-PUSHER-Token-ID) != $null) { |
|
|
|
xlog("L_INFO", "$ci|log|ignoring missing registration while waiting for push notification response\n"); |
|
|
|
t_on_reply("EXTERNAL_REPLY"); |
|
|
|
|