Skip to main content

SMS Management

Similar to SIP trunks, tenants can connect to the outside public network through SMS providers.

Providers

A SMS provider connects the PBX with an service provider. Each provider has the following fields:

  • A descriptive name for the provider. This name can be any text.
  • A provider selected from the dropdown of available SMS providers.
  • Depending on the provider additional parameters for the provider:
    • A Username or account is typically used by providers to identify the account
    • A password for the account
    • An application token serves for some providers as a password
    • Some service providers need an additional Application ID
  • An optional list of addresses for inbound traffic which limits inbound HTTP traffic to those IP addresses as a simple way of improving the security of the SMS connection.

The table lists all available providers. Entries can be deleted or edited.

The GET provider can be used for many providers that are not listed, but just use a simple GET to send SMS messages. The following variables are available in the URL:

  • {body}: The content of the message
  • {url}: A link to the message that is sent out (e.g. image)
  • {password}: The password for the provider
  • {param1}: General parameter 1 for the tenant
  • {param2}: General parameter 2 for the tenant
  • {param3}: General parameter 3 for the tenant
  • {address}: Primary tenant DNS address
  • {from}: The sender phone number in global format
  • {from-e164}: The sender phone number in E164 format
  • {to}: The receiver phone number in global format
  • {to-e164}: The receiver phone number in E164 format

Numbers

Each provider may have numbers associated with it. Numbers have the following fields:

  • A descriptive name
  • A SMS number
  • An optional policy that must be used with the number
  • The provider for the number
  • A URL prefix for receiving messages, see below
  • An optional list of source extensions that may use the number. If empty, there is no restriction on using the number.
  • The destination account when receiving a message. The destination can be an extension or a call queue.

The prefix is needed to determine on an incoming HTTP request to the PBX, which tenant and number the message is associated with. This prefix should be random, e.g. areujs323fsmh so that scanners cannot easily guess the prefix for the message. Most providers send messages that also contain the destination number; for those providers it is okay to use the same prefix for multiple numbers.

The table shows all available numbers. Entries can be edited and deleted.

In order to import a large number of numbers, the following CSV-format can be used:

  • The number
  • The name
  • The prefix
  • The source
  • The destination

For the import the policy and the provider must be selected for the numbers.

Policies

Policies are used to enforce communication rules with recipients of this policy. Each policy has the following fields:

  • A descriptive name
  • An optional number that can be used to send bulk messages (see below)
  • An optional ANI when sending bulk messages
  • A select element that determines if recipients need to opt-out or explicitly opt-in in order to receive messages
  • A welcome message that will be sent out before the first message is sent to the recipient (see below)
  • A duration that determines when the welcome message should be resent
  • A keyword for stopping conversations (see below)
  • A keyword for resuming conversations
  • A list of keywords that trigger an automatic answer (see below)
  • A duration fields that determines how long messages are stored on the system
  • A flag that will allow only text messages on this policy.

Automatic message generation

There are ten fields that will check if an incoming message should be answered with a predefined text. An example is to send a link to the restaurants if the text message contain the keyword "MENU". The pattern can be in the following form:

  • If the pattern starts and ends with /, the system will perform a extended regular expression match on the message. If the pattern ends with /i, the pattern match will be case-insensitive.
  • If the pattern starts and ends with * (e.g. *MENU*), the system will search for an occurence of the text in between the * characters. The comparison is case-insensitive. In the example, What is the menu? would match.
  • If the pattern starts with * (e.g. *MENU), the system will check if the text ends with the pattern. In the example, Please send me the menu would match, but The menu, please would not.
  • If the pattern end with * (e.g. MENU*), the system will check if the text begins with the pattern.
  • Otherwise the system will looks for an exact pattern match, case-insensitive.

Each of those entries can be masked by a service flag field, for example to send responses on the weekends or after hours.

A special case are the keywords for stopping and resuming conversations. In addition to potentially triggering an answer, they will add or update the number to the opt-in/out list for the policy and set the entry to opt-in or opt-out.

Sending bulk messages

If a number was assigned to the policy, users can send a message to that number. This will trigger a message to each number that is on the opt-in/out list for the policy, depending on their opt-in or opt-out status. The number assigned for the policy will be used to send the message out.

When recipients responds to the message, it will be processed as regular message to the number. That means that the system will check the automatic answer policy and potentially add the recipient to the opt-in or out-list. Incoming messages will also be routed according to the destination field for the number and will there occur as a regular message from that number.

Opt-In/Out

Each number that is stored along with the policy (see Opt-In/Out below) has a status field that indicates weather that number wants to receive messages or not. The default for this value is set in the policy. Numbers can have a descriptive name, and each number has a flag for opt-in and opt-out.

Numbers can be imported in bulk. The CSV has the following fields:

  • The number
  • A descriptive name
  • The opt-in or opt-out status. The word in or out can be used to explicitly set the status

The list of numbers shows the time when the last change for the number was done. The policy can be changed with the select element on the top of the table.