[OpenSIPS-Users] Uac registrant check

Bogdan-Andrei Iancu bogdan at opensips.org
Tue Jul 25 05:40:10 EDT 2017


Hi Volkan,

I think you are looking for the is_registered() function:
http://www.opensips.org/html/docs/modules/2.2.x/registrar.html#idp5648928

Regards,

Bogdan-Andrei Iancu
   OpenSIPS Founder and Developer
   http://www.opensips-solutions.com

OpenSIPS Bootcamp 2017, Houston, US
   http://opensips.org/training/OpenSIPS_Bootcamp_2017.html

On 07/21/2017 12:34 PM, Volkan Oransoy wrote:
> Hi all,
>
> 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?
>
>
>        if ( check_source_address("1","$avp(trunk_attrs)") ) {
>                 # request comes from trunks
>                 setflag(IS_TRUNK);
>         } else if ( is_from_gw() ) {
>                 # request comes from GWs
> *        } else if ( lookup("location","","$ru") ){*
> *      xlog("Location check for $ru passed.\n");*
>         } else {
>                 xlog("Location check for $ru failed.\n");
>                 send_reply("403","Forbidden");
>                 exit;
>         }
>
> Regards,
>
> /Volkan
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20170725/02735b4b/attachment.html>


More information about the Users mailing list