PHPackages                             chinasearch/digium-switchvox-api - 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. chinasearch/digium-switchvox-api

ActiveLibrary[API Development](/categories/api)

chinasearch/digium-switchvox-api
================================

PHP wrapper for Switchvox API, Forked from Shrimpwagon

1.1.3(3y ago)0114MITPHP

Since Sep 2Pushed 3y agoCompare

[ Source](https://github.com/chinasearch/digium-switchvox-api)[ Packagist](https://packagist.org/packages/chinasearch/digium-switchvox-api)[ Docs](http://github.com/chinasearch/digium-switchvox-api)[ RSS](/packages/chinasearch-digium-switchvox-api/feed)WikiDiscussions master Synced today

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

Digium Switchvox API
====================

[](#digium-switchvox-api)

PHP wrapper for the Digium Switchvox API.

Features
========

[](#features)

This makes simple Switchvox's requests in JSON or XML.

Digium's [PHP client library](http://developers.digium.com/switchvox/?pageView=phpLibrary) requires a PEAR and PECL package whereas this implementation does not require them.

Usage
=====

[](#usage)

```
$client = new Switchvox\SwitchvoxClient();
$client->user = 'admin';
$client->password = '1234';
$client->uri = 'https://somedigiumendpoint.com';

// By default it will not care if the SSL cert is valid, to change:
$client->strict_ssl = true;

// Timeout in seconds, default is 10 seconds
$client->timeout = 15;

// If JSON is preferred (default):
$client->data_type = 'json';

// If XML is preferred:
$client->data_type = 'xml';

// Request a method with parameters
$params = [
	'sort_field' => 'number',
	'sort_order' => 'ASC',
	'items_per_page' => '9999',
	'page_number' => '1'
];

$response = $client->send('switchvox.directories.getExtensionList', $params);

// Request without parameters
$response = $client->send('switchvox.directories.getInfo');

```

Notes
=====

[](#notes)

The `strict_ssl` feature correlates to the [Httpful\\Request timeout](http://phphttpclient.com/docs/class-Httpful.Request.html#_withoutStrictSSL).

All Digium Switchvox web service methods can be found [here](http://developers.digium.com/switchvox/wiki/index.php/WebService_methods).

The `send` method returns a [Httpful\\Response object](http://phphttpclient.com/docs/class-Httpful.Response.html).

Testing
=======

[](#testing)

To run tests in phpunit you must use your own environment variables for user and password:

```
$ SWITCHVOX_USER= SWITCHVOX_PASSWORD= phpunit -v --debug

```

For development you can get a [free demo Digium Switchbox account](https://www.digium.com/products/switchvox/free-demo).

They will send you a user name and passowrd to your email address.

Once you log into the admin portal take note of the domain name and use that as the uri.

The `uri` property for this client and the phpunit.xml file is pre-populated with:

`https://switchvoxdemo1.digiumcloud.net`

Requirements
============

[](#requirements)

- PHP &gt;= 5.4
- XMLWriter, if using XML, bundled and enabled as of PHP 5.1.2

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

[](#installation)

Composer
--------

[](#composer)

Digium Switchvox API is PSR-0 compliant and can be installed using [composer](http://getcomposer.org/). Simply add `chinasearch/digium-switchvox-api` to your composer.json file. *Composer is the sane alternative to PEAR. It is excellent for managing dependencies in larger projects*.

```
{
    "require": {
        "chinasarech/digium-switchvox-api": "*"
    }
}

```

Contributing
============

[](#contributing)

Digium Switchvox API highly encourages sending in pull requests. When submitting a pull request please:

- All pull requests should target the `dev` branch (not `master`)
- Make sure your code follows the [coding conventions](http://pear.php.net/manual/en/standards.php)
- Please use soft tabs (four spaces) instead of hard tabs
- Make sure you add appropriate test coverage for your changes
- Run all unit tests in the test directory via `phpunit ./tests`
- Include commenting where appropriate and add a descriptive pull request message

Changelog
=========

[](#changelog)

1.0.0
-----

[](#100)

- Basic funcationality to call API methods with XML or JSON

1.1.0
-----

[](#110)

- Change DIGEST auth to BASIC

1.1.1
-----

[](#111)

- Version bump

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 60% 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 ~730 days

Total

4

Last Release

1345d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0664d952646326ff8bd72fa96cc572b4cb6a49fc99e68638ca175727345dde5e?d=identicon)[rhyd42](/maintainers/rhyd42)

---

Top Contributors

[![rhydianroberts](https://avatars.githubusercontent.com/u/14333399?v=4)](https://github.com/rhydianroberts "rhydianroberts (3 commits)")[![dheimerl](https://avatars.githubusercontent.com/u/34488243?v=4)](https://github.com/dheimerl "dheimerl (1 commits)")[![shrimpwagon](https://avatars.githubusercontent.com/u/101164?v=4)](https://github.com/shrimpwagon "shrimpwagon (1 commits)")

---

Tags

jsonapixmldigiumswitchvox

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/chinasearch-digium-switchvox-api/health.svg)

```
[![Health](https://phpackages.com/badges/chinasearch-digium-switchvox-api/health.svg)](https://phpackages.com/packages/chinasearch-digium-switchvox-api)
```

###  Alternatives

[nathanmac/parser

Simple PHP Parser Utility Library for API Development

2151.0M3](/packages/nathanmac-parser)[nilportugues/api-problems

PSR7 Response implementation for the Problem Details for HTTP APIs

1749.4k2](/packages/nilportugues-api-problems)[walle89/swedbank-json

Unofficial API client for the Swedbank's and Sparbanken's mobile apps in Sweden.

752.5k](/packages/walle89-swedbank-json)[wayofdev/laravel-symfony-serializer

📦 Laravel wrapper around Symfony Serializer.

2113.6k](/packages/wayofdev-laravel-symfony-serializer)

PHPackages © 2026

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