<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Hi all,</div><div class=""><br class=""></div><div class="">I use uac_registrant to register to remote SIP systems and registration phase seems ok. What I want to do is to receive calls from these systems and before accepting calls to my box, I want to check destination, if it is a valid record on my system. I found a couple of replies on list archives and one of them suggests to lookup agains AOR. But that doesn’t work right now. What is the most suitable way to do this?</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""> if ( check_source_address("1","$avp(trunk_attrs)") ) {</div><div class=""> # request comes from trunks</div><div class=""> setflag(IS_TRUNK);</div><div class=""> } else if ( is_from_gw() ) {</div><div class=""> # request comes from GWs</div><div class=""><b class=""><font color="#ff2600" class=""> } else if ( lookup("location","","$ru") ){</font></b></div><div class=""><b class=""><font color="#ff2600" class=""> xlog("Location check for $ru passed.\n");</font></b></div><div class=""> } else {</div><div class=""> xlog("Location check for $ru failed.\n");</div><div class=""> send_reply("403","Forbidden");</div><div class=""> exit;</div><div class=""> }</div><div class=""><br class=""></div><div class="">Regards,</div><div class=""><br class=""></div><div class="">/Volkan</div></body></html>