PHPackages                             voicetel/voiceml - 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. voicetel/voiceml

ActiveLibrary[API Development](/categories/api)

voicetel/voiceml
================

Official PHP SDK for the VoiceML REST API (Twilio-compatible voice + AMD service from VoiceTel)

0.7.1(yesterday)00MITPHPPHP ^8.1

Since May 19Pushed todayCompare

[ Source](https://github.com/voicetel/voiceml-php-sdk)[ Packagist](https://packagist.org/packages/voicetel/voiceml)[ Docs](https://voiceml.voicetel.com)[ RSS](/packages/voicetel-voiceml/feed)WikiDiscussions main Synced today

READMEChangelog (10)Dependencies (2)Versions (11)Used By (0)

📞 VoiceML PHP SDK
=================

[](#-voiceml-php-sdk)

The official PHP client for the [VoiceML REST API](https://voicetel.com/docs/api/v0.7/voiceml/) — Twilio-compatible outbound voice and answering-machine-detection from VoiceTel, with modern PHP 8.1+ ergonomics and battle-tested Guzzle transport.

[![Version](https://camo.githubusercontent.com/17d387efdabeb521be934bbbe8d22166d175f2ce541a41bc3430d49255c84802/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f76657273696f6e2d302e372e312d626c7565)](https://camo.githubusercontent.com/17d387efdabeb521be934bbbe8d22166d175f2ce541a41bc3430d49255c84802/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f76657273696f6e2d302e372e312d626c7565)[![PHP](https://camo.githubusercontent.com/ba4a50cd793cc30e8cd283e7df69644e79e2efacd6710e1b402d3ec5222ed1e3/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d254532253839254135382e312d626c7565)](https://camo.githubusercontent.com/ba4a50cd793cc30e8cd283e7df69644e79e2efacd6710e1b402d3ec5222ed1e3/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d254532253839254135382e312d626c7565)[![License](https://camo.githubusercontent.com/ba9f8c258702c3f54781638d4bdb341834751bcdaca2fdf6c4ca1e4719073aad/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d4954253230253242253230436f6d6d6f6e73253230436c617573652d677265656e)](https://camo.githubusercontent.com/ba9f8c258702c3f54781638d4bdb341834751bcdaca2fdf6c4ca1e4719073aad/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d4954253230253242253230436f6d6d6f6e73253230436c617573652d677265656e)[![Tests](https://camo.githubusercontent.com/53429c7e10051866bdd5613f314edaaf31c43ec6b503d739bf6af55d318fcbc6/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f74657374732d3535253230756e69742d627269676874677265656e)](https://camo.githubusercontent.com/53429c7e10051866bdd5613f314edaaf31c43ec6b503d739bf6af55d318fcbc6/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f74657374732d3535253230756e69742d627269676874677265656e)[![Typed](https://camo.githubusercontent.com/4ccc27a91557448d802f90517317f64ef3d7188ec60bfac0d28762463685fa8b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f74797065642d726561646f6e6c7925323070726f706572746965732d626c7565)](https://camo.githubusercontent.com/4ccc27a91557448d802f90517317f64ef3d7188ec60bfac0d28762463685fa8b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f74797065642d726561646f6e6c7925323070726f706572746965732d626c7565)

📚 Table of Contents
-------------------

[](#-table-of-contents)

- [Features](#-features)
- [Installation](#-installation)
- [Quickstart](#-quickstart)
- [Authentication](#-authentication)
- [Resource Reference](#%EF%B8%8F-resource-reference)
- [Error Handling](#-error-handling)
- [Pagination](#-pagination)
- [Migration from twilio-php](#-migration-from-twilio-php)
- [Rate Limits](#%EF%B8%8F-rate-limits)
- [Development](#%EF%B8%8F-development)
- [API Documentation](#-api-documentation)
- [Contributors](#-contributors)
- [Sponsors](#-sponsors)
- [License](#-license)

✨ Features
----------

[](#-features)

### 🛡️ Modern PHP, Strictly Typed

[](#️-modern-php-strictly-typed)

- **PHP 8.1+** end-to-end — `readonly` properties, named arguments, constructor property promotion, `declare(strict_types=1)` everywhere.
- **Typed request and response models** for every one of the 81 API operations across 9 resource families — `Call->sid`, `Recording->duration`, `Queue->currentSize` all hint cleanly in your IDE.
- **Twilio-compatible wire shapes** — `AccountSid`, `From`, `To`, status callbacks, pagination envelopes — match what Twilio's Programmable Voice API documents.
- **PSR-4 autoloading** under `VoiceML\` — plays nicely with Symfony, Laravel, and every other Composer-aware framework.

### 🔁 Production-Grade Transport

[](#-production-grade-transport)

- Built on **Guzzle 7** (`guzzlehttp/guzzle: ^7.8`) — the de-facto HTTP client in the PHP ecosystem.
- **Automatic retry** with exponential backoff on 429 / 5xx — honors `Retry-After` headers.
- **Configurable timeout** per client (defaults to 30s) and configurable `maxRetries` (defaults to 2).
- **HTTP Basic auth** with `AccountSid:ApiKey` — exactly what the Twilio SDK uses, so existing credentials work unchanged.
- **Structured exception hierarchy** — `RateLimitException`, `AuthenticationException`, `NotFoundException`, etc. all subclasses of `ApiException` you can catch broadly or narrowly.

### 📞 Complete API Coverage

[](#-complete-api-coverage)

- **Calls** — originate, fetch, terminate, update + per-call recordings, streams, siprec, transcriptions, notifications, events, and the `/Calls/{sid}/Payments` lifecycle (Pay TwiML companion).
- **Conferences** — list, fetch, end conferences, plus participants (mute / hold / kick) and conference-scoped recordings.
- **Queues** — create, list, update, delete, peek, dequeue (front or specific member).
- **Applications** — CRUD on stored TwiML + callback bundles.
- **Recordings** — account-wide list, metadata fetch, audio fetch (follows S3 redirect), delete.
- **Messages** — create, fetch, list (To/From/DateSent filters + pagination), update (Body redaction; Status=canceled), delete.
- **IncomingPhoneNumbers** — list, fetch, update.
- **Notifications** — fetch, list.
- **Diagnostics** — `/health` deep probe, OpenAPI spec.

### 🧪 Tested

[](#-tested)

- **55 unit tests** with mocked Guzzle handlers — every method and every error path exercised, no network in CI.
- **Conformance test suite** that validates wire shapes against the published OpenAPI document — spec drift gets caught at parse time.

### 📦 Clean Distribution

[](#-clean-distribution)

- Zero codegen footprint — every byte hand-written.
- Single Composer package, single namespace, no surprise transitive deps beyond Guzzle.

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

[](#-installation)

```
composer require voicetel/voiceml
```

Requires PHP 8.1 or later and the `json` extension (bundled with PHP).

🏁 Quickstart
------------

[](#-quickstart)

```
