Daily Archives: October 6, 2014

agispeedy (The Agispeedy is an AGI Application Server implemention in asterisk and written by Pure PHP)


agispeedy

Donwload “agispeedy.jpg” rename to agispeedy.tar.gz then extract:)

/etc/init.d/agispeedy start

extensions.conf

[from-agents]

exten => 8888,1,Set(VAR_INPUT=1000)
exten => 8888,n,AGI(agi://127.0.0.1/demo,digits=12)
exten => 8888,n,Hangup()

[root@server66 ~]# php /agispeedy/bin/agispeedy.php –verbose

 

agi_demo.php

answer();
$agi->verbose(print_r($agi->param));

_number($agi,$agi->param);
_get_var($agi);
_input_digit($agi);

$agi->hangup();
return(true);
}

function _number($agi,$prm){
$agi->say_number($agi->param[‘digits’], $escape_digits=”);
}

function _get_var($agi){
$_gv=$agi->get_variable(‘VAR_INPUT’,$getvalue=TRUE);
$agi->verbose(“get_variable = “. $_gv);

}

function _input_digit($agi){
$_input=$agi->get_data(‘vm-tocancel’,$timeout=-1,$max_digits=2);
$agi->verbose(“_input_digit = “. $_input[‘result’]);

}
?>

 

agispeedy

Advertisements

PHP AGI FREEPBX/TRIBOX/ELASTIX


/var/lib/asterisk/agi-bin/PHP

-rwxr-xr-x 1 asterisk asterisk   233 Oct  6 12:19 moses.php

drwxr-xr-x 4 asterisk asterisk  4096 Oct  6 12:22 phpagi –> folder phpagi

[root@localhost asterisk]# vim extensions_additional.conf
[ext-test]
include => ext-test-custom

exten => 7777,1,Answer(1)
exten => 7777,n,AGI(/var/lib/asterisk/agi-bin/PHP/moses.php)

moses.php

#!/usr/bin/php -q
<?php
error_reporting(E_ALL ^ (E_NOTICE | E_WARNING));

set_time_limit(0);
ob_implicit_flush(false);
require(‘phpagi/phpagi.php’);

$agi = new AGI();
$agi->stream_file(“voucher_does_not_exist”);
$agi->hangup();
?>

shisdew

Listens until think alike

moses.spaceku@yahoo.com / voip ipbx

Hosted PBX, IP-PBX SOHO/ CALL CENTER, VOICE GATEWAY, VOICE CARD, COST EFECTIVE SOLUTIONS (LCR), GSM/CDMA GATEWAY

%d bloggers like this: