PHPackages                             ryzhov/asterisk-bundle - 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/asterisk-bundle

ActiveSymfony-bundle[Utility &amp; Helpers](/categories/utility)

ryzhov/asterisk-bundle
======================

AsteriskBundle for symfony framework

v1.0(9y ago)316041MITPHPPHP &gt;=5.3.2

Since Feb 11Pushed 9y ago2 watchersCompare

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

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

AsteriskBundle
==============

[](#asteriskbundle)

The `AsteriskBundle` provides integration of the [Asterisk PAMI](https://github.com/ryzhov/PAMI)library into the Symfony2 framework.

License
=======

[](#license)

This bundle is released under the [MIT license](LICENSE)

Installation
============

[](#installation)

Require the bundle and its dependencies with composer:

```
$ composer require ryzhov/asterisk-bundle
```

Register the bundle:

```
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        new Ryzhov\Bundle\AsteriskBundle(),
    );
}
```

Usage
=====

[](#usage)

Add the `asterisk` section in your configuration file:

```
asterisk:
    connections:
        default:
            host: "%asterisk_host%"
            port: "%asterisk_ami_port%"
            username: "%asterisk_ami_username%"
            secret: "%asterisk_ami_secret%"
            connect_timeout: 5
            read_timeout: 5

    clients:
        main:
            connection: default
            logger_channel: ami
```

Here we configure the connection parameter and the AMI client that our application will have. In this example your service container will contain the service `asterisk.main_client` and `asterisk.ami_connection.default` connection parameters. AMI client service interface reference here [Asterisk PAMI](https://github.com/ryzhov/PAMI).

Register async event handler with tag `asterisk.ami_event_handler` will handle only specified events.

```
parameters:
    events:
        - "PAMI\\Message\\Event\\DeviceStateChangeEvent"
        - "PAMI\\Message\\Event\\PeerStatusEvent"

services:
    service.event_handler:
        class: AppBundle\Service\EventHandler
        calls:
            - [setLogger, ["@logger"]]
        tags:
            - { name: monolog.logger, channel: event }
            - { name: asterisk.ami_event_handler, client: asterisk.main_client, events: "%events%" }
```

Event handler example:

```
namespace AppBundle\Service;

use PAMI\Listener\IEventListener;
use PAMI\Message\Event\EventMessage;

class EventHandler implements IEventListener
{
    . . .

    public function handle(EventMessage $event)
    {
        $this->logger->debug(sprintf('class: "%s" handle', get_class($event)));
    }
}
```

This is example of code [ryzhov/example-asterisk-ami](https://github.com/ryzhov/example-asterisk-ami)

```
$ composer create-project ryzhov/example-asterisk-ami
-- configure ami socket parameters here --
asterisk_host (localhost): 127.0.0.1
asterisk_ami_port (5038):
asterisk_ami_username (ami):
asterisk_ami_secret (pass4ami):
--

$ cd example-asterisk-ami
$ php bin/console event-handler
```

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

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

[![ryzhov](https://avatars.githubusercontent.com/u/912521?v=4)](https://github.com/ryzhov "ryzhov (10 commits)")

---

Tags

eventclientasteriskamivoiptelephonysip

### Embed Badge

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

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

###  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)[wormling/phparia

Asterisk REST Interface (ARI) client for PHP.

419.8k](/packages/wormling-phparia)[mikopbx/core

Free PBX system for SMB based on Asterisk

5271.4k](/packages/mikopbx-core)

PHPackages © 2026

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