OdooWiki OCA HUB

Alternative providers for SMS

sms_alternative_provider folder_open OCA/connector-telephony open_in_new
Tools License: AGPL-3

This module allows configuring multiple providers for sending SMS.

By restricting providers to country or area codes, you can ie have Odoo pick different providers for different countries.

auto_awesome What this module does

AI-generated from the code · Odoo 16.0

Lets administrators register several SMS providers and route outgoing text messages to the right one based on the recipient's phone number prefix, instead of always using Odoo's built-in SMS service.

This module adds a new screen called SMS providers, found under the Phone menu, where administrators can list the different services used to send text messages. Each provider has a name, a type, an optional company, and a prefix field. The prefix is the key business rule: you can enter one or several country or area codes, for example +31 for the Netherlands or +3120 for Amsterdam. When a text message is sent, Odoo checks the recipient's number and picks the first matching provider in the list order; if no prefix is filled in, that provider accepts any number. If no provider matches, the message is refused with an error.

  • Providers can be archived, reordered by dragging, and filtered or grouped by type in the list.
  • A default provider named Odoo builtin is created automatically.
  • Each sent message records which provider was used, visible on the SMS record form.
  • After sending, the message status and any failure reason are updated, and related notifications are marked as sent or in exception.

It touches the SMS sending engine and the SMS records, and is meant as a base that other modules extend with real provider implementations.

Depends on

sms

Required by other modules

Menus it adds

menu_ir_sms_gateway
Models and fields (2)
  • sms.sms · extends an existing modelsms_gateway_id (SMS gateway used)
  • ir.sms.gateway · new modelname, active, prefix, sequence, company_id, description, gateway_type (Type)

Text generated by AI (DeepSeek) from reading the Odoo 16.0 code on GitHub; it may contain mistakes, so check the code before deciding. View the code on GitHub

Availability by version

Reviewed: 2026-11-03
Confirmed (verified in repository and branch) Estimated (unverified) No information

Confirmation status: 1 confirmed, 8 with no information of 9 versions.

Sources · Odoo 16.0

Confirmed on 2026-11-03 in branch 16.0 of OCA/connector-telephony.

terminal Installation and usage

OCA documentation · Odoo 16.0

To configure this module, you need to:

  • Go to Settings / Technical / Phone/SMS / SMS providers
  • Create/Edit providers, reorder them, restrict some provider to certain country or area codes

This module doesn't do anything on its own, it is meant to be used by developers to implement SMS providers.

To do this, it suffices to inherit the ir.sms.gateway model to add a type:

gateway_type = fields.Selection(selection_add=[("your_sms_provider", "Your SMS provider")])

and declare a function named like _send_$type:

def _send_your_sms_provider(self, messages): # do here whatever you need to send the list of messages: # [{ # 'id': id of the sms.sms record (may not be set), # 'number': the number to send the sms to # 'content': the content of the message # }] # return a list of dicts with sending results: # [{ # 'id': id of the sms.sms record # 'state': sms.sms#state # 'failure_type': sms.sms#failure_type if state == 'error' # # whatever other fields you want to write on the sms.sms record after sending, # # such as provider-specific extra information # }]

Probably your provider needs some api key or similar to function, add those fields prefixed with your gateway_type name to the gateway class:

your_sms_provider_apikey = fields.Char('API key')

and add a group after group general in the form view of the model:

No verified information in OCA: Installation.

info

Data imported from GitHub: this sheet reflects the latest catalog review, not a live lookup. Always check the module documentation and staging before installing in production.