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();
?>

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

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: