New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

agiphlow/phpagi

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

agiphlow/phpagi

A modernized version of the phpagi class.

Source
Packagist
Version
dev-master
Version published
Total downloads
138
Maintainers
1
Created
Source

phpagi

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

Installation

The suggested installation method is via composer:

composer require agiphlow/phpagi

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

{
	"minimum-stability": "dev"
}

Usage

Create the script agi.php with the following content:

#!/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:

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:

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

Now dial *111 to test your script.

Keywords

flow

FAQs

Package last updated on 09 Apr 2016

Related posts