The gateway supports the HTTP (Hyper Text Transport Protocol) protocol to connect to an SMSC over the internet or other private TCP/IP network. Please note that this functionality is for connecting to an SMS service provider that accepts SMS messages via HTTP. (Trying to connect back to your own NowSMS server, or to your regular web site will not cause any messages to actually be sent.) To add an HTTP connection, select “Add” from the “SMSC” configuration dialog. Then select “HTTP over TCP/IP“.
“Host Name” specifies a DNS host name or TCP/IP address for connecting to the service.
“Port Number” specifies the HTTP port number to use when connecting to the service.
Check “Use SSL (https://)” if the URL for connecting to the service provider is https:// based instead of http://.
Check “Use HTTP Proxy” if the gateway must connect to the HTTP server via a proxy server, and supply the host name or TCP/IP address and port number of the proxy server in the “Proxy Server” field using a format of “host.name:9999”, where “host.name” is the DNS host name or TCP/IP address of the proxy server, and “9999” is the port number of the proxy server.
“User name” and “Password” specify a user account and password to use when connecting to the service.
“Send login credentials using HTTP Authorization headers” refers to how the user name and password information is sent to the HTTP server. The login information can either be sent as replaceable parameters in the URL request, or using the “HTTP Authorization” header. Check this box to use the “HTTP Authorization” header. This box should be checked when connecting with another Now SMS & MMS gateway.
“Server Type” provides pre-defined templates for connections to common gateway interfaces. If you are connecting to one of the servers with a pre-defined template, such as another Now SMS & MMS gateway, select its server type here. Otherwise, select “Custom” to define a custom template.
“URL Template Text” is a URL template that is used when sending text SMS messages. When the gateway has a text SMS message to send, it connects to the HTTP server and issues the URL request specified in this field, replacing the “replaceable parameters” with values for the message to be sent. A complete list of “replaceable parameters” is provided below.
“URL Template Binary” is a URL template that is used when sending binary SMS messages. When the gateway has a text SMS message to send, it connects to the HTTP server and issues the URL request specified in this field, replacing the “replaceable parameters” with values for the message to be sent. A complete list of “replaceable parameters” is provided below.
URL Template Replaceable Parameters:
|@@UserName@@||The user name configured for this connection (optional)|
|@@Password@@||The password configured for this connection (optional)|
|@@PhoneNumber@@||The phone number of the recipient to receive this SMS message (required)|
|@@Text@@||The text of the SMS message (required for text messages)|
|@@Data@@||The data of the SMS message in binary format as a string of hexadecimal characters (either this or @@DataBin@@ required for binary messages)|
|@@DataBin@@||The data of the SMS message in binary format as the actual binary data in URL escaped format (either this or @@Data@@ required for binary messages)|
|@@UDH@@||The “User Data Header” of a binary message as a string of hexadecimal characters (either this or @@UDHBin@@ required for binary messages)|
|@@UDHBin@@||The “User Data Header” of a binary message in binary format as the actual binary data in URL escaped format (either this or @@UDH@@ required for binary messages)|
|@@PID@@||SMS “Protocol ID” field as a hexadecimal value|
|@@PIDdecimal@@||SMS “Protocol ID” field as a decimal value|
|@@DCS@@||SMS “Data Coding Scheme” field as a hexadecimal value|
|@@DCSdecimal@@||SMS “Data Coding Scheme” field as a decimal value.|
|@@Sender@@||Phone number to be included as the sender of this message.|
|@@ServiceType@@||Advanced: The “service_type” value associated with the message. This parameter is usually only present if the message was originally submitted by or received from an SMPP client or server, and preserves the original SMPP value.|
|@@ReceiptRequested@@||Advanced: This value is set to Yes if the submitted message requested a return receipt.|
|@@UDHDestPort@@||Advanced: If the UDH of the message includes destination port addressing, this contains the destination port value (in hexadecimal), otherwise blank.|
|@@UDHDestPortDecimal@@||Advanced: If the UDH of the message includes destination port addressing, this contains the destination port value (in decimal), otherwise blank.|
|@@MessageID@@||Advanced: This value contains the NowSMS assigned MessageID, so that it can be passed to the HTTP SMSC as a message reference id.|
|@@SubmitUser@@||Advanced: This value can include the user account that originally submitted the message to NowSMS.|
|@@SubmitPassword@@||Advanced: This value can include the password for the user account that originally submitted the message to NowSMS.|
“Sender Address” specifies the default sender address (phone number) to apply to outbound SMS messages. The SMSC to which you are connecting may override this setting. (Note: The sender number is only transmitted if the @@Sender@@ variable is included in your URL template string.)
Check “Allow Sender Address Override” if you want to allow messages submitted to the gateway to be able to specify a sender address. If this box is checked, and a sender address is present in a message being submitted to an HTTP based SMSC, the sender address in the message will be submitted to the SMSC. The SMSC may override this setting.
Check “Remove ‘+’ from Recipient Phone Number” if the gateway should remove the “+” character from international phone numbers before submitting the message to the HTTP SMSC. HTTP SMSC interfaces based upon the Kannel product expect the “+” character to be removed.
Some types of messages processed by the Now SMS & MMS Gateway may require multiple SMS messages to transmit a single logical message. This is because the maximum size of an SMS message is 160 text characters or 140 binary bytes of data. The Now SMS & MMS Gateway automatically segments larger messages and submits them as multiple SMS messages that can be reassembled by the receiving client. Some HTTP based SMSCs prefer to split larger messages themselves. Check “Send long messages without segmentation” if you want the SMSC to split larger messages into multiple SMS messages, or leave this setting unchecked to allow the Now SMS & MMS Gateway to perform necessary segmentation of large messages.
By default, when sending a long text message, or a text message that includes UDH (such as an EMS message, or a message that includes source or desintation port addressing), NowSMS will encode the SMS message in a binary format using 7-bit binary encoding for the message text. To use standard text encoding instead, it is necessary to uncheck “Use 7-bit binary encoding for long text messages”. Unchecking this setting will cause NowSMS to use the “URL Template Text” when sending such a message, so ensure that the template includes a parameter for including the UDH of the message.
By default, when sending a Unicode text message, NowSMS will encode the Unicode text as a hexadecimal string, and pass it to the HTTP SMSC as a binary message. If your SMSC prefers to receive these messages as standard text, it is necessary to uncheck “Use hex encoding for Unicode messages”. When this setting is unchecked, NowSMS will use the “URL Template Text” when sending a Unicode message, and will encode the text using UTF-8 character set encoding, unless another character set is specified.
“Character Set” specifies the character set to be used when transmitting text messages to the HTTP SMSC.
“Max Connections” specifies the maximum number of concurrent connections that NowSMS can have open to the HTTP SMSC for transmitting messages. By defining more than one connection, NowSMS will attempt to simultaneously open multiple connections to the HTTP SMSC for sending messages.
The “Routing” group of options is used when multiple SMSC connections are defined to the gateway. These options define what messages should be routed to this connection. The Routing options are common to SMPP, GSM Modem, UCP/EMI and HTTP connections, and are described in the Routing Options section.
When the “OK” button is selected, the gateway will attempt to connect to the HTPP server to verify the configuration information provided. Diagnostic information will be displayed if the connection fails. The connection will only be added to the configuration after a successful connection to the HTTP server. Note that although a connection attempt was successful, you should attempt to send a message through the interface to verify that the URL templates are defined correctly.
Receiving SMS Messages via an HTTP SMSC Connection
In most configurations, an HTTP SMSC connection can only be used for sending SMS messages. For both sending and receiving of SMS messages, it is better to use one of the SMS specific protocols, such as SMPP.
However, it is also possible to receive SMS messages using an HTTP SMSC connection, so that they will be routed to a 2-way command processor, or even to a local user account.
To submit a received SMS message into NowSMS, so that the message will be routed to the 2-way command processor, it is necessary to make an HTTP connection to NowSMS in the same way that an application would submit a message to NowSMS for outbound message delivery. For more information on the URL format for this HTTP connection, please see Submitting SMS Messages – URL Parameters.
To indicate that the message is an inbound received message, instead of an outbound message, it is necessary to add
to a standard NowSMS URL request.
Alternatively, it is possible to include
to route a message to a local “SMS Users” account for delivery via SMPP.
Note that if “SMS Users” accounts are enabled in NowSMS, it is necessary to include an
parameter to authenticate as an “SMS Users” account, even though the messages are to be processed as received messages instead of outbound message submissions. To prevent the possibility of a received message being routed for outbound delivery, we recommend creating a separate “SMS Users” account for this type of message delivery. Check “Enable Credit Balance” for the account, and leave the credit balance at 0. This will allow the account to deliver received SMS messages (i.e.,
), but will disallow any attempts to submit a message for outbound delivery.