Configure SMS providers
This feature will let you categorize SMS providers for different applications and geographical locations. This way, you can let the system pick the most advantageous provider based on the recipient's phone number.
This guide gives you a walkthrough of how you can create, configure, and sort SMS providers for your needs.
Defining new SMS providers
1. From the main menu, choose Site Admin -> Account -> Settings
2. Go to the SMS tab. Click the lock and enter your password to make changes.
All existing providers are displayed in the list view under the Providers section. If you think that any of your existing SMS providers is missing from this list, please take a look at the “Troubleshooting” section of this post.
To create a new provider:
- Click + SMS provider.
- Select a provider type.
- A form is displayed to let you input provider information. The fields you have to fill in varies depending on the provider type. For more information, please check how to enable an SMS provider in this article. The image below shows the form for defining a new proxy message provider:
- For each new provider you define, you can also specify one or more application tags the provider should be used for. If you don’t specify any application tags, this provider will be available for all outgoing messages under any application.
- You can also limit the availability of the SMS provider to certain country calling codes by specifying phone number initials in the “Phone numbers” field. If you do not specify any country calling code, this provider will be available for any recipient number.
- Click “Save” to create and activate the new provider. The new provider will be added to the existing provider list.
- You can then change the order of providers (drag them as shown below), enable or disable (start/stop) them in the list view.
Block message provider
Block Message Provider is a new type of provider to block outgoing messages. If any outgoing message matches the criteria of a block provider in the list, that message is not sent.
How it works
For each outgoing SMS, the list of active (running) providers is checked. The first provider that matches the criteria is picked as the service to be used for that particular message. This process is repeated for every outgoing SMS.
Considering the list above, assume that an event rule tries to send an SMS notification to phone number +4670xxxxxx, and this number belongs to a device under an application with a, 'ACME Corp' tag. Both of these conditions are met by the Twilio Training Server provider and it is enabled (see below), so that provider will be will be picked.
Now, another event rule tries to send an SMS to phone number +6112xxxxx, and this number is of a device under an application with a “Australia” tag. The GpsGate SMSProxy Provider might match the criteria, but it will be ignored since it’s disabled (i.e. not running). As there won’t be any other matching providers, this message will be blocked by default.
Say that you want to block any phone number that belongs to a device under an application with a “South America” tag. Add a Block Message Provider defined for this purpose.
Troubleshooting
You can always preview which provider is selected for a particular number by clicking the “Preview Matching Provider” button under the “Send Test SMS” section. You can also try to send a test SMS by clicking the “Send SMS” button.
To view which provider is used for an outgoing SMS, go to “System Tools → Queue Viewer” and list all SMS messages.
If you think that any of your existing providers are missing from this list, please navigate to the “Service” tab, and click “Providers” from the side menu. If the provider you are looking for is there in the list, you need to upgrade the plugin for the provider in question. Please refer to this article for how to install/upgrade SMS providers on your GpsGate server.