[OpenSIPS-Users] Check_from and dbaliases

Carlo Dimaggio jaasmailing at gmail.com
Fri Nov 7 12:50:33 CET 2008


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



More information about the Users mailing list