[Kamailio-Users] high processing delay

Fabian Borot fborot at hotmail.com
Wed Nov 5 16:43:13 CET 2008


hello

All my Register request take longer than normal to process, what I mean is that an UAC sends a Register and kamailio responds almost 0.5 secs later, causing the UAC to re-transmit its request several times

  0.000000 192.168.10.10 -> 192.168.1.20 SIP Request: REGISTER sip:192.168.1.20
  0.469256 192.168.1.20 -> 192.168.10.10 SIP Status: 401 Unauthorized    (0 bindings)
  0.518263 192.168.10.10 -> 192.168.1.20 SIP Request: REGISTER sip:192.168.1.20
  0.628294 192.168.10.10 -> 192.168.1.20 SIP Request: REGISTER sip:192.168.1.20
  1.130722 192.168.10.10 -> 192.168.1.20 SIP Request: REGISTER sip:192.168.1.20
  1.269301 192.168.1.20 -> 192.168.10.10 SIP Status: 401 Unauthorized    (0 bindings)
  2.224942 192.168.10.10 -> 192.168.1.20 SIP Request: REGISTER sip:192.168.1.20
  2.325358 192.168.1.20 -> 192.168.10.10 SIP Status: 200 OK    (1 bindings)
  3.457509 192.168.1.20 -> 192.168.10.10 SIP Status: 200 OK    (1 bindings)
  4.497532 192.168.1.20 -> 192.168.10.10 SIP Status: 200 OK    (1 bindings)

 

the cpu shows almost 100 % idle at that time and the pc were kamailio is running has nothing else running but kamailio. this is my config file:



####### Routing Logic ########


# main request routing logic


route{
        # initial sanity checks -- messages with
        # max_forwards==0, or excessively long requests
        xlog("L_DBG", "mylog, time [$Tf]  : starting_main_logic.\n");
        if (!mf_process_maxfwd_header("10")) {
                sl_send_reply("483","Too Many Hops");
                xlog("L_DGB","mylog, time [$Tf]  : Too Many Hops.\n");
                exit;
        };

        if (msg:len >= 2048 ) {
                sl_send_reply("513", "Message too big");
                xlog("L_DGB","mylog, time [$Tf]  : Message too big.\n");
                exit;
        };


        if (!method=="REGISTER")
                record_route();

        if (loose_route()) {
                # mark routing logic in request
                append_hf("P-hint: rr-enforced\r\n");
                route(1);
        };


        if (uri==myself) {
                if (method=="REGISTER") {
                        xlog("L_DGB","mylog, time [$Tf]  : starting to process REGISTER.Info: [$au,$ad,$ci,$ct,$cs,$rd,$si,$sp].\n");
                        if (!www_authorize("", "subscriber")) {
                        xlog("L_DGB","mylog, time [$Tf]  : REGISTER came without auth, sending challenge.\n");
                        www_challenge("", "0");
                        exit;
                };
        save("location");
        xlog("L_DBG","mylog, time [$Tf]  : save-location successful.\n");
        exit;
        };


        if (!lookup("location")) {
                sl_send_reply("404", "Not Found");
                xlog("L_DGB","mylog, time [$Tf]  : lookup-location failed, sending 404 Not Found.\n");
                exit;
        };
        append_hf("P-hint: usrloc applied\r\n");
        };
        route(1);
}

route[1] {
        if (!t_relay()) {
        sl_reply_error();
        };
        exit;
}



_________________________________________________________________
Stay up to date on your PC, the Web, and your mobile phone with Windows Live
http://clk.atdmt.com/MRT/go/119462413/direct/01/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kamailio.org/pipermail/users/attachments/20081105/f40144b3/attachment.htm 


More information about the Users mailing list