<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">That fixed, Thank you very much.<br><br><br>Gonzalo<br><br>--- On <b>Tue, 2/10/09, Bogdan-Andrei Iancu <i><bogdan@voice-system.ro></i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;">From: Bogdan-Andrei Iancu <bogdan@voice-system.ro><br>Subject: Re: [OpenSIPS-Users] Database on separate machine<br>To: gonzovoip@yahoo.com<br>Cc: "Opensips" <users@lists.opensips.org><br>Date: Tuesday, February 10, 2009, 6:40 PM<br><br><pre>Hi Gonzalo,<br><br>is_user_in() function is provided by the "group" module:<br> http://www.opensips.org/html/docs/modules/1.4.x/group.html#id228379<br><br>so, you need to configure the DB url for this module also:<br> http://www.opensips.org/html/docs/modules/1.4.x/group.html#id227194<br><br>Regards,<br>Bogdan<br><br>Gonzalo Gonzalez wrote:<br>> I have
opensips database in a separate machine and for the most part the<br>connection work fine, but when I use credential opensips look at the localhost<br>database not at the remote.<br>> <br>> My config:<br>> <br>> modparam("mi_fifo", "fifo_name",<br>"/tmp/opensips_fifo")<br>> modparam("usrloc", "db_mode", 2)<br>> modparam("auth_db", "calculate_ha1", yes)<br>> modparam("auth_db", "password_column",<br>"password")<br>> modparam("rr", "enable_full_lr", 1)<br>><br>modparam("auth_db|permissions|uri_db|usrloc","db_url","mysql://opensips:opensipsrw@192.168.1.104/opensips")<br>> modparam("permissions", "db_mode", 1)<br>> modparam("permissions", "trusted_table",<br>"trusted")<br>> modparam("avpops", "avp_url",<br>"mysql://opensips:opensipsrw@192.168.1.104/opensips")<br>> modparam("avpops", "avp_table",<br>"usr_preferences")<br>> modparam("uri_db", "use_uri_table", 0)<br>> modparam("uri_db", "db_url", "")<br>>
<br>> In the following statement only look at the database of the local machine:<br>> <br>> if (uri=~"^sip:[2-9][0-9]{9}@") {<br>> if (is_user_in("credentials","local")) {<br>> #prefix("+1");<br>> route(4);<br>> exit;<br>> } else {<br>> sl_send_reply("403", "No permissions for local<br>calls");<br>> exit;<br>> };<br>> <br>> Any Idea?<br>> <br>> Thanks,<br>> <br>> Gonzalo<br>> <br>> <br>> ------------------------------------------------------------------------<br>> <br>> _______________________________________________<br>> Users mailing list<br>> Users@lists.opensips.org<br>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users<br>> <br><br></pre></blockquote></td></tr></table><br>