Olivier CALVANO
2011-Aug-03 09:55 UTC
[asterisk-users] Know the number of concurrent dial ?
Hi I connected Asterisk 1.6 has several SIP provider, Do you know a tool to make a graph of the number of simultaneous calls incoming and outgoing ? and know the max outgoing call in same time ? thanks Olivier.
Danny Nicholas
2011-Aug-04 13:49 UTC
[asterisk-users] Know the number of concurrent dial ?
I did a PERL routine to get this information out of Master.csv (/var/log/asterisk/cdr-csv) open (my $cdr_in, "<", "/var/log/asterisk/cdr-csv/Master.csv"); my %call_start; my %call_end; my %call_con; my $call_max=0; while (<$cdr_in>) { my (@cdr_data) = split /\,/, $_; my $day=unpack("x1 a10", $cdr_data[9]); my $dx=sprintf("%20s", $cdr_data[9]); my $hour=unpack("x12 a2", $dx); my $xx= $cdr_data[11]; my $dur= $cdr_data[12]; my $syr=unpack("x1 a4", $dx); my $smon=unpack("x6 a2", $dx); my $sday=unpack("x9 a2", $dx); my $shr=unpack("x12 a2", $dx); $shr = $shr * 1; my $smin=unpack("x15 a2", $dx); my $ssec=unpack("x18 a2", $dx); if ($smon == 1 && $sday > 27) { $sday=27; } if ($sday == 31 && ($smon == 3 || $smon == 10 || $smon == 5 || $smon =8)) { $sday=30; } my $stime = timelocal($ssec,$smin,$shr,$sday,$smon,$syr); my $etime = $stime + $dur; $call_start{$call_max}=$stime; $call_end{$call_max}=$etime; $call_conhour{$call_max}=$shr; $call_con{$call_max}=0; $call_max++; } close $cdr_in; for (my $i=0;$i<$call_max;$i++) { my $test_start=$call_start{$i}-1; my $test_end=$call_end{$i}+1; for (my $j=0;$j<$call_max;$j++) { if ($call_start{$j}>$test_start && $call_end{$j} < $test_end) {; $call_con{$i}++; } } } -----Original Message----- From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Olivier CALVANO Sent: Wednesday, August 03, 2011 4:56 AM To: asterisk-users at lists.digium.com Subject: [asterisk-users] Know the number of concurrent dial ? Hi I connected Asterisk 1.6 has several SIP provider, Do you know a tool to make a graph of the number of simultaneous calls incoming and outgoing ? and know the max outgoing call in same time ? thanks Olivier. -- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users