[OpenSIPS-Users] Database on separate machine

Gonzalo Gonzalez gonzovoip at yahoo.com
Tue Feb 10 20:05:39 CET 2009


That fixed, Thank you very much.


Gonzalo

--- On Tue, 2/10/09, Bogdan-Andrei Iancu <bogdan at voice-system.ro> wrote:
From: Bogdan-Andrei Iancu <bogdan at voice-system.ro>
Subject: Re: [OpenSIPS-Users] Database on separate machine
To: gonzovoip at yahoo.com
Cc: "Opensips" <users at lists.opensips.org>
Date: Tuesday, February 10, 2009, 6:40 PM

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:opensipsrw@192.168.1.104/opensips")
> modparam("permissions", "db_mode", 1)
> modparam("permissions", "trusted_table",
"trusted")
> modparam("avpops", "avp_url",
"mysql://opensips:opensipsrw@192.168.1.104/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
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>   




      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.opensips.org/pipermail/users/attachments/20090210/b2b766a4/attachment-0001.htm 


More information about the Users mailing list