PHPackages                             azima/laravel-esl - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. azima/laravel-esl

ActiveLibrary[HTTP &amp; Networking](/categories/http)

azima/laravel-esl
=================

A Laravel package for Azima ESL connection.

1.0.0(5mo ago)05MITPHPPHP &gt;=8.0

Since Dec 12Pushed 5mo agoCompare

[ Source](https://github.com/Mahmoudalziem/laravel-esl)[ Packagist](https://packagist.org/packages/azima/laravel-esl)[ Docs](https://github.com/Mahmoudalziem/Azima-larave-esl)[ RSS](/packages/azima-laravel-esl/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

Laravel ESL
===========

[](#laravel-esl)

A Laravel package for connecting to and interacting with a Azima ESL (Event Socket Library) server.

Features
--------

[](#features)

- Easy configuration for Azima ESL connection details.
- Fluent API for sending commands to Azima.
- Handles connection and authentication automatically.
- Provides a `Esl` facade for convenient access.
- Includes a custom exception for robust error handling.
- Automatic resource management (disconnection).

Installation
------------

[](#installation)

You can install the package via Composer:

```
composer require Azima/laravel-esl
```

The package will automatically register its service provider and facade.

Configuration
-------------

[](#configuration)

To publish the configuration file, run the following command:

```
php artisan vendor:publish --provider="Azima\LaravelEsl\LaravelEslServiceProvider"
```

This will create a `config/esl.php` file in your application's config directory. You can then configure your Azima ESL connection details in your `.env` file:

```
ESL_HOST=127.0.0.1
ESL_PORT=8021
ESL_PASSWORD=ClueCon

```

Usage
-----

[](#usage)

You can interact with the Azima ESL server in two primary ways:

### Using the `Esl` Facade

[](#using-the-esl-facade)

The `Esl` facade provides a quick and easy way to send commands.

```
use Azima\LaravelEsl\Facades\Esl;
use Azima\LaravelEsl\EslConnectionException;

try {
    // Execute the 'status' command
    $response = Esl::execute('status');
    echo "Azima Status:\n";
    print_r($response);

    // Originate a call
    $uuid = Esl::execute('originate user/1000 &echo');
    echo "Call UUID: " . $uuid;

} catch (EslConnectionException $e) {
    // Handle connection or authentication errors
    Log::error('ESL Connection failed: ' . $e->getMessage());
}
```

### Using a Custom Connection

[](#using-a-custom-connection)

For situations where you need to connect to a different Azima server on-the-fly, you can use the `connection()` method before executing a command. This will not affect the default connection configuration.

```
use Azima\LaravelEsl\Facades\Esl;
use Azima\LaravelEsl\EslConnectionException;

try {
    // Use the default connection from your config
    $defaultStatus = Esl::execute('status');

    // Connect to a different server for a specific command
    $customStatus = Esl::connection('10.0.1.5', 8021, 'another_password')
                       ->execute('status');

} catch (EslConnectionException $e) {
    Log::error('ESL command failed: ' . $e->getMessage());
}
```

### Available Command Methods

[](#available-command-methods)

The package provides the following helper methods for common API commands to make your code more readable.

```
// Get the server status
$status = Esl::status();

// Get a list of all active channels
$channels = Esl::showChannels();

// Get a list of all active calls
$calls = Esl::showCalls();

// Get the global sofia status
$sofiaStatus = Esl::sofiaStatus();

// Get the status of a specific sofia profile
$profileStatus = Esl::sofiaStatusProfile('internal');
```

For any command that does not have a dedicated helper method, you can use the `execute()` method directly:

```
// For example, to get the server uptime
$uptime = Esl::execute('uptime');
```

### Using Dependency Injection

[](#using-dependency-injection)

You can also type-hint the `EslConnection` class in your controllers or other classes to have it automatically injected by Laravel's service container.

```
use Azima\LaravelEsl\EslConnection;
use Azima\LaravelEsl\EslConnectionException;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Log;

class CallController extends Controller
{
    private $esl;

    public function __construct(EslConnection $esl)
    {
        $this->esl = $esl;
    }

    public function makeCall(Request $request)
    {
        try {
            $destination = $request->input('destination', 'user/1001');
            $uuid = $this->esl->execute("originate sofia/gateway/my_gateway/{$destination} &echo");
            return response()->json(['message' => 'Call initiated.', 'uuid' => $uuid]);
        } catch (EslConnectionException $e) {
            Log::error('ESL command failed: ' . $e->getMessage());
            return response()->json(['error' => 'Failed to initiate call.'], 500);
        }
    }
}
```

### Response Parsing

[](#response-parsing)

Currently, the `execute` method returns the raw response body from the Azima API command. Future versions will include a more sophisticated parser to return structured data.

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance73

Regular maintenance activity

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 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

151d ago

### Community

Maintainers

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

---

Top Contributors

[![Mahmoudalziem](https://avatars.githubusercontent.com/u/34794206?v=4)](https://github.com/Mahmoudalziem "Mahmoudalziem (1 commits)")

---

Tags

gsmeslevent socketazima

### Embed Badge

![Health badge](/badges/azima-laravel-esl/health.svg)

```
[![Health](https://phpackages.com/badges/azima-laravel-esl/health.svg)](https://phpackages.com/packages/azima-laravel-esl)
```

###  Alternatives

[danharrin/livewire-rate-limiting

Apply rate limiters to Laravel Livewire actions.

40423.1M27](/packages/danharrin-livewire-rate-limiting)[mateusjunges/laravel-kafka

A kafka driver for laravel

7163.1M17](/packages/mateusjunges-laravel-kafka)[ricorocks-digital-agency/soap

A SOAP client that provides a clean interface for handling requests and responses.

4281.8M5](/packages/ricorocks-digital-agency-soap)[api-platform/laravel

API Platform support for Laravel

59126.4k6](/packages/api-platform-laravel)[laravel-shift/curl-converter

A command line tool to convert curl requests to Laravel HTTP requests.

935.3k](/packages/laravel-shift-curl-converter)[illuminatech/data-provider

Allows easy build for DB queries from API requests

4413.3k](/packages/illuminatech-data-provider)

PHPackages © 2026

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