<div dir="ltr">Hello, I 'm new in kamailio.<br clear="all"><div><br></div><div>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. </div><div>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? :(</div><div>(sorry for my bad English)</div><div><br></div><div><br></div><div><div>route[LOCATION] {</div><div>#!ifdef WITH_SPEEDDIAL</div><div> # search for short dialing - 2-digit extension</div><div> if($rU=~"^[0-9][0-9]$") {</div><div> if(sd_lookup("speed_dial")) {</div><div> route(SIPOUT);</div><div> }</div><div> }</div><div>#!endif</div><div><br></div><div>#!ifdef WITH_ALIASDB</div><div> # search in DB-based aliases</div><div> if(alias_db_lookup("dbaliases")) {</div><div> route(SIPOUT);</div><div> }</div><div>#!endif</div><div> $avp(oexten) = $rU;</div></div><div><br></div><div><div> if (!lookup("location")) {</div><div> xwarn("method ($rm) r-uri ($ru)\n"); ################## HERE ##########################</div><div> $var(rc) = $rc;</div><div><br></div><div> route(TOVOICEMAIL);</div><div> t_newtran();</div><div> switch ($var(rc)) {</div><div> case -1:</div><div> case -3:</div><div> send_reply("404", "Not Found");</div><div> exit;</div><div> case -2:</div><div> send_reply("405", "Method Not Allowed");</div><div> exit;</div><div> }</div><div> }</div><div><br></div><div> # when routing via usrloc, log the missed calls also</div><div> if (is_method("INVITE")) {</div><div> setflag(FLT_ACCMISSED);</div><div> }</div><div><br></div><div> if(!ds_is_from_list()) {</div><div> route(DISPATCH);</div><div> }</div><div> route(RELAY);</div><div> exit;</div><div>}</div></div><div><br></div>-- <br><div class="gmail_signature">Aydar A. Kamalov</div>
</div>