[OpenSER-Users] Insert in location table very slow

Gregorio goyo.villalba at dialcom.com
Mon Oct 15 18:46:30 CEST 2007


Hi all.

 

I am using openSer 1.3 with mySQL. My problem is that although registration
is fast in SIP protocol terms, the contact binding is written in the
'location' table long time after this contact has received a 200 OK to his
registration. So a user could think that he is registered before he is in
the data base.

 

Could it be a configuration issue?

Can I solve this?

 

Thanks!

 

This is my config:

 

 

# ----------- global configuration parameters ------------------------

 

debug=2            # debug level (cmd line: -dddddddddd)

log_facility=LOG_LOCAL7

fork=yes           

 log_stderror=no   children=4

port=5060

 

listen=udp:192.168.1.206:5060

listen=tcp:192.168.1.206:5060

 

# ------------------ module loading ----------------------------------

 

#set module path

mpath="/usr/local/lib/openser/modules/"

 

loadmodule "mysql.so"

loadmodule "xlog.so"

loadmodule "sl.so"

loadmodule "tm.so"

loadmodule "rr.so"

loadmodule "maxfwd.so"

loadmodule "usrloc.so"

loadmodule "registrar.so"

loadmodule "textops.so"

loadmodule "auth.so"

loadmodule "auth_db.so"

 

loadmodule "presence.so"

 

loadmodule "presence_xml.so"

 

loadmodule "mi_fifo.so"

 

loadmodule "mi_xmlrpc.so"

 

# ----------------- setting module-specific parameters ---------------

 

 

modparam("mi_fifo", "fifo_name", "/tmp/openser_fifo")

 

# -- usrloc params --

 

modparam("usrloc", "db_mode", 2)

 

# -- auth params --

modparam("auth_db", "calculate_ha1", yes)

modparam("auth_db", "password_column", "password")

 

# -- rr params --

# add value to ;lr param to make some broken UAs happy

modparam("rr", "enable_full_lr", 1)

 

 

#Agnadido para la Presencia

modparam("presence|usrloc|pua",
"db_url","mysql://openser:openserrw@127.0.0.1/openser")

modparam("presence", "presentity_table", "presentity")

modparam("presence", "active_watchers_table", "active_watchers")

modparam("presence", "watchers_table", "watchers")

modparam("presence", "clean_period", 100)

modparam("presence", "max_expires", 3600)

modparam("presence", "server_address", "sip:192.168.1.206:5060" )

 

#Presence_XML

modparam("presence_xml",
"db_url","mysql://openser:openserrw@127.0.0.1/openser")

modparam("presence_xml", "xcap_table", "xcap")

modparam("presence_xml", "force_active", 1)

modparam("presence_xml", "integrated_xcap_server", 1)

modparam("presence_xml", "pidf_manipulation", 1)

modparam("presence_xml", "pidf_manipulation", 1)

 

#Mi FIFO

modparam("mi_fifo", "fifo_name", "/tmp/openser_fifo")

modparam("mi_fifo", "fifo_mode", 0600)

modparam("mi_fifo", "fifo_group", 0)

modparam("mi_fifo", "fifo_group", "root")

modparam("mi_fifo", "fifo_user", 0)

modparam("mi_fifo", "fifo_user", "root")

modparam("mi_fifo", "reply_dir", "/home/openser/tmp/")

 

#Mi XMLRPC

modparam("mi_xmlrpc", "port", 8080)

modparam("mi_xmlrpc", "log_file", "/var/log/openser-xmlrpc.log")

modparam("mi_xmlrpc", "reply_option", 0)

modparam("mi_xmlrpc", "buffer_size", 8192)

 

 

# -------------------------  request routing logic -------------------

 

# main routing logic

 

route{

 

        # initial sanity checks -- messages with

        # max_forwards==0, or excessively long requests

 

       if (!mf_process_maxfwd_header("10")) {

                sl_send_reply("483","Too Many Hops. Route filter");

                exit;

        }

 

        if (msg:len >= max_len ) {

                sl_send_reply("513", "Message too big. Route filter");

                exit;

        }

 

        if (!method=="REGISTER")

                record_route();

 

        # subsequent messages withing a dialog should take the

        # path determined by record-routing

        if (loose_route()) {

                # mark routing logic in request

                append_hf("P-hint: rr-enforced\r\n");

                route(1);

        };

        if (uri==myself) {

                route(1);

        };

 

        if (uri==myself) {

                # presence handling

                if( is_method("PUBLISH|SUBSCRIBE")){

                        route(2);

                };

 

                if (is_present_hf("MyHeader"))

                {

                        t_relay("192.168.1.111");

                        exit;

                };

 

 

                if (method=="REGISTER") {

                        # Uncomment this if you want to use digest
authentication

                        if (!www_authorize("openserDialcom", "subscriber"))
{

                                www_challenge("openserDialcom", "0");

                                exit;

                        };

 

                        save("location");

                        exit;

                };

 

                lookup("aliases");

                if (!uri==myself) {

                        append_hf("P-hint: outbound alias\r\n");

                        route(1);

                };

 

                # native SIP destinations are handled using our USRLOC DB

                if (!lookup("location")) {

                        sl_send_reply("404", "Not Found in openSer");

                        exit;

                };

                append_hf("P-hint: usrloc applied\r\n");

        };

 

        route(1);

}

 

route[1] {

        # send it out now; use stateful forwarding as it works reliably

        # even for UDP2TCP

        if (!t_relay()) {

                sl_reply_error();

        };

        exit;

}

route[2]

{

        # absorb retransmissions

        if (! t_newtran())

        {

                sl_reply_error();

                exit;

        };

 

        if(is_method("PUBLISH"))

        {

                handle_publish();

                t_release();

        } else if( is_method("SUBSCRIBE")) {

                handle_subscribe();

                t_release();

        };

 

        exit;

}

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kamailio.org/pipermail/users/attachments/20071015/768bfc70/attachment.htm 


More information about the Users mailing list