Код: Выделить всё
!/usr/bin/php -q
<?php
require 'phpagi.php';
set_time_limit(3);
od_implicit_flush(false);
error_reporting(0);
$agi = new AGI();
$agi->set_variable('sss', '0122');
exit(0);
?>
Код: Выделить всё
[from-internal]
exten => 0601,1,AGI(test.php)
exten => 0601,n,Noop(${sss})
Executing [0601@from-internal:1] AGI("SIP/9991-000003ea", "test.php") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/test.php
-- <SIP/9991-000003ea>AGI Script callerid.php completed, returning 0
-- Executing [0601@from-internal:2] NoOp("SIP/9991-000003ea", "") in new stack