call.php
<?php
include("phpagi-asmanager.php");
$i=isset($argv[1]) && intval($argv[1])?$argv[1]:'1';
$mix=new AGI_AsteriskManager;
$mix->connect('localhost', 'admin', 'amp111');
for($j=1; $j<=$i; $j++){
$mix->send_request('originate', array('channel'=>'Local/90@from-internal', 'context'=>'from-internal', 'exten'=>'91', 'priority'=>'1'));
}
运行php call.php 100时系统就会发起100路呼叫,先呼叫90队列,电话进入90队列后立即再进入91队列。