ofbeaton/phpami
Composer 安装命令:
composer require ofbeaton/phpami
包简介
Asterisk Manager Interface (AMI) for PHP 5.4+ supporting legacy v1.4 to v13 with no thrills.
README 文档
README
Asterisk Manager Interface (AMI) for PHP 5.4+ supporting legacy v1.4 to v13 with no thrills.
This is a fork and update of the AMI portion of the now defunc PHPAGI PHP 4.4 project which has not been updated since 2010.
We have kept the simplicity of a single class with command methods, adding a packagist entry and namespaces. This is a breaking change as class and method names have changed to follow modern standards, however they are a 1:1 mapping so updating your code should be straight forward.
Alternatives
If you are dealing with only Asterisk v13+ servers, consider using PAMI instead, which uses modern design paterns with observer-listener pattern. It no longer supports legacy Asterisk versions like v1.4 however. It may also see less development than the NAMI library for NodeJS.
Updates
The project is considered in a usable state and feature complete.
This project is used in corporate applications. As such, the authors are unlikely to update it on a regular basis, but instead when the corporate applications that use it run into problems. You should expect updates in the 5-10yr range.
Issues and PRs will be monitored, and we will continue to work with the community to provide updates as they are contributed.
Installing via Composer
The recommended way to install PHPAMI is through Composer.
# Install Composer curl -sS https://getcomposer.org/installer | php
Next, run the Composer command to install the latest stable version:
composer.phar require ofbeaton/phpami
After installing, you can now use it in your code:
$ami = new \PHPAMI\Ami(); if ($ami->connect('localhost:5038', 'myuser', 'mysecret', 'off') === false) { throw new \RuntimeException('Could not connect to Asterisk Management Interface.'); } // // if you have a looping of command function // // set allowTimeout flag to true // $ami->allowTimeout(); // $result contains the output from the command $result = $ami->command('core show channels'); $ami->disconnect();
License
This software is distributed under the LGPL 2.1 License. Please see License file for more information.
This library is a fork of the now defunc PHPAGI project by Matthew Asham. See Fork release for more details.
ofbeaton/phpami 适用场景与选型建议
ofbeaton/phpami 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 39.94k 次下载、GitHub Stars 达 16, 最近一次更新时间为 2015 年 07 月 25 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「asterisk」 「pami」 「ami」 「astx」 「phpami」 「phpagi」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 ofbeaton/phpami 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 ofbeaton/phpami 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 ofbeaton/phpami 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Asterisk Manager Interface (AMI) client for PHP, event driven, object oriented (Fork)
Access array data quickly/easily using dot-notation and asterisk.
PHP Asterisk Management Interface for PHP ^5.1.6 ʕ•ᴥ•ʔ
Provide asterisk ami to laravel
Fork of marcelog's Asterisk Manager Interface (AMI) client for PHP, event driven, object oriented
Asterisk Manager Interface (AMI) client for PHP, event driven, object oriented
统计信息
- 总下载量: 39.94k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 18
- 点击次数: 23
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: LGPL-2.1-only
- 更新时间: 2015-07-25