2
アスタリスクでいくつかのサーバーで動作しているPHPAGIを使用しています。しかし、私は新しいサーバーでそれらを使用したとき、彼らはわずか3日間通常のように働いていましたが、今は予想以上に時間がかかります。ここにサンプルがあります。
何か提案がありがとうございます。通常のphpagi実行時間より長い
#!/usr/bin/php -q
<?php
require('phpagi.php');
error_reporting(E_ALL);
$agi = new AGI();
$_callerId = $agi->get_variable("CALLERID(num)");
if(strlen($_callerId)>4)
{
$con=mysqli_connect(SomeServer);
$result = mysqli_query($con,"Select caller_id,extention from record_call order by id desc limit 50");
while($row = mysqli_fetch_array($result)) {
$tempCallerId = $row['caller_id'] ;
$tempExtention = $row['extention'] ;
if($tempCallerId==$_callerId)
{
$agi->set_variable('exExtention',$tempExtention);
mysqli_close($con);
return;
}
};
$agi->set_variable('exExtention','new');
mysqli_close($con);
?>