[OpenSIPS-Users] Module GROUP / is_user_in

erwan.humez at orange-ftgroup.com erwan.humez at orange-ftgroup.com
Fri Sep 12 14:11:27 CEST 2008


Hi Bogdan,

The proposed 'workaround' does perfectly the job indeed :-)

Thx again !

Kindly regards,

Erwan.




Bogdan-Andrei Iancu <bogdan at voice-system.ro> 
12/09/2008 11:50

A
erwan.humez at orange-ftgroup.com
cc
users at lists.opensips.org
Objet
Re: [OpenSIPS-Users] Module GROUP / is_user_in






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
> 





*********************************
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.
********************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.opensips.org/pipermail/users/attachments/20080912/2306633b/attachment.htm 


More information about the Users mailing list