[OpenSIPS-Users] grp, and dr_grp

Nick Khamis symack at gmail.com
Fri Dec 16 02:45:50 CET 2011


I am just trying to understand how to assign a specific group to
specific dialplans, and having a hard time
getting it right. Maybe an example?

grp Table
+----+----------+----------------------+-------------+---------------------+
| id | username | domain               | grp         | last_modified       |
+----+----------+----------------------+-------------+---------------------+
| 38 | 1001     | opensips1.test.com | Local Group | 2011-12-15 20:21:24 |
+----+----------+----------------------+-------------+---------------------+
| 39 | 1002     | opensips1.test.com | Local Group | 2011-12-15 20:21:24 |
+----+----------+----------------------+-------------+---------------------+
| 40 | 1003     | opensips1.test.com | Local Group | 2011-12-15 20:21:24 |
+----+----------+----------------------+-------------+---------------------+


The username, and domain field is my first confusion. For some reason
I would think the this table
would have a subscriber_id that is a foreign key to the subsriber
table? This would be "group table",
and name would be something like "Local Group", "VoiceMail Group"....

dr_groups Table

+----+----------+----------------------+---------+----------------+
| id | username | domain               | groupid | description    |
+----+----------+----------------------+---------+----------------+
| 42 | 1001     | opensips1.test.com |       0 | Access Granted |
+----+----------+----------------------+---------+----------------+
| 43 | 1002     | opensips1.test.com |       0 | Access Granted |
+----+----------+----------------------+---------+----------------+
| 43 | 1003     | opensips1.test.com |       0 | Access Granted |
+----+----------+----------------------+---------+----------------+


Same table?

dr_rules;
+--------+---------+--------+---------+----------+---------+--------+-------+--------------------+
| ruleid | groupid | prefix | timerec | priority | routeid | gwlist |
attrs | description        |
+--------+---------+--------+---------+----------+---------+--------+-------+--------------------+
|     16 | 0       |        |         |        1 | 0       | 9      |
yes   | ASTCluster Gateway |
+--------+---------+--------+---------+----------+---------+--------+-------+--------------------+

Is the groupid field of this table a FK to the grp or dr_groups table?

dialplan;
+----+------+----+----------+----------------------------------+-----------+-----------+----------+-------+
| id | dpid | pr | match_op | match_exp                        |
match_len | subst_exp | repl_exp | attrs |
+----+------+----+----------+----------------------------------+-----------+-----------+----------+-------+
| 24 |    0 |  1 |        1 | ^[2-9][0-9]{6}.*                 |
  0 |           |          | local |
| 28 |    0 |  1 |        0 | *98                              |
  0 |           |          | voicmail |
| 29 |    1 |  1 |        0 | *98                              |
  0 |           |          | voicmail |
+----+------+----+----------+----------------------------------+-----------+-----------+----------+-------+

What I am trying to accomplish is:

Local Group (dpid 0)
        +
        | _ _ _ 1001 test.com password (From Subscriber)


VoiceMail Group (dpid 1)
        +
        | _ _ _ 1002 test.com password (From Subscriber)
       +
        | _ _ _ 1003 test.com password (From Subscriber)


Also, I would like to use this module to perform LCR (country code,
area code, rate etc..).
Is this possible instead of using the LCR module?

Thanks in Advance,

Nick.



More information about the Users mailing list