[OpenSIPS-Users] Multi domain registration.

Chris Maciejewski chris at wima.co.uk
Sat Sep 12 23:25:50 CEST 2009


OK. Indeed www_authorize("$td", "subscriber") wasn't best idea :-(
as it is the same as  www_authorize("", "subscriber") anyway
(according to documentation).

What I am trying to achieve is:

with the following records in subscriber table:
| username  |     domain      |  password
|    10000    |  sip1.domain  |     secret1
|    10001    |  sip2.domain  |     secret2

at the moment user 10000 will successfully register sending the
following REGISTER:

      REGISTER sip:sip2.domain SIP/2.0.
      Via: SIP/2.0/UDP 10.10.10.1:5060;rport;branch=z9hG4bK-27485
      From: <sip:10000 at sip2.domain>;tag=1
      To: <sip:10000 at sip2.domain>
      Call-ID: 1234 at 10.10.10.1
      CSeq: 1 REGISTER
      Contact: <sip:10000 at 10.10.10.1:5060>

What I want, is to restrict user 10000 to domain sip1.domain only and
user 10001 to sip2.domain only.

So if user 10000 will send REGISTER to sip2.domain OpenSIPs will
always reply 401 Unauthorized,
and if user 10001 will send REGISTER to sip1.domain OpenSIPs will
always reply 401 Unauthorized.

Regards,
Chris


2009/9/12 Iñaki Baz Castillo <ibc at aliax.net>:
> El Sábado, 12 de Septiembre de 2009, Chris Maciejewski escribió:
>> if (!www_authorize("$td", "subscriber"))
>
> Why the f*** do you do that????
> Please, read the "www_authorize()" documentation instead of invent how to use
> it and complain because it doesn't work.
>
> --
> Iñaki Baz Castillo <ibc at aliax.net>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>



More information about the Users mailing list