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:[email protected]>;tag=1
To: <sip:[email protected]>
Call-ID: [email protected]
CSeq: 1 REGISTER
Contact: <sip:[email protected]: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 <[email protected]>:
> 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 <[email protected]>
>
> _______________________________________________
> Users mailing list
> [email protected]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users