<div>Here is an example from my test database</div>
<div> </div>
<div>Proxy02:~# opensipsctl db show grp | grep 9012732009<br>3 9012732009 <a href="http://irock.com">irock.com</a> int 2010-10-25 13:41:57<br>285 9012732009 <a href="http://irock.com">irock.com</a> ld 2011-03-24 19:35:01<br>
284 9012732009 <a href="http://irock.com">irock.com</a> local 2011-03-24 19:34:49</div>
<div> </div>
<div>Proxy02:~# opensipsctl db show grp | grep 9012732005<br>30 9012732005 <a href="http://coolbeans.com">coolbeans.com</a> int 2011-03-10 22:04:43<br>28 9012732005 <a href="http://coolbeans.com">coolbeans.com</a> ld 2011-03-10 22:04:27<br>
20 9012732005 <a href="http://coolbeans.com">coolbeans.com</a> local 2010-11-05 15:52:08</div>
<div> </div>
<div> </div>
<div>Thats just right. Your grp within the grp table is probably wrong.</div>
<div> </div>
<div>Once again for droute I have no experience.</div>
<div> </div>
<div><br> </div>
<div class="gmail_quote">On Thu, Dec 15, 2011 at 8:31 PM, Nick Khamis <span dir="ltr"><<a href="mailto:symack@gmail.com">symack@gmail.com</a>></span> wrote:<br>
<blockquote style="BORDER-LEFT:#ccc 1px solid;MARGIN:0px 0px 0px 0.8ex;PADDING-LEFT:1ex" class="gmail_quote">Thank you so much for your time Duane, and grp in that context makes<br>perfect sense however,<br>the username is really throwing me off. What I have now is:<br>
<div class="im"><br>+----+----------+----------------------+-------------+---------------------+<br>| id | username | domain | grp | last_modified |<br>+----+----------+----------------------+-------------+---------------------+<br>
</div>| 38 | 1001 | <a href="http://opensips1.test.com/" target="_blank">opensips1.test.com</a> | Local Group 1001 | 2011-12-15 20:21:24 |<br>+----+----------+----------------------+-------------+---------------------+<br>
| 39 | 1001 | <a href="http://opensips1.test.com/" target="_blank">opensips1.test.com</a> | LD Group 1001 | 2011-12-15 20:21:24 |<br>+----+----------+----------------------+-------------+---------------------+<br>| 40 | 1001 | <a href="http://opensips1.test.com/" target="_blank">opensips1.test.com</a> | INT Group 1001 | 2011-12-15 20:21:24 |<br>
+----+----------+----------------------+-------------+---------------------+<br>| 41 | 1002 | <a href="http://opensips1.test.com/" target="_blank">opensips1.test.com</a> | Local Group 1002 | 2011-12-15 20:21:24 |<br>+----+----------+----------------------+-------------+---------------------+<br>
| 42 | 1002 | <a href="http://opensips1.test.com/" target="_blank">opensips1.test.com</a> | LD Group 1002 | 2011-12-15 20:21:24 |<br>+----+----------+----------------------+-------------+---------------------+<br>| 43 | 1002 | <a href="http://opensips1.test.com/" target="_blank">opensips1.test.com</a> | LD Group 1002 | 2011-12-15 20:21:24 |<br>
+----+----------+----------------------+-------------+---------------------+<br><br>And that's just wrong...... As for droute, the grp table is not even used.<br><br>Kind Regards,<br><br>Nick.<br>
<div class="HOEnZb">
<div class="h5"><br><br><br><br><br>On Thu, Dec 15, 2011 at 9:12 PM, Duane Larson <<a href="mailto:duane.larson@gmail.com">duane.larson@gmail.com</a>> wrote:<br>> I can't help you when it comes to DR since I haven't had to work with it<br>
> yet. As for the grp you can think of it like the normal examples I have<br>> seen (group local is for users that will be allowed to make local calls,<br>> group ld is for users that can make long distance calls and group int are<br>
> for users that can make international calls). That's one way to use grp.<br>><br>> On Dec 15, 2011 7:46 PM, "Nick Khamis" <<a href="mailto:symack@gmail.com">symack@gmail.com</a>> wrote:<br>
>><br>>> I am just trying to understand how to assign a specific group to<br>>> specific dialplans, and having a hard time<br>>> getting it right. Maybe an example?<br>>><br>>> grp Table<br>
>><br>>> +----+----------+----------------------+-------------+---------------------+<br>>> | id | username | domain | grp | last_modified<br>>> |<br>>><br>>> +----+----------+----------------------+-------------+---------------------+<br>
>> | 38 | 1001 | <a href="http://opensips1.test.com/" target="_blank">opensips1.test.com</a> | Local Group | 2011-12-15 20:21:24 |<br>>><br>>> +----+----------+----------------------+-------------+---------------------+<br>
>> | 39 | 1002 | <a href="http://opensips1.test.com/" target="_blank">opensips1.test.com</a> | Local Group | 2011-12-15 20:21:24 |<br>>><br>>> +----+----------+----------------------+-------------+---------------------+<br>
>> | 40 | 1003 | <a href="http://opensips1.test.com/" target="_blank">opensips1.test.com</a> | Local Group | 2011-12-15 20:21:24 |<br>>><br>>> +----+----------+----------------------+-------------+---------------------+<br>
>><br>>><br>>> The username, and domain field is my first confusion. For some reason<br>>> I would think the this table<br>>> would have a subscriber_id that is a foreign key to the subsriber<br>
>> table? This would be "group table",<br>>> and name would be something like "Local Group", "VoiceMail Group"....<br>>><br>>> dr_groups Table<br>>><br>>> +----+----------+----------------------+---------+----------------+<br>
>> | id | username | domain | groupid | description |<br>>> +----+----------+----------------------+---------+----------------+<br>>> | 42 | 1001 | <a href="http://opensips1.test.com/" target="_blank">opensips1.test.com</a> | 0 | Access Granted |<br>
>> +----+----------+----------------------+---------+----------------+<br>>> | 43 | 1002 | <a href="http://opensips1.test.com/" target="_blank">opensips1.test.com</a> | 0 | Access Granted |<br>>> +----+----------+----------------------+---------+----------------+<br>
>> | 43 | 1003 | <a href="http://opensips1.test.com/" target="_blank">opensips1.test.com</a> | 0 | Access Granted |<br>>> +----+----------+----------------------+---------+----------------+<br>>><br>
>><br>>> Same table?<br>>><br>>> dr_rules;<br>>><br>>> +--------+---------+--------+---------+----------+---------+--------+-------+--------------------+<br>>> | ruleid | groupid | prefix | timerec | priority | routeid | gwlist |<br>
>> attrs | description |<br>>><br>>> +--------+---------+--------+---------+----------+---------+--------+-------+--------------------+<br>>> | 16 | 0 | | | 1 | 0 | 9 |<br>
>> yes | ASTCluster Gateway |<br>>><br>>> +--------+---------+--------+---------+----------+---------+--------+-------+--------------------+<br>>><br>>> Is the groupid field of this table a FK to the grp or dr_groups table?<br>
>><br>>> dialplan;<br>>><br>>> +----+------+----+----------+----------------------------------+-----------+-----------+----------+-------+<br>>> | id | dpid | pr | match_op | match_exp |<br>
>> match_len | subst_exp | repl_exp | attrs |<br>>><br>>> +----+------+----+----------+----------------------------------+-----------+-----------+----------+-------+<br>>> | 24 | 0 | 1 | 1 | ^[2-9][0-9]{6}.* |<br>
>> 0 | | | local |<br>>> | 28 | 0 | 1 | 0 | *98 |<br>>> 0 | | | voicmail |<br>>> | 29 | 1 | 1 | 0 | *98 |<br>
>> 0 | | | voicmail |<br>>><br>>> +----+------+----+----------+----------------------------------+-----------+-----------+----------+-------+<br>>><br>>> What I am trying to accomplish is:<br>
>><br>>> Local Group (dpid 0)<br>>> +<br>>> | _ _ _ 1001 <a href="http://test.com/" target="_blank">test.com</a> password (From Subscriber)<br>>><br>>><br>>> VoiceMail Group (dpid 1)<br>
>> +<br>>> | _ _ _ 1002 <a href="http://test.com/" target="_blank">test.com</a> password (From Subscriber)<br>>> +<br>>> | _ _ _ 1003 <a href="http://test.com/" target="_blank">test.com</a> password (From Subscriber)<br>
>><br>>><br>>> Also, I would like to use this module to perform LCR (country code,<br>>> area code, rate etc..).<br>>> Is this possible instead of using the LCR module?<br>>><br>>> Thanks in Advance,<br>
>><br>>> Nick.<br>>><br>>> _______________________________________________<br>>> Users mailing list<br>>> <a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>>> <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
><br>><br>> _______________________________________________<br>> Users mailing list<br>> <a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>> <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
><br><br>_______________________________________________<br>Users mailing list<br><a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br><a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>--<br>*--*--*--*--*--*<br>Duane<br>*--*--*--*--*--*<br>--<br>