|
|
@ -480,4 +480,32 @@ event_route[usrloc:contact-expired] |
|
|
#!include_file "registrar-sync-role.cfg" |
|
|
#!include_file "registrar-sync-role.cfg" |
|
|
#!endif |
|
|
#!endif |
|
|
|
|
|
|
|
|
|
|
|
route[REGISTRAR_ROUTE_TO_AOR] |
|
|
|
|
|
{ |
|
|
|
|
|
if ($hdr(X-KAZOO-AOR) == $null) { |
|
|
|
|
|
return(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
xlog("L_INFO", "$ci|log|using AOR $hdr(X-KAZOO-AOR)\n"); |
|
|
|
|
|
setflag(FLAG_AOR); |
|
|
|
|
|
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"); |
|
|
|
|
|
handle_ruri_alias(); |
|
|
|
|
|
} else { |
|
|
|
|
|
xlog("L_INFO", "$ci|end|lookup for AOR $hdr(X-KAZOO-AOR) failed\n"); |
|
|
|
|
|
sl_send_reply("410", "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"); |
|
|
|
|
|
} else { |
|
|
|
|
|
xlog("L_INFO", "$ci|end|user is not registered\n"); |
|
|
|
|
|
sl_send_reply("410", "Not registered"); |
|
|
|
|
|
exit; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
# vim: tabstop=4 softtabstop=4 shiftwidth=4 expandtab |
|
|
# vim: tabstop=4 softtabstop=4 shiftwidth=4 expandtab |