Sending WAP OTA Messages over HTTP
To send a WAP OTA message via a menu driven interface, please see the help section titled Web Menu Interface. This section describes how to send a WAP OTA message programmatically via URL parameters.
WAP OTA (Over The Air) Messages are special SMS messages that contain information used to configure the settings of a WAP browser in a mobile phone. There are two basic types of OTA messages, the most common type of OTA message contains a complete set of configuration parameters for the WAP browser, and a second type of OTA message contains a single bookmark.
WAP Bookmark OTA Messages
The WAP Bookmark OTA message is only supported by few mobile phones (at the time this document was written). To send a WAP Bookmark OTA message, use the following URL format:
For 127.0.0.1, please substitute the IP address or host name assigned to your gateway PC. (Note: 127.0.0.1 is a local loop back address that can be utilized when you are connecting to the gateway from the same computer.)
For 8800, please substitute the port number that the gateway is configured to use.
Substitute the phone number that you wish to send the SMS message to for the “xxxxxxxx” in the “PhoneNumber” parameter. Use either the local phone number format, or the international phone number format (your network provider may or may not allow you to send to international phone numbers). If the international phone number format is used, note that you must substitute “%2B” for the “+” character, because of URL escaping restrictions. For example, to send an SMS to +447778001210, use %2B447778001210 instead.
The URL to be pushed to the mobile device as a bookmark is specified in the “WAPBookmark” parameter. Note that the “http://” portion of the URL is not necessary and is assumed. Also note that it may be necessary to escape some URL characters, please refer to the table in the Sending Text Messages section for common characters that must be escaped.
WAP Configuration OTA Messages
The gateway supports OTA documents containing “Browser settings” or “Browser bookmarks”, compatible with the Nokia/Ericsson “Over The Air Settings Specification”, with support up to v7.0.
This specification can be downloaded from the developer area of either the Nokia or SonyEricsson developer web sites.
Three approaches are provided for sending WAP Configuration OTA messages:
- The “web menu” interface of the gateway provides a menu based interface for specifying WAP configuration settings.
- URL parameters can be passed to the gateway to dynamically define WAP configuration settings.
- Manually create an OTA document based on the Nokia/Ericsson specification, and store this document in the “OTA” subdirectory of the gateway installation, or POST the document to the gateway via the web interface.
The “web menu” interface is defined in the help section titled Web Menu Interface. The other approaches are defined below.
WAP Configuration OTA – URL Parameters
Using the WAP Configuration OTA URL parameters requires a good understanding of the Nokia/Ericsson OTA Specification. This document specifies the mapping of gateway URL parameters to OTA setting parameters. The value provided for the gateway URL parameter is applied to the corresponding OTA setting parameter. Please refer to the Nokia/Ericsson specification for documentation of the OTA setting parameters.
OTA_BEARER – maps to TYPE=ADDRESS, PARM NAME=BEARER
OTA_PPP_AUTHTYPE – maps to TYPE=ADDRESS, PARM NAME=PPP_AUTHTYPE
OTA_PPP_AUTHNAME – maps to TYPE=ADDRESS, PARM NAME=PPP_AUTHNAME
OTA_PPP_AUTHSECRET – maps to TYPE=ADDRESS, PARM NAME=PPP_AUTHSECRET
OTA_PPP_LOGINTYPE – maps to TYPE=ADDRESS, PARM NAME=PPP_LOGINTYPE
OTA_PROXY – maps to TYPE=ADDRESS, PARM NAME=PROXY
OTA_PROXY_TYPE – maps to TYPE=ADDRESS, PARM NAME=PROXY_TYPE
OTA_PROXY_AUTHNAME – maps to TYPE=ADDRESS, PARM NAME=PROXY_AUTHNAME
OTA_PROXY_AUTHSECRET – maps to TYPE=ADDRESS, PARM NAME=PROXY_AUTHSECRET
OTA_PROXY_LOGINTYPE – maps to TYPE=ADDRESS, PARM NAME=PROXY_LOGINTYPE
OTA_PORT – maps to TYPE=ADDRESS, PARM NAME=PORT
OTA_CSD_DIALSTRING – maps to TYPE=ADDRESS, PARM NAME=CSD_DIALSTRING
OTA_CSD_CALLTYPE – maps to TYPE=ADDRESS, PARM NAME=CSD_CALLTYPE
OTA_CSD_CALLSPEED – maps to TYPE=ADDRESS, PARM NAME=CSD_CALLSPEED
OTA_ISP_NAME – maps to TYPE=ADDRESS, PARM NAME=ISP_NAME
OTA_SMS_SMSC_ADDRESS – maps to TYPE=ADDRESS, PARM NAME=SMS_SMSC_ADDRESS
OTA_USSD_SERVICE_TYPE – maps to TYPE=ADDRESS, PARM NAME=USSD_SERVICE_TYPE
OTA_GPRS_ACCESSPOINTNAME – maps to TYPE=ADDRESS, PARM NAME=GPRS_ACCESSPOINTNAME
OTA_URL – maps to TYPE=URL
OTA_MMSURL – maps to TYPE=MMSURL
OTA_NAME – maps to TYPE=NAME, PARM NAME=NAME
OTA_BOOKMARK_NAME – maps to TYPE=BOOKMARK, PARM NAME=NAME
OTA_BOOKMARK_URL – maps to TYPE=BOOKMARK, PARM NAME=URL
OTA_ID – maps to TYPE=ID, PARM NAME=NAME
Note that the “Send WAP OTA Settings” implementation in the gateway “web menu” interface uses this URL interface to submit OTA setting parameters. Viewing the source HTML for the corresponding “web menu” interface pages may provide an improved understanding of this URL interface.
WAP Configuration OTA – OTA Documents
It is also possible to provide OTA configurations by creating one or more OTA documents that contain settings compatible with the Nokia/Ericsson specification.
OTA documents should be created in the OTA subdirectory of the gateway installation, and given a file extension of “.OTA”.
Once an OTA document has been created, to send an OTA “Browser settings” file to a mobile phone, use the following URL format:
The “OTA” parameter specifies the name of a file located in the OTA subdirectory of the gateway with a file extension of “.OTA”. For example, in the above sample URL, the gateway would attempt to locate a file named “filename.OTA” in the OTA gateway subdirectory.
To send an OTA “Browser bookmarks” file to a mobile phone, use the following URL format:
The “OTABookmark” parameter uses the same format as the “OTA” parameter when sending “Browser settings”, except that it expects the browser bookmark settings file to have a file extension of “.BM”.
An example OTA “Browser settings” file is shown below, for additional information, please refer to the Nokia/Ericsson “Over The Air Settings Specification”.
GSM/CSD Settings Example:
<?xml version=”1.0″ encoding=”UTF-8″?>
<PARM NAME=”BEARER” VALUE=”GSM/CSD”/>
<PARM NAME=”PROXY” VALUE=”22.214.171.124″/>
<PARM NAME=”CSD_DIALSTRING” VALUE=”+12135551212″/>
<PARM NAME=”PPP_AUTHTYPE” VALUE=”PAP”/>
<CHARACTERISTIC TYPE=”URL” VALUE=”http://mobileinternet.ericsson.com”/>
<PARM NAME=”NAME” VALUE=”Mobile Internet”/>
<PARM NAME=”NAME” VALUE=”Mobile Internet”/>
<PARM NAME=”URL” VALUE=”http://mobileinternet.ericsson.com”/>
It is also possible to send OTA messages without creating an OTA document on the gateway by submitting an HTTP POST request to the gateway with the content of the POST message being an OTA “Browser Settings” file. It is not possible to submit such a request via a standard web browser, instead this request must be submitted programmatically. Submit the POST to a URL of:
When submitting an OTA request in this manner, the HTTP POST request must include a “Content-Length:” header.
To provide a more complete example, to perform this HTTP POST, an application can open an HTTP connection to the port for the NowSMS web interface, and send the following data:
POST /?PhoneNumber=xxxxxxxx&user=username&password=password&OTA=POST HTTP/1.0
<xml settings document>
When sending an XML document in this manner, the HTTP POST request must include a “Content-Length:” header. This should match the length of your XML document. This is how the server detects that the HTTP POST is complete. The “&user=” and “&password=” parameters specify an “SMS Users” account that is allowed to submit messages via NowSMS.
NowSMS will scan the XML content to automatically determine what the content type is, so that it can be encoded properly for sending over the air.
For a complete list of URL parameters, please refer to the section Submitting SMS Messages – URL Parameters.