OpenSIPS subscribers can be members of groups. There is a module called Group
. This module implements a table called grp
. It is also possible to use regular expression groups, but this is beyond the scope of the tool. In the OpenSIPS script, you can check whether a user is a member of a group or not using the db_is_user_in(uri,group)
function. This mechanism is often used to implement ACLs limiting the destinations dialed by a specific user. You will see more of this in Chapter 7, Dialplan and Routing. For now, let's just understand how to make the subscribers members of a group.
Let's configure the groups that we will use in the training:
Group |
Description |
---|---|
VoIP |
Makes calls only to VoIP destinations |
LOCAL |
Makes calls to local destinations |
LD |
Makes calls to long-distance destinations |
INT |
Makes calls to international destinations |
To create these groups, let's edit the configuration file for the CP and add the groups:
Edit the configuration...