--- id: azure-communication-phonenumbers version: "1.4.0" license: MIT License license_treatment: permissive maintenance: active --- # azure-communication-phonenumbers — Microsoft Azure Communication Phone Numbers Client Library for Python License: permissive · Maintenance: active · Downloads: 168.7K/mo ## 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 above — 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 pip install azure-communication-phonenumbers uv add azure-communication-phonenumbers poetry add azure-communication-phonenumbers ## Installing 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://.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_current - Install friction: low - Maintenance: active - Downloads: 168.7K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags azure phone numbers management, azure communication services client, phone number search and purchase, sip routing configuration, direct routing telephony, azure phone number api, toll-free number management, azure-sdk, telephony, sip-routing [View on SkillFed](https://skillfed.io/packages/azure-communication-phonenumbers) · [View on PyPI](https://pypi.org/project/azure-communication-phonenumbers/)