SMS HTTP Character Limitations

Hello,

I am using the SMS Gateway feature and I have 3 concerns.

  1. Is there a way to Send SMS using a POST request and providing the sms message in the HTTP body? Currently I see that we are able to use GET. So I am forced to use

http://192.168.1.1/cgi-bin/sms_send?username=USER&password=PASS&number=0015555555555&text=test message

This is a problem when I would like to send longer messages.

  1. When using the GET request, it doesn’t account for messages that have an ending paragraph and going to a new line. For example even it my message has a ‘\n’ in it, the message doesn’t recognize this as a new line.

  2. When my messages are long and do not fit in a single SMS, the message is cut off and at the bottom of the message has this:

“Send ‘more’ to see the rest.
Authorization may be required.”

In order to get the rest of the message, the receiver would need to replay with “more”. Is there a way to disable this and to have the modem automatically send the rest of the message, even in additional SMS segments? Also to remove the “Authorization may be required.” message as well.

Hello,

Unfortunately, you will need to use GET in this case. It is also not possible to remove the “send ‘more’ to see the rest”.

EDIT: To avoid confusion, it is possible to send SMS with post as well, but this will not solve you issue. To send via POST, you need specify content-type as ‘x-www-form-urlencoded’, include username, password, number and sms text as key-value pairs, and post it to http://192.168.1.1/cgi-bin/sms_send?.

However, you can use ‘%0A ’ for a new line. I also suggest you take a look at the encoding on the webpage here.

An alternative method to send SMS via HTTP would be to use JSON-RPC. This way you can use HTTP POST to execute commands on the device, i.e. to send SMS. Information on JSON-RPC can be found here for Windows, and here for Linux. When using JSON-RPC, the following command can be used to send SMS:

gsmctl -S -s "<number> <message>"
# for example:
gsmctl -S -s "0037010101101 yourmessage"

Kind Regards,

This topic was automatically closed after 15 days. New replies are no longer allowed.