azure-communication-phonenumbers
Microsoft Azure Communication Phone Numbers Client Library for Python
What it is and what it does
This package is the Python client library for Azure Communication Services' phone number management APIs. It provides two main clients: PhoneNumbersClient for acquiring and managing phone numbers (geographic, toll-free, and mobile types), and SipRoutingClient for configuring direct routing infrastructure. The package handles the full lifecycle of phone numbers—searching available numbers, reserving them temporarily, purchasing for your Azure resource, and releasing them when no longer needed. It also manages SIP trunk configuration and voice routing rules for connecting your existing telephony infrastructure to Azure.
The package depends on azure-core for authentication and HTTP transport, isodate for date/time handling, and typing-extensions for type hints. It requires Python 3.9 or later and integrates with Azure Identity for credential management, supporting both Azure Active Directory and connection-string authentication patterns.
Use it for:
- Search and purchase phone numbers in specific countries and regions for your communication application.
- Retrieve details about already-purchased phone numbers assigned to your Azure resource.
- Set up SIP trunks and routing rules to connect your on-premises telephony system to Azure Communication Services.
- Browse available phone numbers by country and type before committing to a purchase via the reservation API.
- Release phone numbers that are no longer needed to free up capacity and reduce costs.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Manages Azure Communication Services phone numbers, including searching, purchasing, releasing, and configuring direct routing for geographic, toll-free, and mobile numbers.
Yes, if you are building on Azure Communication Services and need programmatic phone number management. The package is production-stable, actively maintained, has low install friction, and carries no known vulnerabilities. Install it only if you have an Azure subscription and a deployed Communication Services resource; without those prerequisites, the package cannot be used.
Install
azure-communication-phonenumbers on PyPI
pip
pip install azure-communication-phonenumbersuv
uv add azure-communication-phonenumberspoetry
poetry add azure-communication-phonenumbersInstalling azure-communication-phonenumbers
Before you install
Low install friction with three lightweight runtime dependencies. Active maintenance with recent commits and production-stable status; requires Python 3.9 or later.
License in practice
MIT License permits commercial and private use with minimal restrictions; suitable for most projects without licensing concerns.
Quickstart
pip install azure-communication-phonenumbers
from azure.communication.phonenumbers import PhoneNumbersClient
from azure.identity import DefaultAzureCredential
phone_numbers_client = PhoneNumbersClient(
endpoint="https://<RESOURCE_NAME>.communication.azure.com",
credential=DefaultAzureCredential()
)
purchased = phone_numbers_client.list_purchased_phone_numbers()
Requires an active Azure subscription and a deployed Azure Communication Services resource with endpoint and credentials configured.
Verify before relying
- Whether browse and reservation operations are truly asynchronous or if async/await support is required in practice.
- Specific rate limits or quota constraints for phone number search and purchase operations.
- Whether SIP routing configuration persists across client reconnections or requires re-initialization.
Package facts
| License | MIT License (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — isodate, azure-core, typing-extensions |
| Maintenance | actively maintained — 351 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 168,718/month — #10,438 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: azure_communication_phonenumbers-1.4.0-py3-none-any.whl
Keywords: azure, azure sdk
Tags
More Internet packages
Botocore provides low-level, data-driven access…
permissive · top 100 on PyPI
aiobotocoreProvides an async client for AWS services using…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
filelockProvides a platform-independent file locking…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
googleapis-common-protosProvides common Protocol Buffer message…
permissive · top 100 on PyPI
azure-communication-identityCreates and manages user identities and access…
permissive · top 15,000 on PyPI
azure-communication-smsSends SMS messages through Azure Communication…
permissive · top 15,000 on PyPI
vonage-numbersProvides Python bindings to Vonage's Numbers…
permissive · top 15,000 on PyPI
azure-mgmt-trafficmanagerProvides a Python client library to manage…
permissive · top 5,000 on PyPI
azure-communication-callautomationProvides a Python SDK to build server-based…
permissive · top 15,000 on PyPI
azure-mgmt-reservationsManages Azure Reservations and Savings Plans…
permissive · top 5,000 on PyPI
azure-communication-emailSends emails via Azure Communication Services,…
permissive · top 5,000 on PyPI
phaxioA Python client library for the Phaxio API that…
permissive · top 15,000 on PyPI
azure-communication-roomsManages Azure Communication Services rooms for…
permissive · top 15,000 on PyPI
bandwidth-sdkPython client library for Bandwidth's…
unclear · top 15,000 on PyPI