how to set callerid in php AGI file.

Home » Asterisk Users » how to set callerid in php AGI file.
Asterisk Users 5 Comments

Hi,
I am using phpagi for agi scripting. and want to update callerid number but
didn’t get any success. please help me how to update PHPAGI is new for me.
Below is the code which I write.

#!/usr/bin/php -q
< ?php
set_time_limit(30);
//require(.phpagi.php.);
include(“phpagi.php”);
$agi = new AGI();

//answer the call
$agi-> answer();
$agi->verbose(“——————————————“);
$agi-> exec(‘Set’,”CALLERID(num)=01133200274″);

$ani = $agi->request[‘agi_callerid’];
$agi->noop(“My CalleID: < <<<<<<=".$ani); $agi->set_variable(“CALLERID(num)”,”01133200274″);
$ani = $agi->request[‘agi_callerid’];
$agi->noop(“My CalleID: < <<<<<<=".$ani); $agi-> exec(‘Dial’,”SIP/00918885268942@sip.trunk.gradwell.com,60,r”);
//$agi-> exec(‘Dial’,”SIP/00918885268942@voipon,60,r”);
?>

And CLI>

== Using SIP RTP CoS mark 5

5 thoughts on - how to set callerid in php AGI file.