Hi,
Another alternative is to use a domain for each group. Before forwarding the call, check if they belong to the same domain. So you don't have to change the script every time you add a new group.
Thanks, Richard
--- Andreas Granig a.granig@inode.at wrote:
Sergio Diaz wrote:
Group marketing 8000,8001,8002
Group sales 9000,9001,9002
User 8000 can't call to User 9000 and viceversa,
marketing can't call to
group sales....
Maybe you should try something like this:
if (!proxy_authorize("your.domain", "subscriber")) { log(1, "No proxy authorization\n"); proxy_challenge("your.domain", "0"); break; };
if(!(uri=~"^sip:8[0-9]+@your.domain.*" && is_user_in("credentials", "marketing"))) { log(1, "Unpermitted call to marketing\n"); sl_send_reply("403", "Unpermitted call to marketing"); break; };
if(!(uri=~"^sip:9[0-9]+@your.domain.*" && is_user_in("credentials", "sales"))) { log(1, "Unpermitted call to sales\n"); sl_send_reply("403", "Unpermitted call to sales"); break; };
etc...
hth, Andy
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
__________________________________ Do you Yahoo!? Win a $20,000 Career Makeover at Yahoo! HotJobs http://hotjobs.sweepstakes.yahoo.com/careermakeover