In the
first part of the planned series of articles, we considered some general issues of working with SMS messages, and now with a slight delay we publish another article. So, remember: messages can be incoming and outgoing, SMS centers are responsible for processing messages, it is possible to replace the sender of the message.
Let's start the second part with the most important - with the protocol. Of course, for working with SMS messages, its own protocol, the Short Message Peer-to-Peer Protocol (
SMPP ), was developed, which is used for communication between SMS centers. The protocol is developed by the organization SMSforum, which publishes its specifications. To work with this protocol, there are a number of libraries in different languages [
1 ] [
2 ] [
3 ], but the most popular open source solution is the
kannel server, which implements all the main aspects of working with SMS and is also a WAP gateway. SMS centers can send messages not only via SMPP, but also through any other protocol - HTTP, OSCAR, XMPP or mail protocol for sending via e-mail. To work with various web projects, a transformation into the HTTP protocol is used, which is the most convenient and familiar for a web developer. Therefore, as was rightly noted in the comments to the first part, it is not necessary for the developer to know and use SMPP.
Almost all companies that provide SMS sending or SMS payment services use their own protocols, more or less of the same type and differing only in the number and names of parameters, as well as in implementation (SOAP, GET / POST, XML-RPC). The description of such a protocol can be seen on the example of our
sms: transit service . It can be noted that it uses many international standards, so the MCC and MNC parameters are used to determine the country and operator, and the subscriber number is transmitted in an international format with a mandatory country code.
As you already understood, to work with SMS, you do not need to know the SMPP protocol, protocols developed by service providers are much simpler and easier to use, and in many cases you can even offer ready-made solutions for most tasks. SMS messaging companies provide not only libraries for working with their protocol, but also full-fledged software for maximum simplification of work. In the field of SMS payments, the situation is not worse. So our company, besides the usual
SMS transport with code examples in several languages, has developed a lot of ready-made solutions for specific purposes, we call them
services , as well as dozens of modules for the vast majority of
well-known CMS . Other service providers also do not stand still, so the market is replete with quality solutions for the implementation of almost any ideas.
')
Let us go back to the curious details of the SMS-payment process. There are three types of subscriber billing: MO-billing, in which the subscriber pays at the time of sending the message, MT-billing, in which he pays at the time of receiving the answer, and DO-billing (Double-Opt), in which after sending the message, the subscriber comes request for confirmation, and only after it the payment process takes place. The technical difference between them is as follows: in the first and last versions you will receive a message from the subscriber only if he has funds on his balance, in the case of MT-rating you will receive a message and process it before checking the balance and withdrawing funds to be made only after the subscriber receives an answer from you. You will receive a notice of delivery of the response, but it does not necessarily mean the fact of payment. Often this disadvantage of the MT-rating can be bypassed by sending an additional system message, for example, with the cost of the service, only after receiving the notification of its delivery, the subscriber will be sent the desired response. The disadvantage of this method is the need to pay for the delivery of an additional message, which reduces the already small income.
However, MT-tariffication has its advantages. For example, in the case of an error committed by the subscriber, you can not debit funds from him. In addition, several rates can be used on one short number at once, which can be very useful if the cost of the rooms is 500-10000 dollars. Only MT-pricing allows you to realize a subscription: the subscriber gives his consent to the regular withdrawal of a certain amount after a certain period of time and automatically receives the service paid in this way without additional efforts. Our company provides a similar service in several countries. It gives an excellent result for those services where you can implement a subscription subscription, for example, for file sharing services, torrent trackers. Earnings of our partners are increased up to several times due to the multiplication of the client base, while the subscribers do not express dissatisfaction, moreover, some thanked for this opportunity. Of course, the subscriber always has the opportunity to terminate such a subscription, and in some countries he receives additional messages with information about how much was withdrawn from him this month and for the entire period.
In the comments to the first part, several questions were raised, to which we will answer further.
1. What is the length of SMS and how to send SMS more than this limit?
The length of the SMS with the header is 160 characters with 7-bit encoding, 140 characters with 8-bit and 70 characters with 16-bit encoding. Messages of greater length can both receive and send all modern devices, data about its parts are stored in the message header. Those who are especially shrewd have already linked this information with the maximum length of the message on Twitter and were absolutely right, the service has been created under and for working with SMS.
2. SMS and WAP
One of our readers suggested that sending SMS via wap is inconvenient, which is incorrect. When working with browsers through a mobile device, you can use the
sms format links
: 4443? Body = dam999 , which will open the already completed SMS sending form like the usual mailto links. This feature is very convenient to use when creating paid services on sites with a large "mobile" audience.
What else could be interesting? Automatic SMS sending by phone. Unfortunately, this feature is actively used by fraudsters who are doing everything possible so that the victim downloads the application, which, after starting, almost hangs up the device with requests for sending SMS. Excellent examples of using this opportunity for lawful purposes are the renewal of a subscription in a mobile game, payment for the full version of the program after the trial period, and a whole host of others, for example, applications for chatting on Twitter, which, if there is no Internet connection, can use SMS to send statuses.
It is difficult to cover all the technical issues in one article, but we have tried to highlight the most important and interesting points, and your comments will help develop the description further in the areas of interest to you. Anyway, in the following parts we will discuss the problems of fraud, legal and financial aspects of work, we will share interesting statistics that we have been collecting for the last 3 years, and a lot of other “insider” information.
Thanks to everyone who comments and subscribes, it is clear that the topic is not only little described, but also causes a lively interest, which also gives us an incentive to write articles with great interest.