[OpenSIPS-Users] A question about db_get_user_group

microx acmicrox at gmail.com
Wed Oct 9 07:35:26 CEST 2013


Hi all,

The group module provides db_is_user_in() and db_get_user_group() functions.
The db_is_user_in() works totally fine. However, the db_get_user_group()
does not return the group IDs of a user. I do not know the real cause. I
have inserted the required information into the grp and re_grp tables as
follows. But when I call db_get_user_group("From", "$avp(10)") and
db_get_user_group("$fu", "$avp(11)"), the returned values are all null (I
call xlog("$avp(10), $avp(11), $(avp(10)[0]), $(avp(11)[0]). Can anyone give
me a hint on this? My version is OpenSIPS - 1.9. Many thanks.

Best regards,
Chen-Che

table grp
id |           username           |   domain    |    grp    |   
last_modified    
----+------------------------------+-------------+-----------+---------------------
  1 | 1000000038 at thcloud.com       | thcloud.com | record    | 1900-01-01
00:00:01
  2 | sip:1000000038 at thcloud.com   | thcloud.com | record    | 1900-01-01
00:00:01
  3 | <sip:1000000038 at thcloud.com> | thcloud.com | record    | 1900-01-01
00:00:01

table re_grp
 id |  reg_exp  | group_id 
----+-----------+----------
1    | record    |        1




--
View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/A-question-about-db-get-user-group-tp7588040.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.



More information about the Users mailing list