2017 © Pedro Peláez
 

library phpagi

A modernized version of the phpagi class.

image

agiphlow/phpagi

A modernized version of the phpagi class.

  • Saturday, April 9, 2016
  • by agvstin
  • Repository
  • 1 Watchers
  • 0 Stars
  • 86 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 1 Versions
  • 13 % Grown

The README.md

phpagi

A modernized version of the original phpagi project (http://phpagi.sourceforge.net/)., (*1)

Installation

The suggested installation method is via composer:, (*2)

composer require agiphlow/phpagi

Note: agiphlow/phpagi is still in development, make sure to set the minimum stability in your composer.json to dev:, (*3)

{
    "minimum-stability": "dev"
}

Usage

Create the script agi.php with the following content:, (*4)

#!/usr/bin/env php
<?php

require_once __DIR__ .'vendor/autoload.php';

use Agiphlow\PhpAgi\Agi;

// create agi client
$agi = new Agi();

// answer the call
$agi->answer();

// play file
$agi->stream_file('welcome');

// hangup call
$agi->hangup();

Make sure the script is executable:, (*5)

chmod a+x agi.php

To test it, you will need to add an extension to your dialplan. Add the following to /etc/asterisk/extensions.conf:, (*6)

exten => *111,1,agi(dtmf.php)

Now dial *111 to test your script., (*7)

The Versions

09/04 2016

dev-master

9999999-dev http://github.com/agiphlow/phpagi

A modernized version of the phpagi class.

  Sources   Download

GPL-2.0+

The Requires

  • php >=5.3.0

 

by Agustín Gutiérrez

flow asterisk agi ivr agiphlow