Built-ins
VoIPProviderDefinition
Declare a carrier’s account settings and transport adapter.
The connection wizard validates the configuration with the carrier’s schema. Match the definition ID to the adapter’s provider_key. The definition can advertise number selection, callbacks, and calling support.
| Setting | Type | Default | Description |
|---|---|---|---|
id | str | Required | Stable ID for the phone provider. |
documentation | str | '' | Markdown and tagged examples included in the generated developer reference. |
display_name | str | Promise | Required | Provider name in the connection editor. |
icon | str | Required | Icon shown for this provider. |
description | str | Promise | Required | Summary of the supported calling and messaging transport. |
config_schema | type[VoIPConfiguration] | Required | Pydantic model used to validate provider connection settings. |
adapter_class | type[BaseVoIPAdapter] | Required | Class implementing provider operations. |
number_search_schema | type[VoIPNumberOptions] | None | None | Options for searching available phone numbers. |
number_purchase_schema | type[VoIPNumberOptions] | None | None | Options for buying a phone number. |
purchase_notice | str | Promise | '' | Provider-specific information shown before buying a number. |
pricing_url | str | '' | Link to the provider's pricing page. |
account_id_field | str | '' | Configuration field that identifies the connected provider account. |
immutable_config_fields | tuple[str, ...] | () | Settings that become fixed after connecting. |
callback_labels | Mapping[str, str | Promise] | {} | Display names for provider callback endpoints. |
callback_help | str | Promise | '' | Instructions for configuring callbacks. |
configuration_help | str | Promise | '' | Help displayed with the connection settings. |
webhook_handlers | Mapping[str, str] | {} | Import paths for provider event handlers by event key. |
browser_driver | str | '' | Browser calling integration key. |
operation_errors | tuple[type[Exception], ...] | (<class 'ValueError'>,) | Provider exceptions handled as operation failures. |
max_sms_length | int | 1600 | Maximum number of characters for an SMS submission. |
max_assigned_users | int | None | None | Maximum number of users assignable to a phone line, when limited. |
Register a project carrier using an existing adapter
Give the variant a unique adapter key and keep the existing connection schema and capability declarations.
from bloomerp.communication.builtins.voip.builtins.telnyx import TELNYX_PROVIDER, TelnyxAdapter
from bloomerp.communication.builtins.voip.registry import VOIP_PROVIDER_REGISTRY
class DispatchCarrierAdapter(TelnyxAdapter):
'''Identify the Telnyx-backed carrier for dispatch.'''
provider_key = "example_dispatch_carrier"
dispatch_carrier = TELNYX_PROVIDER.model_copy(
update={
"id": DispatchCarrierAdapter.provider_key,
"display_name": "Dispatch carrier",
"adapter_class": DispatchCarrierAdapter,
},
)
VOIP_PROVIDER_REGISTRY.register(dispatch_carrier)Limit a carrier preset to one user per number
Use the carrier’s existing number setup and configure the assignment limit on the new provider entry.
from bloomerp.communication.builtins.voip.builtins.twilio import TWILIO_PROVIDER, TwilioAdapter
from bloomerp.communication.builtins.voip.registry import VOIP_PROVIDER_REGISTRY
class SingleUserCarrierAdapter(TwilioAdapter):
'''Identify the Twilio-backed carrier for individual lines.'''
provider_key = "example_single_user_carrier"
single_user_carrier = TWILIO_PROVIDER.model_copy(
update={
"id": SingleUserCarrierAdapter.provider_key,
"display_name": "Individual lines",
"adapter_class": SingleUserCarrierAdapter,
"max_assigned_users": 1,
},
)
VOIP_PROVIDER_REGISTRY.register(single_user_carrier)Twilio
ID twilio
SMS, browser calls and synchronized call history.
| Field | Value |
|---|---|
icon | fa-solid fa-phone |
pricing_url | https://www.twilio.com/en-us/phone-numbers/pricing |
account_id_field | account_sid |
browser_driver | twilio |
max_sms_length | 1600 |
max_assigned_users | 10 |
TwilioConfiguration
Describe account authentication and optional browser-calling credentials.
| Setting | Type | Default | Description |
|---|---|---|---|
name | str | Required | Minimum length: 1Maximum length: 255 |
account_sid | str | Required | Pattern: '^AC[0-9a-fA-F]{32}$' |
auth_token | pydantic.types.SecretStr | Required | Minimum length: 1 |
api_key_sid | str | '' | Pattern: '^(SK[0-9a-fA-F]{32})?$' |
api_key_secret | pydantic.types.SecretStr | SecretStr('') | — |
application_sid | str | '' | Pattern: '^(AP[0-9a-fA-F]{32})?$' |
public_url | str | Required | Public base URL of this Bloomerp instance for Twilio callbacks.Pattern: '^https://[^/?#]+(?:/[^?#]*)?$' |
TwilioNumberSearch
Declare Twilio's availability filters and translated picker choices.
| Setting | Type | Default | Description |
|---|---|---|---|
country | str | Required | Two-letter country code, for example BE or US.Maximum length: 2Pattern: '^[A-Za-z]{2}$' |
kind | Literal['local', 'mobile', 'toll_free'] | Required | — |
contains | str | '' | Maximum length: 16 |
TwilioNumberPurchase
Declare optional regulatory references required by Twilio provisioning.
| Setting | Type | Default | Description |
|---|---|---|---|
address_sid | str | '' | If required for this number, enter the address registered in Twilio.Pattern: '^(AD[0-9a-fA-F]{32})?$' |
bundle_sid | str | '' | If required for this number, enter an approved Twilio regulatory bundle.Pattern: '^(BU[0-9a-fA-F]{32})?$' |
Telnyx
ID telnyx
Browser voice calls using dashboard-purchased Telnyx numbers.
| Field | Value |
|---|---|
icon | fa-solid fa-phone |
account_id_field | account_id |
browser_driver | telnyx |
max_sms_length | 1600 |
TelnyxConfiguration
Configure a dedicated TeXML application and browser-only credential connection.
| Setting | Type | Default | Description |
|---|---|---|---|
name | str | Required | Minimum length: 1Maximum length: 255 |
account_id | str | Required | Minimum length: 1Maximum length: 128 |
api_key | pydantic.types.SecretStr | Required | Minimum length: 1 |
public_key | str | Required | Minimum length: 1 |
application_id | str | Required | Pattern: '^\\d+$' |
credential_connection_id | str | Required | Pattern: '^\\d+$' |
sip_subdomain | str | Required | Pattern: '^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$' |
public_url | str | Required | Pattern: '^https://[^/?#]+(?:/[^?#]*)?$' |
