PHPackages                             ryzhov/pami - 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. ryzhov/pami

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

ryzhov/pami
===========

Asterisk Manager Interface (AMI) client for PHP forked from marcelog/pami

v1.0(9y ago)0387Apache-2.0PHPPHP &gt;=5.3.3

Since Feb 11Pushed 9y ago1 watchersCompare

[ Source](https://github.com/ryzhov/PAMI)[ Packagist](https://packagist.org/packages/ryzhov/pami)[ Docs](https://github.com/ryzhov/PAMI)[ RSS](/packages/ryzhov-pami/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

Introduction
============

[](#introduction)

This is the fork of

PAMI means PHP Asterisk Manager Interface. As its name suggests its just a set of php classes that will let you issue commands to an ami and/or receive events, using an observer-listener pattern.

Installing
==========

[](#installing)

Add this library to your [Composer](https://packagist.org/) configuration. In composer.json:

```
  "require": {
    "ryzhov/pami": "dev-master"
  }
```

QuickStart
==========

[](#quickstart)

```
// Make sure you include the composer autoload.
require __DIR__ . '/vendor/autoload.php';

$options = array(
    'host' => '2.3.4.5',
    'scheme' => 'tcp://',
    'port' => 9999,
    'username' => 'asd',
    'secret' => 'asd',
    'connect_timeout' => 10,
    'read_timeout' => 10
);
$client = new \PAMI\Client\Impl\ClientImpl($options);

// Registering a closure
$client->registerEventListener(function ($event) {
});

// Register a specific method of an object for event listening
$client->registerEventListener(array($listener, 'handle'));

// Register an IEventListener:
$client->registerEventListener($listener);
```

Using Predicates
================

[](#using-predicates)

A second (optional) argument can be used when registering the event listener: a closure that will be evaluated before calling the callback. The callback will be called only if this predicate returns true:

```
use PAMI\Message\Event\DialEvent;

$client->registerEventListener(
    array($listener, 'handleDialStart'),
    function ($event) {
        return $event instanceof DialEvent && $event->getSubEvent() == 'Begin';
    })
);
```

Debugging, logging
------------------

[](#debugging-logging)

You can optionally set a [PSR-3](http://www.php-fig.org/psr/psr-3/) compatible logger:

```
$pami->setLogger($logger);
```

By default, the client will use the [NullLogger](http://www.php-fig.org/psr/psr-3/#1-4-helper-classes-and-interfaces).

Thanks To
=========

[](#thanks-to)

- Marcelo Gornstein
- Jason Blank for helping in the debugging of the queue functionality and some other ami inconsistencies.
- Francesco Usseglio Gaudi, for help in debugging the Originate action.
- Matías Barletta, for the vgms support.
- Eli Hunter, for helping in bringing in tls compatibility.
- Freddy dafredmail at googlemail, for his help and testing environment to add dongle support.
- Joshua Elson for his help in trying and debugging in loaded asterisk servers.
- Jacob Kiers for his help in bringing in and testing async agi functionality, and CEL event support.
- Richard Baar for noticing the lack of eof support when reading from socket, the JabberEvent, and the ScreenName in JabberAction.
- Scot Opell for helping in debugging stream\_get\_line() in 5.3.9 and 5.3.10
- Brian (wormling) for trying and fixing bugs on asyncagi
- Henning Bragge for helping with newstate event and queues.
- mbonneau for ParkedCall and UnParkedCall events.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 81.3% 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

Unknown

Total

1

Last Release

3378d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2189a79fd5d3ed36d1939ee18ecb27fd641bcb63c81eb8f6bb265cde4a544a95?d=identicon)[anryzhov](/maintainers/anryzhov)

---

Top Contributors

[![marcelog](https://avatars.githubusercontent.com/u/527356?v=4)](https://github.com/marcelog "marcelog (318 commits)")[![ryzhov](https://avatars.githubusercontent.com/u/912521?v=4)](https://github.com/ryzhov "ryzhov (44 commits)")[![shinomontaz](https://avatars.githubusercontent.com/u/9953247?v=4)](https://github.com/shinomontaz "shinomontaz (6 commits)")[![drakhar-mike](https://avatars.githubusercontent.com/u/3764278?v=4)](https://github.com/drakhar-mike "drakhar-mike (6 commits)")[![jacobkiers](https://avatars.githubusercontent.com/u/402504?v=4)](https://github.com/jacobkiers "jacobkiers (4 commits)")[![AlmogBaku](https://avatars.githubusercontent.com/u/98982?v=4)](https://github.com/AlmogBaku "AlmogBaku (3 commits)")[![mstyles](https://avatars.githubusercontent.com/u/1187931?v=4)](https://github.com/mstyles "mstyles (3 commits)")[![StrikeForceZero](https://avatars.githubusercontent.com/u/983413?v=4)](https://github.com/StrikeForceZero "StrikeForceZero (2 commits)")[![wormling](https://avatars.githubusercontent.com/u/1608160?v=4)](https://github.com/wormling "wormling (1 commits)")[![pkirk](https://avatars.githubusercontent.com/u/417485?v=4)](https://github.com/pkirk "pkirk (1 commits)")[![richardfullmer](https://avatars.githubusercontent.com/u/384602?v=4)](https://github.com/richardfullmer "richardfullmer (1 commits)")[![thomasvargiu](https://avatars.githubusercontent.com/u/732012?v=4)](https://github.com/thomasvargiu "thomasvargiu (1 commits)")[![tomcastleman](https://avatars.githubusercontent.com/u/1532660?v=4)](https://github.com/tomcastleman "tomcastleman (1 commits)")

---

Tags

eventclientasteriskamiactionvoiptelephony

### Embed Badge

![Health badge](/badges/ryzhov-pami/health.svg)

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

###  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)[marcelog/pagi

Asterisk Gateway Interface (AGI) client for PHP, suitable to make telephony applications using call flow nodes

192133.7k16](/packages/marcelog-pagi)[wormling/phparia

Asterisk REST Interface (ARI) client for PHP.

419.8k](/packages/wormling-phparia)

PHPackages © 2026

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