Skip to main content

PyPI version License: MIT Python Versions

A Python client for the Issabel PBX REST API (pbxapi). Supports dynamic CRUD for all 40+ resources, batch provisioning with a single final reload, and a full Asterisk Manager Interface (AMI) wrapper.

Features

  • Dynamic method generation — Automatic CRUD for all PBX resources (get_, create_, update_, delete_).
  • Batch provisioningwith client.batch(): runs N write operations with zero per-call reloads; one manager/reload fires automatically at the end.
  • AMI wrapper (client.manager) — All 18 Asterisk Manager actions: originate, queuestatus, dbget, dbput, hangup, reload, and more.
  • Automatic token renewal — Detects HTTP 401 and legacy {"status": "expired"} responses and renews transparently.
  • Read-only guardsNotImplementedError raised client-side for write attempts on read-only resources.
  • Configurable timeout — All HTTP calls share a single timeout setting.
  • Context managerwith IssabelClient(...) as client: closes the session on exit.
  • SSL support — Configurable certificate verification (self-signed certs common on PBX appliances).

Installation

pip install issabel-sdk

Or from source:

git clone https://gitlab.com/libandpackages/issabel-sdk.git
cd issabel-sdk
pip install -e .[dev]

Quick Start

from issabel_client import IssabelClient

with IssabelClient("your-pbx-ip", use_ssl=True, verify_ssl=False) as client:
    client.authenticate("admin", "yourpassword")

    # List all extensions
    extensions = client.get_extensions()

    # Create one with immediate reload (default)
    client.create_extensions({"extension": "2000", "name": "John Doe", "secret": "pswd123"})

    # Batch provisioning — single reload at the end
    with client.batch():
        for ext in range(3001, 3100):
            client.create_extensions({"extension": str(ext), "name": f"User {ext}", "secret": "s3cr3t"})
    # ↑ Asterisk reloaded exactly once here

    # AMI: originate a call
    client.manager.originate(channel="SIP/1001", extension="1002", context="from-internal", priority=1)

    # AMI: reload Asterisk manually
    client.manager.reload()

Documentation

Full usage guide, payload schemas, and the complete resource catalogue are in docs/documentation.md.

Examples

Ready-to-run scripts are in the examples/ directory:

Contributing

Pull Requests are welcome at gitlab.com/libandpackages/issabel-sdk. Please run pytest and flake8 before submitting.

Resource Capabilities

Category Resources
Full CRUD announcements, blacklist, bosssecretary, callback, callflow, cidlookup, classofservice, conferences, customdestinations, customextensions, dahdichanneldids, dialplaninjection, disa, dynamicroutes, extensions, inboundroutes, ivr, languages, mailboxes, miscapplications, miscdestinations, musiconhold, outboundroutes, paging, parkinglots, pinsets, queuepriorities, queues, recordingrules, recordings, ringgroups, setcallerid, timeconditions, timegroups, trunks, vmblast, writequeuelog
GET + PUT only classofserviceadmin, routecongestionmessages
Read-only alldestinations, allextensions, featurecodes, modules, systemrecordings
AMI wrapper client.manager.originate, .queuestatus, .dbget, .dbput, .dbdel, .reload, .hangup, and 11 more

License

MIT — see LICENSE.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

issabel_sdk-0.2.0.tar.gz (15.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

issabel_sdk-0.2.0-py3-none-any.whl (11.4 kB view details)

Uploaded Python 3

File details

Details for the file issabel_sdk-0.2.0.tar.gz.

File metadata

  • Download URL: issabel_sdk-0.2.0.tar.gz
  • Upload date:
  • Size: 15.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.13

File hashes

Hashes for issabel_sdk-0.2.0.tar.gz
Algorithm Hash digest
SHA256 fff9948ba27f87039de68a4d62548c5b1c9031ae17e68052d7f99aa3d72e966f
MD5 cfa57a38997911c6d5e699ce9a457756
BLAKE2b-256 6ccb263c5553cb73673c42e0be4ec2f7982a99dea90f7da21eac07bab9afd600

See more details on using hashes here.

File details

Details for the file issabel_sdk-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: issabel_sdk-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 11.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.13

File hashes

Hashes for issabel_sdk-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 14690dfc07a8f26898cb07e89cb8a7dd436ac3739a8b1d15276049e476bdb617
MD5 e4a2463aabc0eddf4f3d23c5ba4f599c
BLAKE2b-256 e0eb15b035d2ea5ccd902221f7622ee214dbb9e3c05ad4a1c1b41d3880aaf441

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page