Hello, I 'm new in kamailio.
I have kamailio with dispatcher and two asterisks. Endpoints register to
kamailio. Calls beetwen endpoints going through dispatcher to asterisks.
Calls to other destination rejected by kamailio with 404.
But If i put xlog("AAAA") or xwarn in route[LOCATION] in if
(!lookup("location")) block (default kamailio 5.0.2 config) calls to other
destination goes through dispatcher to asterisks. I cant't understand WHY?
:(
(sorry for my bad English)
route[LOCATION] {
#!ifdef WITH_SPEEDDIAL
# search for short dialing - 2-digit extension
if($rU=~"^[0-9][0-9]$") {
if(sd_lookup("speed_dial")) {
route(SIPOUT);
}
}
#!endif
#!ifdef WITH_ALIASDB
# search in DB-based aliases
if(alias_db_lookup("dbaliases")) {
route(SIPOUT);
}
#!endif
$avp(oexten) = $rU;
if (!lookup("location")) {
xwarn("method ($rm) r-uri ($ru)\n"); ##################
HERE ##########################
$var(rc) = $rc;
route(TOVOICEMAIL);
t_newtran();
switch ($var(rc)) {
case -1:
case -3:
send_reply("404", "Not Found");
exit;
case -2:
send_reply("405", "Method Not
Allowed");
exit;
}
}
# when routing via usrloc, log the missed calls also
if (is_method("INVITE")) {
setflag(FLT_ACCMISSED);
}
if(!ds_is_from_list()) {
route(DISPATCH);
}
route(RELAY);
exit;
}
--
Aydar A. Kamalov