10.2.3. Sending SMS Messages Using a Protocol / Interface Supported by an SMSC or SMS Gateway
After setting up an account with a wireless carrier or an SMS service provider, you can start sending SMS messages using a protocol / interface supported by the SMSC or SMS gateway. To communicate with an SMSC, an SMSC protocol is required. Most of these SMSC protocols are proprietary to the company that developed the SMSC. One widely used SMSC protocol is SMPP (Short Message Peer to Peer). It was originally a proprietary SMSC protocol created by Logica (an SMSC vendor). Now SMPP is an open SMSC protocol whose development is controlled by a non-profit organization SMS Forum. The following table lists some of the SMSC protocols and the SMSC vendors who develop the protocols:
SMSC vendor |
SMSC protocol |
---|---|
CMG (CMG and Logica have merged into LogicaCMG.) |
EMI (External Machine Interface) UCP (Universal Computer Protocol) |
Logica (CMG and Logica have merged into LogicaCMG.) (Now the SMS Forum is responsible for the development of SMPP.) |
SMPP (Short Message Peer to Peer) |
CIMD (Computer Interface to Message Distribution) |
|
SEMA Group (Now Airwide Solutions) |
OIS (Open Interface Specification) SMS2000 |
SMS gateways of SMS service providers and wireless carriers very often support one or more of the following protocols / interfaces: HTTP, HTTPS (HTTP + SSL encryption), XML over HTTP / HTTPS, SMTP (email to SMS), FTP. Some also support the SMPP protocol, which is usually used by advanced users. SMSC protocols other than SMPP are not commonly supported.
It is very easy to send SMS messages if you use a simple protocol like HTTP / HTTPS. Here is an example. To send an SMS message "It is easy to send text messages" to the mobile phone number 61234567, you submit an HTTP GET to the SMS gateway using an URL that looks something like this:
http://smsgateway.company123.com/cgi-bin/sendsms?account=account123&password=password123&destination=61234567&textmessage=It+is+easy+to+send+text+messages
In the above URL:
"smsgateway.company123.com" is the host name of the SMS gateway that the SMS text message should be sent to.
"sendsms" is the file name of the CGI program that will be executed on the SMS gateway.
"account=account123" is used to assign the value account123 to the account parameter. The account parameter specifies which account that the cost of the SMS text message should be deducted from.
"password=password123" is used to assign the value password123 to the password parameter. The password parameter specifies the password of the account.
"destination=61234567" is used to assign the value 61234567 to the destination parameter. The destination parameter specifies the recipient's mobile phone number.
"textmessage=It+is+easy+to+send+text+messages" is used to assign the value It is easy to send text messages to the textmessage parameter. The textmessage parameter specifies the SMS text message to be sent. There exists some "+" characters because the space character is a special character and it should be escaped if it appears in an URL. The escaped character of the space character is the "+" character.
After receiving your HTTP request, the SMS gateway will forward your SMS text message towards the recipient. The SMS gateway will then send back an HTTP response that contains a return value. The return value indicates whether there are any errors. For example, a certain SMS gateway may use the return value 0 to indicate that there is no error, the return value 1 to indicate the error "The account does not have enough credits", the return value 2 to indicate the error "The SMS message is too long", etc.
Note that the parameters that can be passed in an HTTP request and the return values varies between SMS gateways of different SMS service providers and wireless carriers. To send the same SMS message "It is easy to send text messages" to the same mobile phone number 61234567 but with a different SMS service provider, the URL to be used may become:
http://api.abccompany.com/cgi-bin/send?user=account123&passwd=password123&to=61234567&msg=It+is+easy+to+send+text+messages
Also, note that data transmitted over the Internet using the HTTP protocol is not secure. This means other people can read your account name and password you included in the above URL. To send data securely, you should use the HTTPS protocol instead of HTTP (i.e. change "http" at the beginning of the above URL to "https"), like this:
https://api.abccompany.com/cgi-bin/send?user=account123&passwd=password123&to=61234567&msg=It+is+easy+to+send+text+messages
Previous Page | Page 13 of 65 | Next Page |
- 1. Introduction to SMS Messaging
- 2. What Makes SMS Messaging So Successful Worldwide?
- 3. Example Applications of SMS Messaging
- 4. What is an SMS Center / SMSC?
- 5. Basic Concepts of SMS Technology
- 6. Intra-operator SMS Messages
- 7. Inter-operator SMS Messages
- 8. International SMS Messages
- 9. What is an SMS Gateway?
- 10. How to Send SMS Messages from a Computer / PC?
- 11. How to Receive SMS Messages Using a Computer / PC?
- 12. Introduction to GSM / GPRS Wireless Modems
- 13. How to Use Microsoft HyperTerminal to Send AT Commands to a Mobile Phone or GSM/GPRS Modem?
- 14. Introduction to AT Commands
- 15. General Syntax of Extended AT Commands
- 16. Result Codes of AT Commands
- 17. AT Command Operations: Test, Set, Read and Execution
- 18. Testing the Communication between the PC and GSM/GPRS Modem or Mobile Phone
- 19. Checking if the GSM/GPRS Modem or Mobile Phone Supports the Use of AT Commands to Send, Receive and Read SMS Messages
- 20. Operating Mode: SMS Text Mode and SMS PDU Mode
- 21. Setting or Reading the Service Center Address / SMSC Address (AT+CSCA)
- 22. Preferred Message Storage (AT+CPMS)
- 23. Writing SMS Messages to Memory / Message Storage (AT+CMGW)
- 24. Deleting SMS Messages from Message Storage (AT+CMGD)
- 25. Sending SMS Messages from a Computer / PC Using AT Commands (AT+CMGS, AT+CMSS)
- 26. Reading SMS Messages from a Message Storage Area Using AT Commands (AT+CMGR, AT+CMGL)
- 27. Appendix A: How to Choose an SMS Service Provider (SMS Gateway Provider, SMS Reseller, SMS Broker)?
- 28. Appendix B: Comparison Table of SMS Service Providers (SMS Gateway Providers, SMS Resellers, SMS Brokers)
- 29. Appendix C: Free Software/Tools and Libraries for Sending and Receiving SMS Messages with a Computer / PC
- 30. Appendix D: GSM 7-bit Default Alphabet Table (with Character Codes of ISO 8859 Latin 1)