[OpenSIPS-Users] Database on separate machine

Gonzalo Gonzalez gonzovoip at yahoo.com
Tue Feb 10 18:47:31 CET 2009


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



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


More information about the Users mailing list