PHPackages                             ofbeaton/phpami - 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. ofbeaton/phpami

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

ofbeaton/phpami
===============

Asterisk Manager Interface (AMI) for PHP 5.4+ supporting legacy v1.4 to v13 with no thrills.

1.1.4(2y ago)1637.3k↓41.8%8LGPL-2.1-onlyPHPPHP &gt;=5.4.0

Since Jul 25Pushed 2y ago3 watchersCompare

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

READMEChangelog (10)Dependencies (2)Versions (22)Used By (0)

phpami
======

[](#phpami)

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](http://phpagi.sourceforge.net/) 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
------------

[](#alternatives)

If you are dealing with only Asterisk v13+ servers, consider using [PAMI](http://marcelog.github.io/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](http://marcelog.github.io/Nami/) library for NodeJS.

Updates
-------

[](#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
-----------------------

[](#installing-via-composer)

The recommended way to install PHPAMI is through [Composer](http://getcomposer.org).

```
# 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
-------

[](#license)

This software is distributed under the LGPL 2.1 License. Please see [License file](LICENSE) for more information.

This library is a fork of the now defunc [PHPAGI](http://phpagi.sourceforge.net/) project by Matthew Asham. See [Fork release](https://github.com/ofbeaton/phpami/releases/tag/0.1) for more details.

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity39

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 75.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 ~162 days

Recently: every ~356 days

Total

19

Last Release

1025d ago

Major Versions

0.7.0 → 1.0.02016-12-12

PHP version history (2 changes)0.2PHP ^5.4

0.6.1PHP &gt;=5.4.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/bc1f698134d2f7261eeeb6b8d9d5c118fd8315496f7e4444b6d16b281e3d1287?d=identicon)[ofbeaton](/maintainers/ofbeaton)

---

Top Contributors

[![ofbeaton](https://avatars.githubusercontent.com/u/1781089?v=4)](https://github.com/ofbeaton "ofbeaton (31 commits)")[![nicchap](https://avatars.githubusercontent.com/u/14979?v=4)](https://github.com/nicchap "nicchap (6 commits)")[![russelomua](https://avatars.githubusercontent.com/u/313658?v=4)](https://github.com/russelomua "russelomua (3 commits)")[![mlan](https://avatars.githubusercontent.com/u/807721?v=4)](https://github.com/mlan "mlan (1 commits)")

---

Tags

amiasteriskphpphpagiphpamiasteriskpamiamiastxphpamiphpagipagi

###  Code Quality

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/ofbeaton-phpami/health.svg)

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

###  Alternatives

[marcelog/pami

Asterisk Manager Interface (AMI) client for PHP, event driven, object oriented

415750.6k1](/packages/marcelog-pami)[chan-sccp/pami

Asterisk Manager Interface (AMI) client for PHP, event driven, object oriented (Fork)

2952.3k](/packages/chan-sccp-pami)[pharaonic/php-dot-array

Access array data quickly/easily using dot-notation and asterisk.

1011.6k3](/packages/pharaonic-php-dot-array)

PHPackages © 2026

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