BloomERP

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.

SettingTypeDefaultDescription
idstrRequiredStable ID for the phone provider.
documentationstr''Markdown and tagged examples included in the generated developer reference.
display_namestr | PromiseRequiredProvider name in the connection editor.
iconstrRequiredIcon shown for this provider.
descriptionstr | PromiseRequiredSummary of the supported calling and messaging transport.
config_schematype[VoIPConfiguration]RequiredPydantic model used to validate provider connection settings.
adapter_classtype[BaseVoIPAdapter]RequiredClass implementing provider operations.
number_search_schematype[VoIPNumberOptions] | NoneNoneOptions for searching available phone numbers.
number_purchase_schematype[VoIPNumberOptions] | NoneNoneOptions for buying a phone number.
purchase_noticestr | Promise''Provider-specific information shown before buying a number.
pricing_urlstr''Link to the provider's pricing page.
account_id_fieldstr''Configuration field that identifies the connected provider account.
immutable_config_fieldstuple[str, ...]()Settings that become fixed after connecting.
callback_labelsMapping[str, str | Promise]{}Display names for provider callback endpoints.
callback_helpstr | Promise''Instructions for configuring callbacks.
configuration_helpstr | Promise''Help displayed with the connection settings.
webhook_handlersMapping[str, str]{}Import paths for provider event handlers by event key.
browser_driverstr''Browser calling integration key.
operation_errorstuple[type[Exception], ...](<class 'ValueError'>,)Provider exceptions handled as operation failures.
max_sms_lengthint1600Maximum number of characters for an SMS submission.
max_assigned_usersint | NoneNoneMaximum 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.

python
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.

python
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.

FieldValue
iconfa-solid fa-phone
pricing_urlhttps://www.twilio.com/en-us/phone-numbers/pricing
account_id_fieldaccount_sid
browser_drivertwilio
max_sms_length1600
max_assigned_users10

TwilioConfiguration

Describe account authentication and optional browser-calling credentials.

SettingTypeDefaultDescription
namestrRequiredMinimum length: 1Maximum length: 255
account_sidstrRequiredPattern: '^AC[0-9a-fA-F]{32}$'
auth_tokenpydantic.types.SecretStrRequiredMinimum length: 1
api_key_sidstr''Pattern: '^(SK[0-9a-fA-F]{32})?$'
api_key_secretpydantic.types.SecretStrSecretStr('')—
application_sidstr''Pattern: '^(AP[0-9a-fA-F]{32})?$'
public_urlstrRequiredPublic base URL of this Bloomerp instance for Twilio callbacks.Pattern: '^https://[^/?#]+(?:/[^?#]*)?$'

TwilioNumberSearch

Declare Twilio's availability filters and translated picker choices.

SettingTypeDefaultDescription
countrystrRequiredTwo-letter country code, for example BE or US.Maximum length: 2Pattern: '^[A-Za-z]{2}$'
kindLiteral['local', 'mobile', 'toll_free']Required—
containsstr''Maximum length: 16

TwilioNumberPurchase

Declare optional regulatory references required by Twilio provisioning.

SettingTypeDefaultDescription
address_sidstr''If required for this number, enter the address registered in Twilio.Pattern: '^(AD[0-9a-fA-F]{32})?$'
bundle_sidstr''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.

FieldValue
iconfa-solid fa-phone
account_id_fieldaccount_id
browser_drivertelnyx
max_sms_length1600

TelnyxConfiguration

Configure a dedicated TeXML application and browser-only credential connection.

SettingTypeDefaultDescription
namestrRequiredMinimum length: 1Maximum length: 255
account_idstrRequiredMinimum length: 1Maximum length: 128
api_keypydantic.types.SecretStrRequiredMinimum length: 1
public_keystrRequiredMinimum length: 1
application_idstrRequiredPattern: '^\\d+$'
credential_connection_idstrRequiredPattern: '^\\d+$'
sip_subdomainstrRequiredPattern: '^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$'
public_urlstrRequiredPattern: '^https://[^/?#]+(?:/[^?#]*)?$'