IBM Worklight v5.0.5 > WL server administrationSMS gateway configuration
An SMS gateway, or SMS aggregator, is a third-party entity which is used to forward SMS notification messages to a destination mobile phone number. IBM Worklight routes the SMS notification messages through the SMS gateway.To send SMS notifications from IBM Worklight, one or more SMS gateways must be configured in...
/server/conf/SMSConfig.xml
To configure an SMS gateway, set the values of the following elements, subelements, and attributes in the SMSConfig.xml file. WL server must be restarted when any changes are made in the SMSConfig.xml file.
Element Element Value gateway Root element of the SMS gateway definition. Includes 6 attributes:
- hostname
- id
- port
- programName
- toParamName
- textParamName
These attributes are described in Table 2
parameter Optional. The number of parameter subelements is dependent on SMS gateway-specific parameters. If an SMS gateway requires the user name and password to be set, then these parameters can be defined as parameter subelements. Each <parameter> subelement has the following attributes:
- name
- value
gateway element attributes
Attribute Attribute Value hostname The host name of the configured SMS gateway. id A unique ID that identifies the SMS gateway. Application developers specify the ID in the application descriptor file, application-descriptor.xml, when they develop an application. port Optional. The port number of the SMS gateway. The default value is 80. programName Optional. The name of the program that the SMS gateway expects. For example, if the SMS gateway expects the following URI: http://<hostname>:port/sendsms
then...
programName="sendsms"
toParamName Optional. The name used by the SMS gateway to specify the destination mobile phone number. The default value is to. The destination mobile phone number is sent as a name-value pair when SMS notifications are sent; that is...
toParamName=destination mobile phone number
textParamName Optional. The name used by the SMS gateway to specify the SMS message text. The default value is text.
If the SMS gateway expects an HTTP post in the following format to forward SMS messages to a mobile device:
http://myhost:13011/cgi-bin/sendsms?to=dest_mobile_number&text=message_text&username=fcsuser&password=fcspass
The SMSConfig.xml file...
<?xml version="1.0" encoding="UTF-8"?> <sms:config xmlns:sms="http://www.worklight.com/sms/config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <gateway hostname="myhost" id="kannelgw" port="13011" programName="cgi-bin/sendsms" toParamName="to" textParamName="text"> <parameter name = "username" value = "fcsuser" /> <parameter name = "password" value = "fcspass" /> </gateway> </sms:config>
Parent WL server administration