承接 agiphlow/phpagi 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

agiphlow/phpagi

Composer 安装命令:

composer require agiphlow/phpagi

包简介

A modernized version of the phpagi class.

README 文档

README

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.

统计信息

  • 总下载量: 133
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-2.0
  • 更新时间: 2016-04-09