Hi Gonzalo,
is_user_in() function is provided by the "group" module:
http://www.opensips.org/html/docs/modules/1.4.x/group.html#id228379
so, you need to configure the DB url for this module also:
http://www.opensips.org/html/docs/modules/1.4.x/group.html#id227194
Regards,
Bogdan
Gonzalo Gonzalez wrote:
> I have opensips database in a separate machine and for the most part
> the connection work fine, but when I use credential opensips look at
> the localhost database not at the remote.
>
> My config:
>
> modparam("mi_fifo", "fifo_name", "/tmp/opensips_fifo")
> modparam("usrloc", "db_mode", 2)
> modparam("auth_db", "calculate_ha1", yes)
> modparam("auth_db", "password_column", "password")
> modparam("rr", "enable_full_lr", 1)
> modparam("auth_db|permissions|uri_db|usrloc","db_url","mysql://opensips:[email protected]/opensips")
> modparam("permissions", "db_mode", 1)
> modparam("permissions", "trusted_table", "trusted")
> modparam("avpops", "avp_url",
> "mysql://opensips:[email protected]/opensips")
> modparam("avpops", "avp_table", "usr_preferences")
> modparam("uri_db", "use_uri_table", 0)
> modparam("uri_db", "db_url", "")
>
> In the following statement only look at the database of the local machine:
>
> if (uri=~"^sip:[2-9][0-9]{9}@") {
> if (is_user_in("credentials","local")) {
> #prefix("+1");
> route(4);
> exit;
> } else {
> sl_send_reply("403", "No permissions for local calls");
> exit;
> };
>
> Any Idea?
>
> Thanks,
>
> Gonzalo
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> [email protected]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users