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!"); } } }
Hello,
On 12/14/09 12:36 PM, alex pappas wrote:
do you have high debug level? Is your syslog configured asyncronous?
Are network packets dropped from the network interface?
Cheers, Daniel
Daniel hi,
We don't have packet loss and the log level is 1. Concerning the the asyncronous loging: This should be set before compilation?
""""""""""""""""""""""" http://openser.blogspot.com/2008/10/asynchronous-syslogging.html This functionality can be enabled with setting the define SYSLOG_ASYNC in the Makefile.defs file. The default is the normal log functionality from the system library, nothing changed if the define is not set.
"""""""""""""""""""""""""""""""""
Cheers
Alex
On Mon, Dec 14, 2009 at 2:31 PM, Daniel-Constantin Mierla <miconda@gmail.com
wrote:
Hello,
On 12/14/09 1:50 PM, alex pappas wrote:
no, it is not about this. By asynchronous syslog I meant the syslog config in the system, nothing related to source code of kamailio.
If the log level is 1 then you should not see many syslog messages.
Maybe is better to use the benchmark module to identify where is the delay coming from (if it is from kamailio config).
Cheers, Daniel
Daniel good morning,
The syslog I have is the standar centos installation. I don't understand what you mean. The benchmark module I haven't use yet.(I finding it a bit difficult to use :-( ) BUT I found this: In my kamailio.cfg I had some extra logging fields (acc extra accounting) in the mysql and also the cdr in mysql. That is giving heavy load in mysql and I see many call failing. I disabled that and now I have a CPS 40 with concurent calls 12.000. The failed calls are 11 only. This seems good. But even I'm NOT logging CDRs in mysql I still see mysql in 70% CPU load and I don't understand why. I beleive that Kamailio when is starting up is getting into memory all mysql data, in my case from PDT,Dialplan and Dispatcher tables.
So the question now is why mysql is working so hard ?
I'm also sending you my kamailio.cfg because maybe you can see something I haven't mention..
Thanks for the great help ;-)
Alexandros
On Mon, Dec 14, 2009 at 7:28 PM, alex pappas rebel.pappas@gmail.com wrote:
Hello Alex,
to understand what I meant with syslog and asyncronous, see next tutorials:
http://www.kamailio.org/dokuwiki/doku.php/tutorials:debug-syslog-messages http://www.kamailio.org/dokuwiki/doku.php/utils:basic-syslog-configuration
On 12/15/09 8:41 AM, alex pappas wrote:
Activate query logging for mysql and see what it does. Do you have any authentication in the config?
I'm also sending you my kamailio.cfg because maybe you can see something I haven't mention..
You haven't send it -- do it to private address, so you protect confidential data like usernames, passwords, IPs, etc.
Cheers, Daniel