PHPackages                             kamrankhosa/laravel-voipnow - 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. [API Development](/categories/api)
4. /
5. kamrankhosa/laravel-voipnow

ActiveLibrary[API Development](/categories/api)

kamrankhosa/laravel-voipnow
===========================

A production-ready Laravel package to interact with the VoipNow UnifiedAPI v5 (REST) and SystemAPI (SOAP).

1.0.0(2y ago)110MITPHPPHP ^8.1CI passing

Since Mar 9Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/haider-kamran/laravel-voipnow)[ Packagist](https://packagist.org/packages/kamrankhosa/laravel-voipnow)[ Docs](https://github.com/kamrankhosa/laravel-voipnow)[ RSS](/packages/kamrankhosa-laravel-voipnow/feed)WikiDiscussions main Synced 2d ago

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

Laravel VoipNow
===============

[](#laravel-voipnow)

[![Latest Stable Version](https://camo.githubusercontent.com/db21fdbb8d07b7b2f379a1a605a95704782c5058e969d6a9278cb1c70623a72b/68747470733a2f2f706f7365722e707567782e6f72672f68796465726b616d72616e2f6c61726176656c2d766f69706e6f772f762f737461626c65)](https://packagist.org/packages/hyderkamran/laravel-voipnow)[![Total Downloads](https://camo.githubusercontent.com/763f2f76cc0b93fabc60d9bdc211d6e2b72b8aa26833e08fdd0f152e27b2b12f/68747470733a2f2f706f7365722e707567782e6f72672f68796465726b616d72616e2f6c61726176656c2d766f69706e6f772f646f776e6c6f616473)](https://packagist.org/packages/hyderkamran/laravel-voipnow)[![License](https://camo.githubusercontent.com/d5e5a494df7cc5a8a67fdb3bf9dd6997b9b633d1b5d7d335ed0f059306f2f7fb/68747470733a2f2f706f7365722e707567782e6f72672f68796465726b616d72616e2f6c61726176656c2d766f69706e6f772f6c6963656e7365)](https://packagist.org/packages/hyderkamran/laravel-voipnow)

A production-ready Laravel package for interacting with:

- **VoipNow UnifiedAPI v5** (REST) — phone calls, events, presence, CDRs, faxes
- **VoipNow SystemAPI** (SOAP) — account provisioning, organizations, extensions, billing, PBX

Supports **Laravel 10, 11, 12** with **PHP 8.1+**.

---

Features
--------

[](#features)

- **Dual adapter** — REST (UnifiedAPI v5, default) and SOAP (SystemAPI, legacy)
- **Two facades** — `VoipNow` (REST) and `VoipNowSoap` (SystemAPI)
- **OAuth2 token management** — automatic acquisition and refresh per user or via cache
- **Typed HTTP methods** — `get()`, `post()`, `put()`, `patch()`, `delete()`
- **Pagination helper** — `paginate($resource, $page, $perPage)`
- **Resource finder** — `find($resource, $id)`
- **13 first-class REST helpers** — `GetServiceProviders()`, `GetOrganizations()`, `GetUsers()`, etc.
- **338+ SOAP operations** — full SystemAPI with IDE docblocks
- **Magic method fallback** — `VoipNow::GetCallQueues()` auto-maps to REST endpoint
- **Artisan command** — `php artisan voipnow:check` for connection diagnostics
- **Full test suite** — Orchestra Testbench + Mockery

---

Requirements
------------

[](#requirements)

RequirementVersionPHP^8.1, ^8.2, ^8.3Laravel^10.0, ^11.0, ^12.0GuzzleHttp^7.5php-soap extRequired only for SOAP adapter---

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

[](#installation)

```
composer require hyderkamran/laravel-voipnow
```

Publish the config file and migration:

```
php artisan vendor:publish --provider="HyderKamran\VoipNow\VoipNowServiceProvider"
```

Run the migration (adds token columns to your `users` table):

```
php artisan migrate
```

---

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

[](#configuration)

Add these keys to your `.env` file:

```
# Required
VOIPNOW_DOMAIN=https://voipnow.yourdomain.com
VOIPNOW_KEY=your-oauth2-client-id
VOIPNOW_SECRET=your-oauth2-client-secret

# Optional
VOIPNOW_ADAPTER=rest            # "rest" (default) or "soap"
VOIPNOW_VERSION=                # SOAP only — VoipNow version string e.g. 4.8.0
VOIPNOW_PARENT_IDENTIFIER=      # Scope calls to a specific parent account
VOIPNOW_WSDL_URL=               # SOAP only — override default WSDL URL
```

---

Usage — UnifiedAPI v5 (REST)
----------------------------

[](#usage--unifiedapi-v5-rest)

The `VoipNow` facade targets the **VoipNow UnifiedAPI v5** for real-time telephony operations.

### Core HTTP Methods

[](#core-http-methods)

```
use VoipNow;

// GET /api/v5/organizations
VoipNow::get('organizations');
VoipNow::get('organizations', ['limit' => 10, 'offset' => 0]);

// POST /api/v5/organizations
VoipNow::post('organizations', ['name' => 'Acme Corp', 'email' => 'admin@acme.com']);

// PUT /api/v5/organizations/42
VoipNow::put('organizations/42', ['name' => 'Acme Corp Updated']);

// PATCH /api/v5/extensions/101
VoipNow::patch('extensions/101', ['display_name' => 'Reception']);

// DELETE /api/v5/organizations/42
VoipNow::delete('organizations/42');
```

### Pagination &amp; Single-resource Helpers

[](#pagination--single-resource-helpers)

```
// Paginate: page 2, 25 records per page
VoipNow::paginate('users', page: 2, perPage: 25);

// Fetch single resource by ID
VoipNow::find('organizations', 42);
VoipNow::find('extensions', '101');
```

### First-class Resource Helpers

[](#first-class-resource-helpers)

```
VoipNow::GetServiceProviders();
VoipNow::GetOrganizations(['limit' => 50]);
VoipNow::GetOrganizationDetails(['ID' => 42]);
VoipNow::GetOrganizationDetails(['identifier' => 'acme']);
VoipNow::GetUsers();
VoipNow::GetExtensions(['organization_id' => 5]);
VoipNow::GetUserGroups();
VoipNow::GetChargingPlans();
VoipNow::GetPhoneNumbers();
VoipNow::GetCallQueues();
VoipNow::GetIVRs();
VoipNow::GetSounds();
VoipNow::GetCallHistory(['from' => '2024-01-01', 'to' => '2024-01-31']);
VoipNow::GetSystemInfo();
```

### Magic Method Fallback

[](#magic-method-fallback)

Any `Get*`, `Add*`, `Update*`, `Remove*` call is automatically resolved to its REST endpoint:

```
VoipNow::GetFaxes();               // GET  /api/v5/faxes
VoipNow::AddExtensions([...]);     // POST /api/v5/extensions
VoipNow::UpdateUsers([...]);       // PUT  /api/v5/users
VoipNow::RemoveExtensions([...]);  // DELETE /api/v5/extensions
```

---

Usage — SystemAPI (SOAP)
------------------------

[](#usage--systemapi-soap)

The `VoipNowSoap` facade (or `VoipNow::soap()`) targets the **VoipNow SystemAPI** for account provisioning.

> **Note:** Requires the `php-soap` extension. Set `VOIPNOW_ADAPTER=soap` is **not** required — the SOAP client is always available independently.

### Via the Dedicated Facade

[](#via-the-dedicated-facade)

```
use VoipNowSoap;

// Service Providers
VoipNowSoap::GetServiceProviders();
VoipNowSoap::AddServiceProvider(['name' => 'My SP', 'email' => 'sp@example.com']);
VoipNowSoap::GetServiceProviderDetails(['identifier' => 'my-sp']);

// Organizations
VoipNowSoap::GetOrganizations();
VoipNowSoap::AddOrganization(['name' => 'Acme', 'serviceProviderIdentifier' => 'my-sp']);
VoipNowSoap::GetOrganizationDetails(['identifier' => 'acme']);
VoipNowSoap::RemoveOrganization(['identifier' => 'acme']);

// Extensions
VoipNowSoap::GetExtensions(['organizationIdentifier' => 'acme']);
VoipNowSoap::AddExtension(['number' => '100', 'name' => 'Reception']);
VoipNowSoap::GetExtensionDetails(['identifier' => '100']);
VoipNowSoap::SetExtensionVoicemail(['identifier' => '100', 'active' => true]);

// Users
VoipNowSoap::GetUsers();
VoipNowSoap::AddUser(['login' => 'john', 'password' => 'secret']);
VoipNowSoap::GetUserDetails(['identifier' => 'john']);

// Billing
VoipNowSoap::GetChargingPlans();
VoipNowSoap::AddChargingPlan(['name' => 'Basic Plan']);
VoipNowSoap::GetCallingCards();

// PBX
VoipNowSoap::GetQueues(['organizationIdentifier' => 'acme']);
VoipNowSoap::GetIVRs(['organizationIdentifier' => 'acme']);
VoipNowSoap::GetConferences();

// Reports
VoipNowSoap::GetCallReport(['from' => '2024-01-01', 'to' => '2024-01-31']);
VoipNowSoap::GetSIPReport();

// Global
VoipNowSoap::GetTimezones();
VoipNowSoap::GetLanguages();
```

### Via the REST Facade's soap() Accessor

[](#via-the-rest-facades-soap-accessor)

```
use VoipNow;

VoipNow::soap()->GetOrganizations();
VoipNow::soap()->AddExtension(['number' => '200', 'name' => 'Sales']);
VoipNow::soap()->call('GetExtensionDetails', ['identifier' => '200']);
```

### Via the Container

[](#via-the-container)

```
$soapClient = app('voipnow.soap');
$soapClient->GetServiceProviders();
```

---

Artisan Commands
----------------

[](#artisan-commands)

```
# Test the VoipNow API connection and display config status
php artisan voipnow:check
```

Example output:

```
VoipNow Connection Check
──────────────────────────────────────────────────
  Adapter:     rest
  Domain:      https://voipnow.yourdomain.com
  Key:         ✓ Set
  Secret:      ✓ Set

Testing connection...
✓ Connection successful!

Server Info:
  version: 4.8.0
  ...

```

---

Testing
-------

[](#testing)

```
composer test
```

---

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Kamran Haider](https://github.com/haider-kamran)

Support
-------

[](#support)

[Please open an issue in GitHub](https://github.com/haider-kamran/laravel-voipnow/issues)

License
-------

[](#license)

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

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance61

Regular maintenance activity

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity51

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 ~815 days

Total

2

Last Release

31d ago

Major Versions

1.0.0 → 2.0.0.x-dev2026-06-03

PHP version history (2 changes)1.0.0PHP ^8.1

2.0.0.x-devPHP ^8.1|^8.2|^8.3

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3443560?v=4)[Syed Kamran Haider](/maintainers/kamranhaider)[@kamranhaider](https://github.com/kamranhaider)

---

Top Contributors

[![haider-kamran](https://avatars.githubusercontent.com/u/37815528?v=4)](https://github.com/haider-kamran "haider-kamran (6 commits)")

---

Tags

voipnow4psalaravel-voipnowvoipnow-laravel-packagekamrankhosa-voipnow

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/kamrankhosa-laravel-voipnow/health.svg)

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

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35916.4M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24016.2M20](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172445.0k15](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

93459.5k6](/packages/botman-driver-telegram)

PHPackages © 2026

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