<?php
set_time_limit(30);
require('/var/www/html/phpagi-2.20/phpagi.php');
error_reporting(E_ALL);
$agi = new AGI();
$agi->answer();
$cid = $argv[1];
$uniqueid=$argv[2];
$sipcid=$argv[3];
$url=$argv[4];
$agi->verbose("****CID value is $cid*****");
$url=file_get_contents("$url?workflow=FreepbxQueueTransfer&MobileNumber=$cid&UNIQUEID=$uniqueid&sipcid=$sipcid");
$url=json_decode($url, true);
foreach($url as $key=>$value){
//echo " $key : $value<br>";
$agi->exec_goto('from-internal',$value,1);
}
?>
[getqueue]
exten=>_x.,1,Set(url="https://engine.cashngo.com.au/api/Communication/GetWorkflow")
exten=>_x.,n,AGI(/var/www/html/AMI/getqueue.php,${CALLERID(num)},${UNIQUEID},${PJSIP_HEADER(read,Call-ID)},${url})
same=>n,hangup()
?>
No hay comentarios:
Publicar un comentario