We have asterisk server and I need to get numbers that calls in current time. I try to use php agi library, but maximum that I got is the list of channels.
$agi_manager = new AGI_AsteriskManager(null, $agi_config);
$connect = $agi_manager->connect();
$result = $agi_manager->command('core show channels');
That is exactly what you need.
Now you must parse the table and extract SIP peers from it.