با سلام مجدد
$agi->hangup();
//$dial_status = $agi->get_variable("DIALSTATUS",true); $dial_status = $dial_status['data'];
// $agi->verbose("======== dial_status ====".$dial_status );
//*********************************************************** SAVE IN DATABASE******************************************
//exit(0);
$con=mysqli_connect("127.0.0.1","66666666","***********","asteriskcdrdb");
if (mysqli_connect_errno($con))
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
$result = mysqli_query($con,"SELECT disposition,calldate FROM cdr where accountcode={$DialSt} LIMIT 1");
$row = mysqli_fetch_array($result);
$disposition=$row['disposition'];
$calldate=$row['calldate'];
$agi->verbose("======== disposition ======================= ".$row['disposition'] );
mysqli_close($con);
متاسفانه هیچ مقداری برنمیگرداند