[Serusers] ceratins users to one gateway others to another

Andreas Granig andreas.granig at inode.info
Fri Sep 16 10:45:38 CEST 2005


Nhadie wrote:
> Hi All,
> 
> Can I have some extensions use gateway 1 and some can use gateway 2?
> I want to do this for clients that pay premium they have unlimited calls 
> for free on a certain onuntry and others will still go to the per minute 
> basis.
> Can I set this up on groups?

Yes, you could create a group "premium" and use something like

   if(is_user_in("credentials", "premium")) {
     rewritehostport("gw1", "5060");
   }
   else {
     rewritehostport("gw2", "5060");
   }
   t_relay();

and add users to the "premium" group using

   serctl acl grant <user> premium

Andy




More information about the sr-users mailing list