Monitoring / Call Capacity

I have two questions:

  1. How can someone monitor a call in progress real-time (beginning to end)? I thought about using Meetme but it doesn’t seem practical and the Monitor application writes to a file instead of streaming it to a person.

  2. What is the general load capacity, in number of simul. calls, that asterisk can handle on a fairly powerful server?

Thanks in advance.

Take a look at zapbarge and this page: … mensioning

  1. there are a few threads on this, and I’ve posted bits of code that I use for a one-click live monitoring solution, using the manager interface and zapbarge. i’ll try to dig up a link…

  2. there are too many variables here - tell us what kind of phones you’ll be using, what codec you’ll be using, what connection to the outside world you’ll be using, if you’ll be monitoring calls, using conferences, and the like…what would completely overload one server can be easily handled if a few modifications are made, and vice-versa.

found my code snip - this hasn’t been posted anywhere yet, just sent via PMs. this is only part of it - there is a front end piece that uses the send_socket function to pull a list of active calls, and i use that to generate a link to my monitor script.

the first snippet is the most important part (to me) - a function to open a socket to the manager interface, and pull whatever return data we get - this way i can write several different pages and only have to change a couple of variables to get the desired result:

function send_socket($socket_host,$socket_login, $socket_pass, $socket_port,$socket_errno,$socket_errstr,$socket_timeout, $socket_action, $socket_command)
  $socket = fsockopen($socket_host,$socket_port,$socket_errno,$socket_errstr,$socket_timeout);
  if (!$socket)
    return "$socket_errstr - $socket_errno";
  fputs($socket, "Action: Login\r\n");
  fputs($socket, "UserName: $socket_login\r\n");
  fputs($socket, "Secret: $socket_pass\r\n\r\n");
  if($socket_action=='Command' && $socket_action != '')
    fputs($socket, "Action: $socket_action\r\n");
    fputs($socket, "Command: $socket_command\r\n\r\n");
  elseif ($socket_action != '')
   fputs($socket, "Action: $socket_action\r\n\r\n");
  fputs($socket, "Action: Logoff\r\n\r\n");
  while (!feof($socket)) {
    $output .= fread($socket, 8192);
  return $output;

here is the actual code snippet (notice how we use the send_socket function to send data to the manager interface):

$action = "Originate\r\n";
$action .= "Channel: $extension\r\n";
$action .= "Exten: 8159\r\n";
$action .= "Context: from-inside\r\n";
$action .= "Priority: 1\r\n";
$action .= "Timeout: 5000\r\n";
$action .= "Callerid: Monitor\r\n";
$action .= "Variable: ARG1=$channel#";

$output = send_socket($socket_host,$socket_login, $socket_pass, $socket_port,$socket_errno, $socket_errstr, $socket_timeout, $action, '');

8159 is our zapbarge extension, so here is that entry in extensions.conf:

exten => 8159,1,ZapBarge
exten => 8159,2,Hangup

believe it or not, that is all there is to it - the Variable: ARG1 simply tells the originate command to pass this information last…if you really want to make sure it passes, set Zapbarge to use this:

exten => 8159,1,ZapBarge(${ARG1})
exten => 8159,2,Hangup