[OpenSIPS-Users] Check_from and dbaliases

Sergio Gutierrez saguti at gmail.com
Fri Nov 7 13:05:51 CET 2008


Hi Carlo.

check_from() is a function from uri_db module which compares From
Username against Digest when its parameter use_uri_table is 0 (default
behaviour).

For your case, I think you would need, beside aliases, to enable uri_db
module, using uri_table, to define 1000 as an "authentication alias" for
user1.

You could refer to
http://www.opensips.org/html/docs/modules/1.4.x/uri_db.html#id2514821 for
more information.

Best regards.

Sergio Gutierrez.

On 11/7/08, Carlo Dimaggio <jaasmailing at gmail.com> wrote:
>
> Hi
>
> I have 2 users registered: user1 at domain and user2 at domain with one
> alias (in db) 1000 at domain configured for user1 at domain.
> In the configuration I use the check_from() function for security
> reason:
>
>             if(method=="INVITE" && (!allow_trusted())) {
>                 if (!proxy_authorize("","subscriber")) {
>                         proxy_challenge("","1");
>                         exit;
>                 } else if (!check_from()) {
>                         sl_send_reply("403", "Forbidden, use From=ID");
>                         exit;
>                 };
>             };
>
> When I call 1000 at domain from user2 at domain and then 1000 at domain
> perform an hold (or a transfer), the script exit (hangup) because it
> doesn't validate the user since From username
> (1000 at domain) and auth username (user1 at domain) are differents.
>
> How can I avoid this? I would use another function to check From
> username in the dbaliases table but I don't find any useful function...
>
>
> Thank you,
> Carlo
>
> _______________________________________________
> 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/20081107/2b86496c/attachment.htm 


More information about the Users mailing list