PHPackages                             shahkochaki/ami-laravel-asterisk-manager-interface - 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. shahkochaki/ami-laravel-asterisk-manager-interface

ActiveLibrary

shahkochaki/ami-laravel-asterisk-manager-interface
==================================================

A modern Laravel package for connecting to VOIP servers on Asterisk/Issabel platform via AMI with advanced system management. Supports PHP 8+ and Laravel 9-12.

v2.2.6(6mo ago)12417↓100%[1 issues](https://github.com/shahkochaki/ami-laravel-asterisk-manager-interface/issues)MITPHPPHP &gt;=8.0

Since Oct 15Pushed 6mo ago1 watchersCompare

[ Source](https://github.com/shahkochaki/ami-laravel-asterisk-manager-interface)[ Packagist](https://packagist.org/packages/shahkochaki/ami-laravel-asterisk-manager-interface)[ Docs](https://github.com/shahkochaki/ami-laravel-asterisk-manager-interface)[ RSS](/packages/shahkochaki-ami-laravel-asterisk-manager-interface/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (10)Versions (13)Used By (0)

AMI - Laravel Asterisk Manager Interface
========================================

[](#ami---laravel-asterisk-manager-interface)

[![AMI Logo](https://raw.githubusercontent.com/shahkochaki/ami-laravel-asterisk-manager-interface/main/logo.png)](https://raw.githubusercontent.com/shahkochaki/ami-laravel-asterisk-manager-interface/main/logo.png)

[![Latest Version on Packagist](https://camo.githubusercontent.com/12e596e36787f733ee97a553e7474523f65657473637da153f71b256f681e47c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f736861686b6f6368616b692f616d692d6c61726176656c2d617374657269736b2d6d616e616765722d696e746572666163652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/shahkochaki/ami-laravel-asterisk-manager-interface)[![Total Downloads](https://camo.githubusercontent.com/bdda8b4ec7bc37b1e71bf978a22b53f9228a486a5fb9a6d926c18038a91f6586/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f736861686b6f6368616b692f616d692d6c61726176656c2d617374657269736b2d6d616e616765722d696e746572666163652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/shahkochaki/ami-laravel-asterisk-manager-interface)[![License](https://camo.githubusercontent.com/902babcdaea462b954380a5cf2a41165103bee18a677ad9cb2e1b7ac14b4dbae/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f736861686b6f6368616b692f616d692d6c61726176656c2d617374657269736b2d6d616e616765722d696e746572666163652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/shahkochaki/ami-laravel-asterisk-manager-interface)[![PHP Version](https://camo.githubusercontent.com/a2d2df2eac311b33fd65961806ab750f34b73eb73630315fe0c1045d4faade9e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f736861686b6f6368616b692f616d692d6c61726176656c2d617374657269736b2d6d616e616765722d696e746572666163652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/shahkochaki/ami-laravel-asterisk-manager-interface)

A powerful and easy-to-use Laravel package for connecting to VOIP servers on the Issabel and Asterisk platform via Asterisk Manager Interface (AMI).

✨ Key Features
--------------

[](#-key-features)

- 🔗 **Easy AMI Connection** - Simplified connection management
- 📱 **SMS Messaging** - Send SMS via Chan Dongle
- 📞 **Call Control** - Complete call management and monitoring
- 🎧 **Queue Management** - Advanced call queue handling
- 📊 **Real-time Monitoring** - Live event monitoring and logging
- �️ **System Management** - Server shutdown, restart, and configuration reload
- �🔧 **CLI Commands** - Powerful command-line interface
- 📋 **Interactive CLI** - User-friendly interactive console
- 🌐 **USSD Support** - Execute USSD commands seamlessly
- ⚡ **Async Processing** - Asynchronous event handling with ReactPHP
- 🔒 **High Security** - Secure authentication and connection management
- 📅 **Scheduled Operations** - Queue-based scheduled system operations

📋 Requirements
--------------

[](#-requirements)

- PHP &gt;= 8.0
- Laravel &gt;= 9.0
- Asterisk/Issabel server with AMI enabled
- Chan Dongle (for SMS and USSD functionality)
- Extension `ext-mbstring`

🔄 Version Compatibility
-----------------------

[](#-version-compatibility)

Package VersionPHP VersionLaravel VersionFeaturesStatus2.2.58.0+9.0-12Console Command Fix, Docker✅ Latest2.2.x8.0+9.0-12System Management, Queue Jobs✅ Current2.1.x8.0+9.0-11Enhanced Features✅ Stable2.0.x8.0+9.0-10Modern PHP Features✅ LTS1.x5.6+5.1+Basic AMI Operations⚠️ Legacy**Note**: Version 2.2.5 includes Docker compatibility fixes and enhanced console command handling.

🚀 Installation
--------------

[](#-installation)

### Step 1: Install via Composer

[](#step-1-install-via-composer)

```
# Latest stable release (v2.2.5)
composer require shahkochaki/ami-laravel-asterisk-manager-interface

# Or specify exact version
composer require shahkochaki/ami-laravel-asterisk-manager-interface:^2.2.5

# For development version
composer require shahkochaki/ami-laravel-asterisk-manager-interface:dev-master
```

### Docker Installation

[](#docker-installation)

For Docker environments, add a `.dockerignore` file to your project root:

```
vendor/
composer.lock
.git/
.env
node_modules/
*.patch
patches/

```

And use this in your Dockerfile:

```
# Install PHP dependencies
RUN composer install --no-interaction --prefer-dist --optimize-autoloader --no-cache

# Alternative for complex patch scenarios
RUN composer install --no-interaction --prefer-dist --optimize-autoloader --no-plugins
```

### Step 2: Register Service Provider

[](#step-2-register-service-provider)

**For Laravel 9+:** The service provider will be automatically discovered.

**For older versions:** Add to your `config/app.php` in the `providers` array:

```
'providers' => [
    // Other providers...
    Shahkochaki\Ami\Providers\AmiServiceProvider::class,
]
```

### Step 3: Publish Configuration

[](#step-3-publish-configuration)

```
php artisan vendor:publish --tag=ami
```

This will create the `config/ami.php` configuration file.

🔄 Upgrading from v1.x
---------------------

[](#-upgrading-from-v1x)

If you're upgrading from an older version that supported PHP 5.6+ and Laravel 5.1+:

### 1. Update PHP and Laravel

[](#1-update-php-and-laravel)

```
# Make sure you have PHP 8.0+ and Laravel 9.0+
php --version
php artisan --version
```

### 2. Update the package

[](#2-update-the-package)

```
composer require shahkochaki/ami-laravel-asterisk-manager-interface
```

### 3. Update your code

[](#3-update-your-code)

- Replace `array_get()` helper with `Arr::get()`
- Update event listener syntax if needed
- Check deprecated Laravel features

### 4. Test thoroughly

[](#4-test-thoroughly)

```
php artisan ami:action Ping
```

⚙️ Configuration
----------------

[](#️-configuration)

### AMI Configuration in Asterisk

[](#ami-configuration-in-asterisk)

Before using the package, you need to create an AMI user in Asterisk. Edit `/etc/asterisk/manager.conf`:

```
[general]
enabled = yes
port = 5038
bindaddr = 0.0.0.0

[myuser]
secret = mypassword
read = all
write = all
```

After making changes, reload Asterisk:

```
asterisk -rx "manager reload"
```

### Laravel Configuration

[](#laravel-configuration)

Edit the `config/ami.php` file:

```
