You have the option of addressing the SMS module as an interface by means of a URL. By integrating predefined placeholders (parameters) into the URL, you can use the device to send SMS text messages by means of an HTTP(S) call. This makes LANCOM cellular routers ideal for use as an SMS gateway.
You use your access credentials to authenticate at the device; just how these are Integrated into the URL is determined by your browser's requirements. The typical notation is Username:Password@Host.
The URL call uses the syntax:
(http|https)://<User>:<Password>@<Host>/sms/?<Param1>=<Value1>&…&oldauth
The parameter oldauth is vital, otherwise none of the available browsers will send the access credentials to the device. In addition, the following placeholders are defined:
- DestinationAddress
- Phone number to which the device should send the SMS. The same conventions apply as for normal telephone calls. Specify the parameters as follows:
-
&DestinationAddress=01511234567 &DestinationAddress=00491511234567
- Content
- Content of the text message. The number of characters is limited to one SMS text message (max. 160 characters). For an overview of available characters, see the section Character set for sending SMS.Spaces and other special characters to be included into an SMS must be sent to the device in the URL-encoded form. For example, spaces are encoded with %20 and full stops with %2E. Specify the parameters as follows:
-
&Content=This%20is%20a%20message%2E
- Learn more about this topic on the Internet under the keyword "URL encoding" and also at www.w3schools.com.
- Note: Some browsers perform the URL encoding automatically. Despite this, we recommend that you encode the content yourself to ensure that all of the characters are converted correctly.