[Kamailio-Users] kamailio load problem

alex pappas rebel.pappas at gmail.com
Mon Dec 14 12:36:11 CET 2009


Dear users,

I'm using kamailio in the following scenario:

1. A call comes in and is checked against PDT module. From this module
depend from the prefix I'm getting back the domain which is used as the
dialplan group.
2. After that the call is checked against Dialplan module using the previous
value from PDT as Dialplan dpid. From the Dialplan module i get back  the
the attributes values.
3. these attributes values are user in the dispathcher module where I
continue with failover scenarios.

Also the script is working with a radius for accounting purposes.

This scenario works perfecttly and it is still in a testing mode.

An the problem:

I'm running SIPP against this scenario and until the CPS is 5 everything
looks good. The scenario for SIPP is the simplest. uac and uas default. Uac
is sending a call and uas is answering.
When the CPS goes above 9 then I have call failures. All the statistics are
going down.
I'm cheking for CPU load or other system problems but I don't see anything
strange. Does anyone understand why this is happening?

I'm attachng the 2 routes that i'm using:


test values in order to understand the script

*PDT value =  1 (used for the dialplan group)
Dialplan value = 100.101.102.#
Dispatcher values:
100 = 10.0.0.5
101 = 10.0.0.6
102 = 10.0.0.7*


Thank you in advance

Alex




route[7] {

        if(prefix2domain("2", "0")) {

                $var(dial_grp) = $(rd{s.int});
                if(dp_translate("$var(dial_
grp)", "$rU/$rU"))
                {

                        $var(i) = 0;
                        while($(avp(s:dest){s.select,$var(i),.})!="#")
                        {
                                $avp(s:dstgrp) =
$(avp(s:dest){s.select,$var(i),.}{s.int});
                                $var(i) = $var(i) + 1;

                        }

                        $avp(s:user) = $rU;


                                if(ds_select_domain("$avp(s:dstgrp)", "4"))
                                {


                                        if($(ru{uri.param,prefix})!=null)
                                                {
                                                        $ru = "sip:" +
$(ru{uri.param,prefix}) + $rU + "@" + $rd;
                                                } else {
                                                        $ru = "sip:" + $rU +
"@" + $rd;
                                                }
                                        $avp(s:dstgrp) = null;
                                        t_on_failure("2");
                                        t_relay();
                                        exit;
                                }
                }
                sl_send_reply("404", "No route found");
                exit;
        }
}


failure_route[2] {

  if(t_was_cancelled()) {
        exit;
  }

  if(t_check_status("4[0-9][0-9]|5[0-9][0-9]"))
  {

     if(ds_next_domain())
     {
            if($(ru{uri.param,prefix})!=null)
            {
                $ru = "sip:" + $(ru{uri.param,prefix}) + $avp(s:user) + "@"
+ $rd;
            } else {
                $ru = "sip:" + $avp(s:user) + "@" + $rd;
            }
            t_on_failure("2");
            append_branch();
            t_relay();
            exit;
     } else {

            if($avp(s:dstgrp)!=null)
            {
                 if(ds_select_domain("$avp(s:dstgrp)", "4"))
                 {

                     if($(ru{uri.param,prefix})!=null)
                     {
                         $ru = "sip:" + $(ru{uri.param,prefix}) +
$avp(s:user) + "@" + $rd;
                     } else {
                         $ru = "sip:" + $avp(s:user) + "@" + $rd;
                     }
                     $avp(s:dstgrp) = null;
                     t_on_failure("2");
                     append_branch();
                     t_relay();
                     exit;
                }
         } else {
                t_reply("444", "No more tries for you!");
                }
    }
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/users/attachments/20091214/3ad704bf/attachment.htm>


More information about the Users mailing list