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