Configuring SMS Gateways on GateManager

This guide explains different type of external SMS gateways that can be configured for a GateManager.

Version: 3.0, Oct 2016

Table of ContentsDocument version History

2

1.

Introduction

3

2.

Enabling of SMS services on GateManager

3

3.

Using a commercial SMS gateway provider service

4

3.1.

GateManager Configuration
3.1.1.
Using a mail-to-SMS based SMS gateway service
3.1.2.
Using a URL (web services API) based SMS gateway
3.1.3.
Activate the SMS Script
3.1.4.
Using different SMS gateways depending on Country code
3.1.5.
Blocking certain country codes or zones

4
5
7
8
9
9

4.

Using a SiteManager as SMS gateway

10

4.1.

Prerequisites

10

4.2.

SiteManager setup (xx39 model)
4.2.1.
Setting up the SiteManager UPLINK2 interface:
4.2.2.
Set the UPLINK1 IP address
4.2.3.
Securing the connection
4.2.4.
Configure Alert options

10
10
11
11
12

4.3.

GateManager Configuration
4.3.1.
Activate the SMS Script

13
14

4.4.

Troubleshooting
4.4.1.
Username and password do not match:
4.4.2.
If you forgot to configure an agent on the SiteManager:
4.4.3.
Successful SMS transmittal message:

15
15
15
15

5.

Limitations:15

Notices

16

Document version History• 1.0 Initial version (originally titled “Using SiteManager as SMS Gateway for_GateManager”)• 2.0 Added sections with setup of web services and mail SMS gateways, and renamed document• 2.1 Update on sms-sitemanager.gw script on page 13• 3.0 In relation to 7.1 added info about how to enable and elaboration of using multiple provider gateways andinclude/exclude of mobile numbers.

Configuring SMS Gateways on GateManager

Page 2 of 16

1. Introduction
The advantages of using a SMS-Gateway for your GateManager server are
1. You can activate SMS code as two factor login for LinkManager Mobile and
GateManager Administrator accounts.
2. All your SiteManagers (with or without 3G modem) can send Alert notifications as SMS using the GateManager as SMS gateway. Even if your remote
SiteManagers are able to send SMS messages via their integrated 3G modems, it may be advantageous having just one central SMS subscription.
GateManager 4250 is natively equipped with an integrated SMS modem, and
the GateManager 4260 also has support for a locally attached USB Modem tobe used for SMS messages.
But if you have software GateManager model 8250 or 9250, it may not be possible to install a physical USB modem, as these servers typically are located indata centers or on virtualized servers.
All GateManager models therefore support configuration of external SMS gateways.

2. Enabling of SMS services on GateManager
For customers on hosted GateManager
Availability of SMS services depends on your GateManager hosting provider
has enabled and offers such services in your region. If available, you must order
SMS enabling for your customer domain from your point of purchase. If notavailable, the only option for using SMS with the Secomea solution is locallyfrom a SiteManager model xx39 (see separate guide).

For customers with own GateManager
For own GateManagers enabling of SMS services is done in the GateManager
Portal (Server > Config > SMS Settings) and requires Server Admin rights. Notethat from GateManager 7.1 the ability to enable SMS services requires orderingof the SMS Activation license from the your point of purchase.

For GateManager hosting providers
The possibility for enabling SMS services is implicit in the hosting license on theserver. Setting up the SMS Gateway is the same as for customers with own
GateManager, as described in the following.

Configuring SMS Gateways on GateManager

Page 3 of 16

3. Using a commercial SMS gateway provider service
Commonly a commercial SMS gateway provider will offer both a URL or web
services API for sending SMS as well as mail-to-SMS.
Sign up for a suitable online SMS provider and observe that the price model
corresponds to the expected amount of SMS messages your GateManager will
generate.
In the following we will demonstrate the principles using the provider Compaya
SMS (www.cpsms.dk).
Note: It is always a good idea to test the SMS service without involving the
GateManager, e.g. by entering the SMS url in your web browser and verify thatyou receive an SMS, or create a mail-to-sms email.

3.1. GateManager Configuration
Log on to the GateManager Portal with a Server Administrator account andenter Files > Scripts. Here you will find some default scripts that can be usedas templates or inspiration for specific provider scripts:

You can safely Edit one of the existing scripts. You can always restore theoriginal contents of the default scripts. Or you can copy the contents of a default template into a new script that you create.

Configuring SMS Gateways on GateManager

Page 4 of 16

3.1.1. Using a mail-to-SMS based SMS gateway service
In this example we choose to edit an existing default provider script calledsms-mail.gw. The parameters to alter would typically be the target host(which substitutes the %H variable) and the url, which is the format of the
mail to be converted into SMS. Consult the SMS service providers documentation for details:

In the case of the CPSMS service, we just enter the host name of the provider (the part after @ in the email). The mail format for CPSMS is “<mobileno>.<cps account key>@cpsms.dk”..

Configuring SMS Gateways on GateManager

Page 5 of 16

For other commercial SMS online gateways, the mail format may be different. It will typically be the url that differ. Consult the web services specification of the product and alter the script accordingly.
Explanation of the GateManager script variables can be found in the comments of the sms-gateway.txt script:

Configuring SMS Gateways on GateManager

Page 6 of 16

3.1.2. Using a URL (web services API) based SMS gateway
In this example we choose to copy the contents of the default script smscpsms.dk into a new script called sms-cpsms-secomea.dk

Now we Edit the new script and insert the username and password that applies to our personal CPSMS account.

For other commercial SMS online gateways, the Web Services may be different. It will typically be the url that differs. Consult the web services specification of the product and alter the script accordingly.

Configuring SMS Gateways on GateManager

Page 7 of 16

3.1.3. Activate the SMS Script
1. Enter the Server > Config and select Edit. Locate the SMS Settings andmake sure that SMS #1 is set to “gateway” and you enter the name of the edited or created script.
NOTE: You should omit the prefix “sms-“, so in this case the script is called
sms-cpsms-secomea.dk, you must enter “cpsms-secomea.dk”

2. Reboot the GateManager by checking the Restart server box and click Save.
Note: The reboot is required only for the very first time a new SMS service ora new script is enabled on a GateManager. If you make changes to the sms
script you just have to restart the SMS gateway by pressing the [Restart SMS
Gateway] button.
3. Test the installation using the Test SMS feature for verification.

Configuring SMS Gateways on GateManager

Page 8 of 16

3.1.4. Using different SMS gateways depending on Country code
It is possible to activate different provider scripts based on the mobile numbers country code. This is done by creating a SMS gateway script that will
activate provider specific scripts based on certain criteria
Imagine that you want use the provider script “cpsms.dk”, but only for +45,
+44 and +332 numbers, and another provider script “kapsystem,com” for +1
numbers, while any other number should use the script “twilio.com”
You would then define a new sms script called e.g. “sms-generic”.
In this script you define each provider in a [provider] gateway section whose
contents are identical to the existing "single provider" scripts:[cpsms]include = cpsms.dk[kap]include = kapsystem.com[twil]
include = twilio.com
Selection of a specific gateway based on mobile number prefix is done bythis code following the provider gateway section:{+1}
gw = kap{+45,+44,+332}
gw = cpsms{}
gw = twil
The last {} section matches anything other number, which in this case will beserviced by the provider “twilio.com”
3.1.5. Blocking certain country codes or zones
In relation to the above, you may want to specifically block mobile numbers
for specific regions or zones.
For instance, if you want to allow SMS to country code +298, but want toblock all other numbers for Zone 2 (Africa), i.e. +2xx, you can define as follows.
{+298}
gw = kap{+2}
drop = 1
gw = kap{}
If you actually wanted to only allow numbers for specific country codes orzones, and block everything else you can define as a follows, which will allow all numbers of Zone 4 (Europe, +4x) and China (+86), and block all others;{+4,+86}
gw = kap{}
drop = 1
For more information about zones refer to http://www.wtng.info/wtngcod.html

Configuring SMS Gateways on GateManager

Page 9 of 16

4. Using a SiteManager as SMS gateway
4.1. Prerequisites
 SiteManager model xx39 (such as a 1039 with integrated 3G modem)
 SiteManager firmware: Release 5.8 build 14514 or newer SiteManager’s Uplink1 port must be connected to a network where it is accessible from the GateManager’s local interface.

 A SIM installed in the SiteManager with a flat-rate SMS subscription.
 A GateManager server model 4250, 4260, 8250 or 9250.
 GateManager firmware: Release 5.8 build 14514 or newer
4.2. SiteManager setup (xx39 model)
Connect the SiteManager’s Uplink1 port to a network, where the
GateManager’s local interface can access the SiteManager’s Uplink1 IP address.
4.2.1. Setting up the SiteManager UPLINK2 interface:

Configure the UPLINK2 interface with the ISPs SMS subscription parameters.
The SiteManager has a known list of APN settings but in case a match is notdetected for your ISP you will have to enter the APN manually.
It is recommended to set the Mode to SMS only but it is not a requirement.

Configuring SMS Gateways on GateManager

Page 10 of 16

4.2.2. Set the UPLINK1 IP address
You can configure a static IP address for Uplink1, but if you connect the
SiteManager to a network with a DHCP server, you just have to verify which
address it has received under Status>Network:

4.2.3. Securing the connection

For the GateManager to be allowed to use the SiteManager as SMSgateway you will have to create an agent specifying the IP address of the
GateManager.
If the SiteManager and GateManager are not on the same local network you
can specify the public IP address of the GateManager meaning that all devices from the public IP address of the GateManager are allowed to use the
SiteManager as SMS-gateway. This should not be a problem because it will
only be the GateManager using the public IP address.

Configuring SMS Gateways on GateManager

Page 11 of 16

4.2.4. Configure Alert options
From the SiteManager’s perspective it is acting as SMS gateway as described in the separate guide “Working with SMS and Email alerts”, andhave to be configured accordingly:

Alert Identification: Set to None to prevent this SMS-Gateway to add any
information to the SMS. This is already handled by the SMS coming from the
GateManager system.
SMS Alert Gateway: Set to SiteManager (UPLINK2)SMS Service Center Number: This number is automatically recorded fromyour SIM card if not then set is as informed from the documentation fromyour ISP.
Agent Alerts TCP Port: No need to change – default is 26864 and also
used by the GateManager.
Agent Alert User Name: Specify a user name that is allowed to send SMS
messages. This is to be used later when the GateManager Server is configured.
Agent Alerts Password: Specify a password that is required for the above
user to send SMS messages. This is to be used later when the GateManager Server is configured.

Configuring SMS Gateways on GateManager

Page 12 of 16

4.3. GateManager Configuration
Log on to the GateManager Portal with a Server Administrator account.
Create a script called sms-sitemanager.gw

In the field paste in the text below and correct the host, user andpass(word) settings to match your installation:# SMS-SITEMANAGER.GW - SMS via SM gateway setup# specify IP address of SM below

Configuring SMS Gateways on GateManager

Page 13 of 16

# IP address of your SiteManager
host = 172.16.17.138:26864# a user name of your own choiceuser = UsErName# a password of your own choicepass = fG3hjw(6poW9!
debug = 3
run = wget
auth = none
protocol = http#Enable below line if using no password# url = %p://%H/SMS/%T/UTF8:%M
#Enable below line if using username and password
url = %p://%H/SMS/%U/%P/%T/%M4.3.1. Activate the SMS Script
1. Enter the Server > Config and select Edit. Locate the SMS Settings andmake sure that SMS #1 is set to “gateway” and you enter the name of the edited or created script.
NOTE: You should omit the prefix “sms-“, so in this case the script is calledsms-sitemanager.gw, you must enter “sitemanager.gw”

2. Reboot the GateManager by checking the Restart server box and click Save.
Note: The reboot is required only for the very first time a SMS service is enabled on a GateManager. If you make changes to the sms script you just haveto restart the SMS gateway by pressing the [Restart SMS Gateway] button.
3. Test the installation: use the Test SMS feature for verification.

Configuring SMS Gateways on GateManager

Page 14 of 16

4.4. Troubleshooting
The SiteManager system log will show if there is any problems regarding
configuration or sending of SMSes.
4.4.1. Username and password do not match:
Receive SMS request from agent GateManager at 172.16.17.241 (tcp)cron.warn SMS[1793]: Unauthorized SMS request from 172.16.17.241

4.4.2. If you forgot to configure an agent on the SiteManager:
Discard SMS request from unknown agent at 172.16.17.241 (tcp:17:0:0)

4.4.3. Successful SMS transmittal message:
Receive SMS request from agent GateManager at 172.16.17.241 (tcp)
SMS sent to mobile modem after 4 sec.
tcp 172.16.17.241: SMS Alert to +4541397171: GateManager SMS Test

5. Limitations:

SMS messages may be truncated to 40 characters. You will have to
make your own tests to verify what limit your installation has.

Flash SMS may not be supported by your SMS provider. Typically if
specifying Flash SMS on the GateManager and the provider does
not support that, the SMS will be send as an ordinary
SMS.
NOTE: For the same reasons Flash SMS support has been removed from GateManager 7.1

Configuring SMS Gateways on GateManager

Page 15 of 16

Notices
Publication and copyright© Copyright Secomea A/S 2014-2016. All rights reserved. You may download
and print a copy for your own use. As a high-level administrator, you may use
whatever you like from contents of this document to create your own instructions for deploying our products. Otherwise, no part of this document may becopied or reproduced in any way, without the written consent of Secomea A/S.
We would appreciate getting a copy of the material you produce in order tomake our own material better and – if you give us permission – to inspire otherusers.

Trademarks
SiteManager™, LinkManager™ and GateManager™ are trademarks of
Secomea A/S. Other trademarks are the property of their respective owners.

Disclaimer
Secomea A/S reserves the right to make changes to this publication and to the
products described herein without notice. The publication of this document does
not represent a commitment on the part of Secomea A/S. Considerable effort
has been made to ensure that this publication is free of inaccuracies and omissions but we cannot guarantee that there are none.
The following paragraph does not apply to any country or state where such provisions are inconsistent with local law:
SECOMEA A/S PROVIDES THIS PUBLICATION "AS IS" WITHOUTWARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING,
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
OR FITNESS FOR A PARTICULAR PURPOSE
SECOMEA A/S SHALL NOT BE LIABLE FOR ANY DIRECT, INDIRECT,INCIDENTAL, CONSEQUENTIAL, OR OTHER DAMAGE ALLEGED IN
CONNECTION WITH THE FURNISHING OR USE OF THIS INFORMATION.

Configuring SMS Gateways on GateManager

Page 16 of 16