Differences

This shows you the differences between two versions of the page.

Link to this comparison view

en:cc_envoie_d_alerte_par_sms_au_centre_de_calcul [2016/12/16 10:16] (current)
Line 1: Line 1:
 +Last modified: Jun 13, 2006 by Kachelhoffer\\
 +\\
 +
 +====== CC: sending alarm by SMS from Computing Center ======
 +
 +\\
 +\\
 +
 +=====  Introduction ​ =====
 +
 +This article describes the way to use the Sms sending service provides by the Computer Center: this service allows experiments which want to, to send alarm messages from their own survey applications by sms technology.
 +=====  Presentation of the service ​ =====
 +
 +
 +====  Generalities ​ ====
 +
 +The Compiter Center provides a service to send alarm messages by sms technology. This service allows experiments which want to, to send alarm from their own servey applications. Sendind an sms alarm allows to notify rapidly a technical staff outside normal working hours in order to have a remote action. The sms are send through a gsm modem linked on a dedicated computer inside the center. The good progress of the sms depends on:
 +  * The network between the computer hosting the survey application and the sms sending computer.
 +  * The gsm network of the phone operator used by the sms sending computer.
 +  * The gsm network of the phone operator used by the client.
 +
 +
 +====  Working principle ​ ====
 +
 +To send a sms, a client application should send a request to the sms sending computer. For that, it should open a socket with the dedicated port of the server and to send the request on this socket, having regard on the protocol detailed further. A short C module, available on demand, can be a first example and provides functions allowing following steps:
 +  * Connection to the server and registration of the experiment.
 +  * Sending a request of sms sending.
 +  * Disconnection.
 +
 +=====  Limitations and usage control ​ =====
 +
 +
 +====  Limitations on the sms body  ====
 +
 +Due to the sms protocol standard and the technical solution chosen, the sms body should respect following limitations:​
 +  * The sms body can not exceed 160 characters as maximum.
 +  * The sms body can not contain any letter with accent, no special characters. More precisely, are authorized the 26 alphabetical letters (upper and lower case), numbers and next specific characters: space ! " # $ % & ' ( ) * + , - . / : ; < = > ? @ _
 +
 +
 +====  Quotas on sending sms  ====
 +
 +To prevent from an application becoming crazy or a misuse (the sms are invoiced to Computer Center by unit), some quotas have been deployed. These sms sending quotas are put by experiment and also globaly at the server level. These quotas are from 3 types: per hour, per day, per month. For example, it could be like:
 +Per experiment, a maximum of:
 +  * 20 sms per hour.
 +  * 50 sms per day.
 +  * 300 sms per month.
 +
 +For all experiments,​ a maximum of:
 +  * 100 sms per hour.
 +  * 200 sms per day.
 +  * 1000 sms per month.
 +
 +When a quotas is reached, the sms are rejected (until the quota is reset to zero by going to the next hour, day, month). Some informations are kept at the server level to be used as necessary: the whole sms sended (issuer experiment, phone number, sms body, sending hour) and the monthly number of sending sms per experiment. Note that no private informations could be send in the sms body. 
 +====  Access control ​ ====
 +
 +In order to secure and improve the control on the use of the sms sending server, each experiment sould be, as a preliminary,​ be registered at the server level. An experiment will be distinguished by its name. After that, the experiment will be authorized to make sms sending requests from a limited number of IP address. These IP address should also be registered. It can be individual IP address or a whole subnet. You should also ask the Computer Center to open some filters at the network level. Take care that the number of clients simultaneously connected to the server is also limited, especially for a same experiment (5 for example).
 +=====  Communication protocol with the smsd server ​ =====
 +
 +
 +====  Generalities ​ ====
 +
 +Here are two tables discribing the dial protocol between smsd and the client. The commands and the return messages follow the next rules:
 +  * One command per line (commands sould be separated by '​n'​).
 +  * Commands are identified by their first three letters. Upper or lower case does not matter and it is possible to write the entire command. As to be more explicit, the commands below are fully written with the first three letters in upper case.
 +  * Return messages are identified by codes of three letters. These codes are followed by a space, a double-point punctuation char, an other space and an explanatory message.
 +  * In case of error return message, the explanatory message itself consist of a three letters error code and an explanatory message.
 +
 +The dial with the smsd server is made in 3 steps:
 +  * The client should registered itself.
 +  * The client send one or more requests of sms sending.
 +  * The client disconnects itself to the smsd server.
 +
 +
 +====  Command for a non registered client ​ ====
 +
 +
 +===  Command for the client: ENRegistre toto  ===
 +
 +^return from smsd                         ​^comments ​                                                                     ^
 +|EOK: enregistrement correct ​             |toto is the name of the experiment ​                                           |
 +|EPB: INC: commande incomplete ​           |if no experiment name given                                                   |
 +|EPB: SIM: trop de connections simultanees|if the maximum number of simultaneously connections is reached for this client|
 +|EPB: AUT: client non autorise ​           |if the client name is not authorized to use smsd                              |
 +|EPB: AIP: adresse IP non autorisee ​      |if the IP address is not in the list of those authorized for this client ​     |
 +
 +
 +===  Command for the client: DECconnection ​ ===
 +
 +These command perform a properly deconnection to the server. ​
 +===  Commane for the client: xxx  ===
 +
 +^return from smsd                               ​^comments ​                                      ^
 +|INV : commande invalide (client non enregistre)|all other commands than "​enregistre"​ is refused|
 +
 +
 +====  Commands for a registered client ​ ====
 +
 +
 +===  Commande for the client: SMS 06xxxxxxxx sms body  ===
 +
 +^return from smsd                 ​^comments ​                                                                           ^
 +|SOK: sms a envoyer bien recu     ​|06xxxxxxxx:​ recepient gsm phone number. The sms body should not have cariage return.|
 +|SPB: INC: commande incomplete ​   |some arguments are not there                                                        |
 +|SPB: NUM: numero non valide ​     |to be valid, the phone number in France should have 10 numbers and begin with "​06" ​ |
 +|SPB: COR: corps du sms non valide|if the sms body is too long or have non authorized characters ​                      |
 +|SRE: DJA: sms deja envoye ​       |if the same sms is still sended to the same recipient less than 1 hour before ​      |
 +|SRE: QTA: quota depasse ​         |if the quota (hourly, daily, monthly) for the experiment is reached ​                |
 +|SRE: SAT: serveur sature ​        |if the overall quota (hourly, daily, monthly) for the server is reached ​            |
 +|SRE: MOD: modem indisponible ​    |if there is no gsm modem connected to the server ​                                   |
 +
 +
 +===  Command for the client: DEConnection ​ ===
 +
 +These command perform a properly deconnection to the server. ​
 +===  Commande for the client: xxx  ===
 +
 +^return from smsd      ^comments ​             ^
 +|INC: commande inconnue|for all other commands|
 +
 +**Note 1:** It is possible to specify the recipient phone number like +336xxxxxxxx for France.\\
 +\\
 +**Note 2:** The client will be automatically disconnect from the server in next cases:
 +  * If there is one of "EPB : SIM", "EPB : AUT" ou "EPB : AIP" error message.
 +  * If there is a message of type "​SRE"​.
 +  * If the server is reconfigurated and the client is not authorized anymore.
 +
 +
 +====  Example ​ ====
 +
 +For example, the complete process to send an sms is:
 +^client command ​                        ^smsd return ​                ^
 +|ENRegistre toto                        |EOK: enregistrement correct |
 +|SMS 0601020304 alarme truc muche bidule|SOK: sms à envoyer bien recu|
 +|DECconnection ​                         |                            |
 +
 +
  
  • en/cc_envoie_d_alerte_par_sms_au_centre_de_calcul.txt
  • Last modified: 2016/12/16 10:16
  • (external edit)