PHPackages                             akramghaleb/laravel-grandstream - 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. akramghaleb/laravel-grandstream

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

akramghaleb/laravel-grandstream
===============================

Laravel SDK for Grandstream Devices

v2.0.0(1mo ago)144MITPHPPHP ^8.3CI failing

Since Oct 18Pushed 1mo agoCompare

[ Source](https://github.com/akramghaleb/laravel-grandstream)[ Packagist](https://packagist.org/packages/akramghaleb/laravel-grandstream)[ Docs](https://github.com/akramghaleb/laravel-grandstream)[ GitHub Sponsors]()[ RSS](/packages/akramghaleb-laravel-grandstream/feed)WikiDiscussions main Synced today

READMEChangelog (4)Dependencies (26)Versions (5)Used By (0)

Laravel SDK for Grandstream Devices
===================================

[](#laravel-sdk-for-grandstream-devices)

[![Latest Version on Packagist](https://camo.githubusercontent.com/9376381e2a817d2d224c0cb2c7232cd05fbc672b0fd139eb78d8c6aaf88e2d36/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f616b72616d6768616c65622f6c61726176656c2d6772616e6473747265616d2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/akramghaleb/laravel-grandstream)[![Total Downloads](https://camo.githubusercontent.com/d7cf54c11139bdddb1f42c7a690f8129fb04bc7b3ae9e62a596ea49bc7daba13/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f616b72616d6768616c65622f6c61726176656c2d6772616e6473747265616d2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/akramghaleb/laravel-grandstream)

---

📦 Overview
----------

[](#-overview)

**Laravel Grandstream** is a clean SDK for integrating Laravel apps with **Grandstream UCM** PBX devices.
It simplifies REST API communication, including:

- Challenge → Token → Cookie authentication flow
- Cached login cookies per user/session
- Unified API request handling with auto-retry on cookie expiration
- Easy integration into Filament dashboards or CRM systems

Ideal for **real-time call monitoring**, **extension management**, or **PBX-based CRM dashboards**.

---

⚡ Compatibility
---------------

[](#-compatibility)

This package is designed to support a wide range of PHP and Laravel versions:

Laravel VersionPHP Version**Laravel 10.x**`^8.3`**Laravel 11.x**`^8.3`**Laravel 12.x**`^8.3`**Laravel 13.x**`^8.3`---

📖 Official API Reference
------------------------

[](#-official-api-reference)

The complete Grandstream HTTPS API documentation is available here:
👉 [**Grandstream UCM6xxx HTTPS API Guide (PDF)**](https://www.grandstream.com/hubfs/Product_Documentation/UCM_API_Guide.pdf)

It includes:

- Authentication flow (**`challenge`** → **`login`**)
- Voice &amp; call control endpoints (**listBridgedChannels**, **Hangup**, **CallTransfer**, etc.)
- CDR &amp; Recording APIs (**cdrapi**, **recapi**)
- Error codes and result structures

> This Laravel package aligns with the same API structure and request schema described in that official document.

---

⚙️ Installation
---------------

[](#️-installation)

Install the package via Composer:

```
composer require akramghaleb/laravel-grandstream

```

Then publish the configuration file:

```
php artisan vendor:publish --tag="laravel-grandstream-config"

```

---

🔧 Configuration
---------------

[](#-configuration)

A `config/grandstream.php` file will be created.
Add your device credentials to `.env`:

```
UCM_BASE=https://your-ucm-ip
UCM_API_USER=apiuser
UCM_API_PASS=apipassword
UCM_API_VER=1.2
UCM_COOKIE_TTL=9
GRANDSTREAM_WEBHOOK_USER=admin
GRANDSTREAM_WEBHOOK_PASS=password

```

---

🚀 Usage
-------

[](#-usage)

Use the **Facade** for simple calls:

```
use AkramGhaleb\LaravelGrandstream\Facades\Grandstream;

// Example: List extensions
$response = Grandstream::listAccount();

// Example: Fetch call records (CDR)
$cdr = Grandstream::getData('cdrapi', ['format' => 'json']);
```

The package automatically retries failed requests when cookies expire (`-6`, `-8`, `-37`).

---

🧩 Example Response
------------------

[](#-example-response)

```
{
    "status": 0,
    "response": {
        "total": 125,
        "cdr": [
            {
            "call_time": "2025-10-18 09:14:23",
            "src": "1001",
            "dst": "1002",
            "duration": "00:00:12",
            "disposition": "ANSWERED"
            }
        ]
    }
}
```

---

🧱 Advanced Usage
----------------

[](#-advanced-usage)

Inject it directly instead of using the Facade:

```
use AkramGhaleb\LaravelGrandstream\Grandstream;

class CallController
{
    public function index()
    {
        $calls = Grandstream::listUnBridgedChannels();
        return $calls;
    }
}
```

---

🧪 Testing
---------

[](#-testing)

```
composer test

```

---

📝 Changelog
-----------

[](#-changelog)

See [CHANGELOG](CHANGELOG.md) for details.

---

🤝 Contributing
--------------

[](#-contributing)

Contributions are welcome!
Please read [CONTRIBUTING.md](CONTRIBUTING.md) before submitting a PR.

---

🛡️ Security
-----------

[](#️-security)

For security vulnerabilities, please review [our security policy](../../security/policy).

---

👨‍💻 Credits
-----------

[](#‍-credits)

- [Akram Ghaleb](https://github.com/akramghaleb)
- [All Contributors](../../contributors)

---

📄 License
---------

[](#-license)

This project is open-source software licensed under the **MIT License**.
See [LICENSE](LICENSE.md) for more information.

---

🌍 Support
---------

[](#-support)

If you find this package useful, please ⭐ it on [GitHub](https://github.com/akramghaleb/laravel-grandstream).
You can also support by sharing feedback, contributing, or improving documentation.

###  Health Score

43

—

FairBetter than 89% of packages

Maintenance91

Actively maintained with recent releases

Popularity10

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity54

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

Every ~70 days

Total

4

Last Release

45d ago

Major Versions

v1.0.2 → v2.0.02026-05-19

PHP version history (2 changes)v1.0.0PHP ^8.4

v1.0.1PHP ^8.3

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/46090581?v=4)[Akram Ghaleb](/maintainers/akramghaleb)[@akramghaleb](https://github.com/akramghaleb)

---

Top Contributors

[![akramghaleb](https://avatars.githubusercontent.com/u/46090581?v=4)](https://github.com/akramghaleb "akramghaleb (29 commits)")

---

Tags

laravelgrandstreamAkram Ghaleblaravel-grandstream

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/akramghaleb-laravel-grandstream/health.svg)

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

###  Alternatives

[spatie/laravel-pdf

Create PDFs in Laravel apps

1.0k4.8M47](/packages/spatie-laravel-pdf)[codewithdennis/filament-select-tree

The multi-level select field enables you to make single selections from a predefined list of options that are organized into multiple levels or depths.

329530.5k29](/packages/codewithdennis-filament-select-tree)[worksome/exchange

Check Exchange Rates for any currency in Laravel.

124603.0k](/packages/worksome-exchange)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3914.6k](/packages/rawilk-profile-filament-plugin)[tarfin-labs/event-machine

Event-driven state machines for Laravel with event sourcing, type-safe context, and full audit trail.

199.4k](/packages/tarfin-labs-event-machine)[tapp/filament-form-builder

User facing form builder using Filament components

132.4k3](/packages/tapp-filament-form-builder)

PHPackages © 2026

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