Max Concurrent calls in a period

Hi

I run Scopserv

I need to check what my max concurrent calls is in a period, to check if we will be able to handle our new client
We currently have a 30 channel PRI line and some outgoing calls go out via premi-cell

I would really appreciate the assistance

Howdy,

Though Scopserv might use Asterisk, the folks who frequent this site can’t provide you any guidance on your query. The only ones who know the capabilities of Scopserv are the people that make it. Max concurrent calls in a period isn’t hard-limited by Asterisk. It’s limited by your implementation (Scopserv) of Asterisk and your system resources. No one here can make good guesses or provide facts about your circumstance.

Cheers

Here’s a modified program (I didn’t test it after I modified it) you can use if you’re storing your CDR records in MySQL. It may take a while to run if you have a large range or a lot of calls, but you’ll end up with a table showing each second for that range where calls were taking place, and the number of concurrent calls for that second. You can just sort the table descending by totalcalls to see the maximum. Modify the query to specify records as you need.

#!/usr/bin/php -q
<?php

//Connect to the database here
mysql_connect("server-name-or-ip", "database-username", "database-password");
mysql_select_db("asterisk") or die( "Unable to select database");
//

$sdate = '2016-09-01';
$edate = '2016-09-14';

$sql = "DROP TABLE IF EXISTS asterisk.busy_study";
$sql = "CREATE TABLE IF NOT EXISTS asterisk.busy_study (
    dt datetime NOT NULL,
    totalcalls int(11) NOT NULL,
    PRIMARY KEY (dt)
    ) ENGINE=MyISAM";

$sql = "truncate asterisk.busy_study";
mysql_query($sql);

$sql = "SELECT start,end
    FROM asterisk.cdr 
    WHERE date(start) between '$sdate' and '$edate'";
$result = mysql_query($sql) or die( mysql_error());

while ($rows = mysql_fetch_assoc($result)){ 
    $start = $rows['start'];
    $end = $rows['end'];
    
    $totalcalls = 1;
    $loopdt = $start;
    while($loopdt <= $end){        
        $sqli = "insert into asterisk.busy_study (dt, totalcalls)
            values('$loopdt','$totalcalls')
            on duplicate key update totalcalls = totalcalls+1";
        mysql_query($sqli);
        
        $loopdt = date('Y-m-d H:i:s', strtotime("$loopdt + 1 second"));
    }
}

//Disconnect from the database
mysql_close();
//

exit;
?>
1 Like