[Serusers] is_uri_host_local

Greger V. Teigre greger at teigre.com
Thu Sep 1 07:10:41 CEST 2005


This is an example:
 # ----------------------------------------------------------------
 # Stop Open Relay Section
 # ----------------------------------------------------------------
 if (method=="INVITE") {
  # If this call does not originate from us and is not for a local user, we 
do not accept call
  if (!(is_from_local() || is_uri_host_local())) {
   sl_send_reply("403", "Please register to use our services");
   break;
  };
 };

If the table is populated properly.
g-)

Iqbal wrote:
> Hi
>
> Will this detect IP address also in the domain table, I have moved
> part of my setup to domain and IP mode, to support quintum boxes, but
> the call is failing on when I check
>
> else if (!is_from_local() && !is_uri_host_local()) {
>
>                sl_send_reply("403", "Please register to use our
>                service"); break;
>
> in my setup.
>
> The from part is not local, hence the is_from_local will fail, the
> is_uri_host_local should work since the RURI contains the Ip address
> of my proxy, normally it would contain the FQDN.
>
> Iqbal
>
> _______________________________________________
> Serusers mailing list
> serusers at lists.iptel.org
> http://lists.iptel.org/mailman/listinfo/serusers 




More information about the sr-users mailing list