[OpenSIPS-Users] Module GROUP / is_user_in

Bogdan-Andrei Iancu bogdan at voice-system.ro
Fri Sep 12 11:50:22 CEST 2008


Hi Erwan,

Indeed, the group name cannot be a PV (for the group functions). You can 
open a feature request on the tracker to point out that there is a need 
for such functionality.

In the mean while, I can suggest a trick :) - use avpops module, the 
avp_query() function to run a raw query against the grp table"
    avp_query("select grp from grp where username='$fu' and domain='$fd' 
and grp='$avp(my_grp)' ","$avp(i:1)");

this is exactly the query run by the group module - if $avp(i:1) is set, 
it means that the user is in the group (if the select returns a record).

Regards,
Bogdan

erwan.humez at orange-ftgroup.com wrote:
>
> Hi,
>
> Using opensips 1.4.2 along with MySQL db, I would like to use a pseudo 
> variable (ideally $fu) or even a script variable as the 'group' 
> parameter to be given to the group function is_user_in(). But 
> apparently, only a static string has to be used instead...
>
> Has anyone faced this issue and this need before ? And maybe worked 
> out this ?
>
> Thx a lot for any helpful feedback,
>
> Erwan.
> *********************************
> This message and any attachments (the "message") are confidential and 
> intended solely for the addressees.
> Any unauthorised use or dissemination is prohibited.
> Messages are susceptible to alteration.
> France Telecom Group shall not be liable for the message if altered, 
> changed or falsified.
> If you are not the intended addressee of this message, please cancel 
> it immediately and inform the sender.
> ********************************
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>   





More information about the Users mailing list