PHPackages                             radiusone/phpagi - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. radiusone/phpagi

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

radiusone/phpagi
================

PHPAGI is a PHP class for the Asterisk Gateway Interface.

v3.0.3(1y ago)01221LGPL-2.1-or-laterPHPPHP ^7.4|^8.0

Since Aug 14Pushed 1y agoCompare

[ Source](https://github.com/radiusone/phpagi)[ Packagist](https://packagist.org/packages/radiusone/phpagi)[ RSS](/packages/radiusone-phpagi/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)Dependencies (1)Versions (5)Used By (0)

PhpAgi Readme
-------------

[](#phpagi-readme)

Welcome to PhpAgi.

PhpAgi is a set of PHP classes for use in developing applications with the Asterisk Gateway Interface and Asterisk Manager Interface, and is licensed under the GNU Lesser General Public License (see COPYING for terms).

Compatibility
-------------

[](#compatibility)

This release (version 3) of the PhpAgi classes is a significant overhaul from the old versions. Classes have been namespaced and renamed. Class properties are now strictly typed, as are method parameters and returns. Many new methods have been added, and old ones may have been renamed or had their signatures and behaviour changed from the previous version.

A possibly-not-exhaustive list of backwards-incompatible changes includes:

 AGI::evaluate(string $command, ...$args)  The value of the `code` element of the return array will now always be an integer; the values of all other elements will always be strings. This is a private method, but its return is used for all AGI command methods.   Not a breaking change, but previously this method only accepted one string parameter. Now, if multiple parameters are provided, the first is treated as a `printf()` format specification, and remaining ones are passed into the string. When using this mode, any string values are wrapped in double quotes.  AGI::exec(string $application, array $args)  Previously, `$args` could be a string or an array. Now, only an array can be passed.  AMI::Atxfer(string $Channel, string $Exten, string $Context, string $ActionID = null)  The `$Priority` parameter is not supported by Asterisk and has been removed.  AMI::Getvar(string $Variable, string $Channel = null, string $ActionID = null) AMI::Setvar(string $Variable, string $Value, string $Channel = null, string $ActionID = null)  The `$Variable` and `$Channel` parameters have swapped places, as the channel is now optional. If ommitted, a global variable will instead be returned or set.  AMI::Originate(string $Channel, string $Exten = null, string $Context = null, string $Priority = null, string $Application = null, string $Data = null, $Timeout = 0, string $Variable = null, string $Account = null, bool $Async = false, string $ActionID = null, bool $EarlyMedia = false, string $Codecs = null, string $ChannelId = null, string $OtherChannelId = null, string $CallerID = null) AMI::ParkedCalls(string $ParkingLot = null, string $ActionID = null) AMI::QueueStatus(string $Queue = null, string $Member = null, string $ActionID = null) AMI::Status(string $Channel = null, string $Variables = null, bool $AllVariables = false, string $ActionID = null)  One ore more additional parameters were added to match updates to the AMI commands. For consistency with other methods, the new parameters were inserted, keeping `$ActionID` as the last parameter.  AMI::Redirect(string $Channel, string $Exten, string $Context, string $Priority, string $ExtraChannel = null, string $ExtraExten = null, string $ExtraContext = null, string $ExtraPriority = null, string $ActionID = null)  The parameters of this method have been extensively changed to reflect that the `$ExtraChannel` parameter is optional, and to allow the setting of other optional `$Extra*` values. Installation
------------

[](#installation)

The preferred way to install this extension is through [composer](https://getcomposer.org/download/).

```
composer require radiusone/phpagi "^3.0"
```

Files
-----

[](#files)

- src/AGI.php - The AGI class.
- src/AMI.php - The Asterisk Manager class.
- src/fastagi.php - An example of a basic FastAGI server.
- docs/ - README files for the classes.
- api-docs/ - API Documentation (html)

Docs
----

[](#docs)

- README - The main README
- README.ami - The AMI README
- README.fastagi - FastAGI README
- phpagi.example.conf - An example configuration file
- fastagi.xinetd - xinetd.conf sample configuration for the FastAGI server

SUPPORT
-------

[](#support)

Support for phpagi is available from the project website.

-

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 71.6% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~153 days

Total

4

Last Release

548d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5f1b1302776c4525733937022fdbf5fbcf0f1d35ed775de03cc9280513e1890e?d=identicon)[miken32](/maintainers/miken32)

---

Top Contributors

[![miken32](https://avatars.githubusercontent.com/u/1329102?v=4)](https://github.com/miken32 "miken32 (68 commits)")[![DmitryMCN](https://avatars.githubusercontent.com/u/24269581?v=4)](https://github.com/DmitryMCN "DmitryMCN (9 commits)")[![alexeevdv](https://avatars.githubusercontent.com/u/597839?v=4)](https://github.com/alexeevdv "alexeevdv (4 commits)")[![FreeSS](https://avatars.githubusercontent.com/u/4200978?v=4)](https://github.com/FreeSS "FreeSS (4 commits)")[![sebastianberm](https://avatars.githubusercontent.com/u/6470150?v=4)](https://github.com/sebastianberm "sebastianberm (3 commits)")[![Arbuzov](https://avatars.githubusercontent.com/u/1662280?v=4)](https://github.com/Arbuzov "Arbuzov (2 commits)")[![ipoddubny](https://avatars.githubusercontent.com/u/1784421?v=4)](https://github.com/ipoddubny "ipoddubny (1 commits)")[![Bdido86](https://avatars.githubusercontent.com/u/2090126?v=4)](https://github.com/Bdido86 "Bdido86 (1 commits)")[![nedlosster](https://avatars.githubusercontent.com/u/9947598?v=4)](https://github.com/nedlosster "nedlosster (1 commits)")[![ricventu](https://avatars.githubusercontent.com/u/3369838?v=4)](https://github.com/ricventu "ricventu (1 commits)")[![CodeLingoBot](https://avatars.githubusercontent.com/u/45469328?v=4)](https://github.com/CodeLingoBot "CodeLingoBot (1 commits)")

### Embed Badge

![Health badge](/badges/radiusone-phpagi/health.svg)

```
[![Health](https://phpackages.com/badges/radiusone-phpagi/health.svg)](https://phpackages.com/packages/radiusone-phpagi)
```

###  Alternatives

[composer/composer

Composer helps you declare, manage and install dependencies of PHP projects. It ensures you have the right stack everywhere.

29.4k187.2M2.6k](/packages/composer-composer)[vlucas/phpdotenv

Loads environment variables from `.env` to `getenv()`, `$\_ENV` and `$\_SERVER` automagically.

13.5k602.4M5.4k](/packages/vlucas-phpdotenv)[friendsofphp/php-cs-fixer

A tool to automatically fix PHP code style

13.5k234.7M20.6k](/packages/friendsofphp-php-cs-fixer)[rubix/ml

A high-level machine learning and deep learning library for the PHP language.

2.2k1.4M28](/packages/rubix-ml)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

728272.9k20](/packages/civicrm-civicrm-core)[jmikola/geojson

GeoJSON implementation for PHP

3109.0M77](/packages/jmikola-geojson)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
