Cyclos controller OLD

Contents

SMS

Basic concepts

What does the system do?

The system adds another way for member to operate with Cyclos. The member's operations supported by the system at this time are the followings:

Other functionality offered by the system is to deliver Cyclos generated notifications.

The objective of the system is to be able to send or receive asynchronous messages. The system has been developed to fullfill the need of Cyclos to work with SMS, although we wanted to isolate Cyclos from the complexities of the SMS world. The main idea was to work with SMS but we didn't want to restrict it only to the SMS world, so we build it to be able to handle any kind of asynchronous messages.

Brief review of the system

There are more than one responsability in the system. The main responsability is to connect one or several intances of Cyclos to the SMS world, this means the system should be able to decide which Cyclos is a message for or which number is a Cyclos message for (we named this routing). Once a message arrive to the system, it should be able to recognize the user request and extract the information needed to ask Cyclos to carry out the action.

There are several routing possibilities. In the most general scenario the system can be connected to several service providers and to several Cyclos instances. The other scenarios are simplifications of that one.

The system should be able to process a message. Once a message arrived, the system will try to identify what kind of message it was (payment, request, detail, etc). If the message isn't recognized, the system would answer with an error message. The system would make Cyclos process the message, if the message was recognized and the parameters were correct.

Architecture

Architecture

The system is composed by two modules: Driver and Controller. Each module offer a web service entry point and those entry points are guarded by address access control (ip) granting access only to authorized systems. The Controller can work with several Drivers and several Cyclos instances.


The driver support different communication channels. Every channel is considered to work with asynchronous messages. You can work with SMS by several means, GSM modem, a service provider or a direct connection with the TELCO talking SMPP. The actual version of driver support GSM modem through SMSLib and services providers through HTTP or HTTPS connection.


The controller take care of messages routing between Cyclos and Drivers, handling errors messages, sessions management and messages parsing.


You can be working with different service providers. They may be offering messaging service for different countries or different TELCOS. We can think of different Cyclos instances servicing different countries and working independently. In this scenario we should have one driver and Cyclos for each country and only one controller.


Conceptually we could think there is no controller and the driver is the channel. Here the channel (service provider, GSM modem, etc) is connected directly to the Cyclos instances and Cyclos knows exactly where to send messages. This conceptual view is carried out by the Controller module (see image below: Conceptual View).

Controller

Commands

The part of the system that carry out an action is based on the idea of commands. A command is an entity able to carry out some task at the time a message arrives. It can take an action against a Cyclos instance, although it can answer the message by itself. There are different types of commands you can setup for every Cyclos instance. Each command is developed for a specific use case.

Routing

Conceptual View

The routing is done in the Controller module. To be carried out there are two mappings, one from Cyclos to Driver and one from Driver to Cyclos. The Cyclos to Driver mapping is done based on two custom fields defined for every member. One of those custom fields defines what the TELCO is. The other custom field define the member's cellphone number. The mapping from Driver to Cyclos is easier, it is based only on the incoming number and driver id. You can forget about the Controller and think conceptually about the connections between Drivers and Cyclos just like shown in the image.

Driver

The main responsability for the Driver is to work as a proxy to isolate the Controller from the compexities of different communication channels. To acomplish this task the Driver is built with the idea of an Engine. The engine is responsible for the communication with the channel and there is one Engine for every supported channel.


There are several Engines. The SMSDriverEngine is responsible for communication using a GSM modem. The HttpGatewayEngine is responsible for communication through a Gateway. You can add more Engines as you need them.

Web Services

Controller web services used by Cyclos

Payment request

Cyclos will invoke this operation to ask the Controller to confirm a payment request.

Available operations:

requestPaymentConfirmation: Send the payment request message to the member. The Controller will generate a session in order to match the member confirmation response, otherwise the session will expire (there is a parameter to specify the expiration time).

Notifications

Allow Cyclos to deliver notification messages to members.

Available operations:

send: Used by Cyclos to send a notification to a member.

Controller web services used by Driver

Messaging

Allow the Driver to send a received message to the Controller.

Available operations:

send: Invoked by the Driver to send a message.

Driver web services used by Controller

Messaging

Allow the Controller to send a message to the Driver.

Available operations:

send: Invoked by the Controller to send a message.

Model data details

Many of the web services operations works with model data. The following elements are available (with their properties):

PaymentRequestTicketVO

TODO: complete

Operations

Direct payment

Paymen flow
Payment sequence diagram

In this scenario one member decides to do a payment to another member. At that time, the payer send a text message indicating the amount, his credentials and the principal of the other member. If the payment was successful, the system would sends a message to the receiver member to notify that a payment has been received.

Message

Flow

Messages samples

Message: PY 1234 748596 105 dolars
Description: The sender (which password is 1234) is paying 105 dolars to member 748596.

Payment request (two way payment)

Request flow
Request payment, sequence diagram

A member (the receiver) ask another member (the payer) to pay him an amount of money. The receiver sends a message indicating the amount, the payer member principal and (optionally) the currency. When the payer receives a message indicating the request he could answer with the code that was sent to him and his credentials to accept it. If he doesn't answer, the payment wouldn't be done.

Request message

Request flow

Confirmation message

Confirm payment, sequence diagram

Confirmation flow

Messages samples

Payment request message: RQ 748596 24 Dolars
Payment request message description: The receiver request the user 7485969 pay to him by 24 Dolars

Payment confirmation message: CF 1523 1234
Payment confirmation message description: The payer (which has 1234 pin number) confirm the pay for request 1523.

Account details

Details flow
Account details, sequence diagram

The member want to see his account history. The member send a message indicating his credentials and optionally the currency and page number.

Message

Flow

Messages samples

Message: DT 1234 dolars
Description: The sender (which password is 1234) request his account history information for the dolars currency (the first page is returned)

Message: DT 1234 2
Description: The sender (which password is 1234) request his account history information for the default currency (the second page is returned)

Generated (outbound) messages

Notifications are generated in Cyclos, whereas error messages are handled directly by the Controller.

There are only two notifications messages that are generated by the Controller:

Mensaje Description
{0} ha solicitado su pago por {1}. Para confirmar, responda este mensaje con el texto\: CF {2} <un espacio y su PIN>. Solicitud de confirmación de pago. Utilizado en el comando Requerimiento y confirmación de pago
Balance {0}. Movs: {1} {2} {3} Mensaje de respuesta al comando Detalle de cuenta

Error messages

The error messages send by the Controller can be defined in a properties (language) file in the Controller. As the Controller can handle more than one Cyclos instance there can be more properties files per controller (once per Cyclos instance). One properties file can be assigned to be the default file. The following is the list of error messages:

Message Description
El comando no fue reconocido. Los comandos válidos son rq, py, dt. Este mensaje es devuelto por el controlador al origen de un mensaje recibido, en aquellos casos en que la estructura de texto del mensaje recibido no machea con el formato de ninguno de los comandos procesados.
Monto ({0}) invalido. Transacción Abortada Generado por los comandos Requerimiento y confirmación de pago, y Pago directo cuando el valor del monto no puede ser convertido a un valor interpretado por Cyclos
Moneda {0} invalida. Transacción abortada La interpretación de texto que representa a una moneda es mapeada en la configuración del controlador. Los comandos Requerimiento y confirmación de pago, y Pago directo pueden generar esta notificación si no logran encontrar mapeo correspondiente al parámetro de la moneda incluida en el mensaje
Es imposible utilizar la moneda solicitada ({0}) Esta notificación es generada por el Controlador si este no puede encontrar en Cyclos la moneda mapeada en su configuración
Error desconocido al procesar el comando {0}. Transacción abortada Es notificada al origen de un mensaje, cuando este último esta siendo procesado y se genera una excepción no manejada en el Controlador.
Error en campo personalizado de uno de los miembros. Transacción abortada En general, cada vez que el controlador recibe un mensaje, su primer acción consiste en verificar que la dirección origen del mismo corresponda a un miembro habilitado de Cyclos. En el caso que el campo configurado en el controlador, que debe almacenar la dirección de los miembros, no sea encontrado en cyclos se generará esta notificación.
Acceso denegado, miembro inhabilitado o password incorrecto. Transacción abortada Cada vez que la transacción correspondiente a la ejecución de un comando implique autenticar al miembro correspondiente a la dirección de origen, y este no sea encontrado o sus credenciales (PIN) no sean válidas, se generará esta notificación
Dispositivo {0} no encontrado. Transacción abortada En general, cada vez que el controlador recibe un mensaje, su primer acción consiste en verificar que la dirección origen del mismo corresponda a un miembro habilitado de Cyclos. Si el miembro no es encontrado en Cyclos se generará esta notificación
El valor de la pagina no es valido. En el comando Detalle de cuenta, opcionalmente se puede enviar la página del historial de transacciones a recibir (el historial se pagina cada tres transacciones, que corresponde al historial enviado en un mensaje). Si el valor del parámetro de página recibido en el mensaje esta fuera del rango del listado, se genera esta notificación.
El miembro pagador, {0}, es invalido. Transacción abortada Se genera en el comando de Requerimiento y confirmación de pago, cuando la identificación del miembro pagador, recibido en el mensaje, no corresponde a un miembro de Cyclos.
Imposible confirmar el pago. Transacción abortada. Este mensaje es notificado cuando la ejecución de un pago no es posible en Cyclos (las razones pueden ser varias, no existe saldo en la cuenta del pagador, el miembro destino no dispone del canal habilitado, etc)
El miembro receptor {0} es invalido. Transacción abortada Se genera en el comando de Pago directo, cuando la identificación del miembro receptor, recibido en el mensaje, no corresponde a un miembro de Cyclos.
Error al crear la sesión para el pago. Transacción abortada Al procesar un comando de Requerimiento y confirmación de pago, se genera una sesión en el Controlador a fin de esperar el mensaje de confirmación. Si la sesión no se ha podido crear se genera el presente mensaje (la causa mas probable es superar el tamaño máximo de sesiones configurado en el Controlador)
Sesión [{0}] invalida. Transacción abortada Esta notificación se genera al recibir un mensaje correspondiente a una confirmación de pago cuya sesión no existe o ha expirado
El pago solicitado es imposible de realizar (error de simulación). Transacción Abortada Esta notificación se genera en el caso de procesar un comando requerimiento y confirmación de pago (primer fase).
Imposible encontrar un tipo de transferencia entre los miembros. Transacción abortada Cada vez que se genera un pago se debe encontrar un tipo de transferencia compatible con la moneda del pago entre los miembros involucrados. Esta notificación se genera si Cyclos no dispone de un tipo de transferencia válido para el pago.

The member is allowed to setup what kinds of events he wants to be notified through SMS. The most important notifications are the payments you have done and the payments you have received. Those notifications should be enabled to allow the system to work properly, if they are not enabled, the member won't know when a payment is done or received (Direct payment or Request payment).

Connectivity

Connectivity to gateway

Cyclos shuttle service for transactions via SMS can work through an SMS Gateway povider. Provider Gateway is designed to a more stable base and facilitate negotiations with each locale telcos

Abbreviations and Concepts

TELCO Company cellphone and SMS service.
MO Mobile Originated: a message sent by a mobile phone. The message can be sent to a phone or to a software application.
MT Message Terminated: a message to a mobile phone. The message can be sent by phone or by a software application.
GSM MODEM An electronic device that allows the sending and receiving messages (and / or data) in a cellular network. In current cellular networks, this device requires an ID chip, known as SIMM to operate.
SMS GATEWAY A provider which allow to send messages to TELCOS hidding the complexities of the TELCOS interfaces.

Connection for sending and receiving SMSs
The Driver is the module that is connected to the Gateway to allow sending and receiving messages. Another option is connect the Driver to a GSM Modem, however working with a Gateway is probably the best option.

Network Protocols
The supported connection between the Driver and the service provider is HTTP or HTTPS. You can also negotiate a VPN. However connecting through a VPN or not, we always recommend to use the HTTPS connection to improve security.

Communication protocol
It is the way the Gateway and the Driver module will interact. It is accustom to use REST or SOAP as communication technologies, although we are not limited to those technologies. An agreement should be made between the Gateway and Driver technical staff about the communication protocol so one or both of them could start developing and testing the integration.

TELCO works with
It is important that the chosen provider operates with all the TELCOS you want integrate with. This is important for two reasons:

Short Number
There is typically only one short number to receive SMS messages. This short number must be requested in each TELCO you want to operate. It is usually easier for Gateways to negotiate short numbers among different TELCOS, in that case the only thing you need to do is give all information the Gateway ask for.

Cost of service
In general there are two types of contracts

Message Costs
Except the case of MT recovery message (see MT message recovery), all other messages sent by Cyclos would generate a cost to the organization that operates it. That cost is fixed by the TELCO through which the message is sent. Telcos generally tend to work by selling packets of messages, which are valid at the time (similar to a prepaid card for sending SMS messages). For this reason, the cost of sending an SMS message can depend on TELCO whereby the trafficked. In some cases gateway providers charge the organization with a cost per message traffic (received as sent, in whatever form). This cost is added to the monthly fixed cost for the service and will depend on the volume of message sent and / or received from each of the TELCO with which they work. NOTE: when the personal interview with a Gateway provider, check what are the fixed costs for the service and whether there are variable costs depending on the traffic of messages (or otherwise).

MT message recovery
Often organizations want to avoid variable costs. For these cases you can use the MT message. This type of message is charged to the recipient thereof. Depending on the laws of each region (country), may require additional clauses in contracts with users who access this service or a kind of instantaneous activation and deactivation of the same (eg via SMS). In general the cost charged for the message to the recipient exceeds the cost of a normal SMS and must be specified and informed service user. The price for the message must be negotiated with the TELCO when requesting the services of short number (for details, see the section on short number). In some cases the Gateway operator can add a fee to his favor at the cost of MT (payable by the recipient of the message). NOTE: At the time of the interview with the gateway is important to record the plans that they suggest (and whether they can work on your order against the TELCO) service for the show, and make an outline of costs for each message.

Transfer service ID (Caller ID)
Every SMS you receive comes with the service ID of the sender (The caller ID is the cellphone number). This information is essential to identify what member sent the message and that way validate the transactions. NOTE: Sometimes (especially when the message is transferred from a TELCO to another, or when the message travels across international borders), that information may not get properly. At the time of the interview with the Gateway's staff is important to note that ID is required for us to work properly.

Safety Requirements
As Cyclos operates on economic transactions special attention must be paid to data security. SMS messages should include personal data as transaction PIN, username, etc. In many countries, personal data are regulated by law. You must take into account the legislation of the region to assess the requirements of confidentiality of the information contained in the messages. For this reason the data and the means of transfer must be consistent in its protection. See also the connection point for sending and receiving data

TELCO connectivity
Gateway operator must connect each of the TELCO in which it does (to send and receive messages). Special attention should be paid to the security of data transfer. NOTE: at the time of the interview with the operator of Gateway is important to emphasize this fact and point out that security in data transfer becomes a key point. Try to get as much information as possible about the background of the Gateway operator in terms of security in their methods of operation.

Logs, and confidentiality clauses
It is important to include confidentiality clauses regarding the data that is included in messages that are trafficked, and the logs that are kept from them. NOTE: To avoid surprises, at the time of the interview with the staff of Gateway providers do note that the request will include confidentiality clauses referring to the data traffic in the messages.

Setup

Driver setup

Working with MODEMS

Java comm configuration, by use with SMS modems

When you work with SMS modem, you need to download and install Java communication API extension (http://java.sun.com/products/javacomm/, anxious people can find basic files on resources/javacomm) . Some important tips:

 -\# Paths to server-side serial port devices
 serpath0 = /dev/ttyS0
 serpath1 = /dev/ttyS1
 serpath2 = /dev/ttyACM0
 serpath3 = /dev/ttyACM1
 serpath4 = /dev/ttyUSB0
 serpath5 = /dev/ttyUSB1 


Please be warned that while working with Eclipse and Tomcat, the javax.comm.properties shouldn't be placed in your home directory.
Serial ports on Linux (udev command)

Some problems would arise, if you are use the GSM modem under linux. The main problem would be about the current user not having permissions on the device file. Another problem is that the device could appear connected in a different file under the /dev folder every time you plug the device. udev can help solve this by mapping the device to a unique file.

  1. - Connect the device to the computer.
  2. - udevadm info -q all -n {path to the device mounting point} -a
  3. - create a file name for the udev rules in /etc/udev/rules.d/ name it wathever you want ending with .rules
  4. - write down in a single line comma separated, ENV or ATTRS ({the subsystem you see in step 2}), with values that identify the device you want,

add SYMLINK+="newdevicename" were newdevicename is the name of the file you want the device to be pluged-in, MODE="0777" so you give permissions to everybody or wathever permission is right for your installation (the running user should have read and write permissions over the file)

  1. - unplug the device
  2. - sudo restart udev and wait a few seconds after it finishes
  3. - plug-in the device and wait a few seconds
  4. - udevadm info -q all -n /dev/{symlink name you added} (this should show you the device information)
  5. - setup your application configuration files to point to the symbolic link instead of the real device

Log 4J

Asynchronic message system use Log4J as logger function. If you prefer change the log4j characteristic you would need to change the log4j.xml or log4j.properties files (they are placed on root directory of sources for both applications, driver and controller). To know how to configure log4j by an XML file please refer to log4j web site.

Driver (properties) configuration file

The DriverConfig.properties file is placed on folder WEB-INF, this allow to configure some characteristic and behaviors. The items that allow to configure are:

  1. driverId - All driver applications need a label Id. This label Id will be used by controller to identify the driver instances and route the messages between it and Cyclos instances.
  2. wsClients - it's a while IP address list. Specify from which IP addresses allow to connect to served web service interfaces
  3. controllerUrl - specify the base url to contact the web services served by controller
  4. fromControllerQSize - Size for queue where to store message arrived from controller
  5. toControllerQSize - Size for queue where to store message arrived from external (going to go to Controller)
  6. engineClass - path and class name of engineClass, its an special implementation of driver (you have three implementation in Driver proyect:
    1. Http - nl.strohalm.cyclos.driver.sms.engine.HttpGatewayEngine - Allow send and receive messages using Http post (or get) from a Gateway provider
    2. Sms with Modem - nl.strohalm.cyclos.driver.sms.engine.SMSDriverEngine - Allow to send and receive SMS message through a GSM modem.
    3. Dummy - nl.strohalm.cyclos.driver.dummy.engine.DummyDriverEngine - Only log information, allow to test the asincrhonic message module
  7. disableCNCheck - Allow to connect with Controller WS by SSL, without check the server name
  8. trustAllCert - Allow to connect with Controller WS by a SSL, without check if the cert is endorsed by a trusted entity
  9. testServletAccess - it's a while IP address list. Specify from which IP addresses allow to operate the servlet test (see Testing the system bellow)
  10. message.maxLength - Maximum length allowed in a message from controller to modem, gateway or media (see Message filtering bellow)
  11. message.characterForbidden - list of character which will be forbiden in messages from controller to modem, gateway or media (see Message filtering bellow)
  12. message.characterAllowed - list of character allowed (in addition to letters and digits) in messages from controller to modem, gateway or media (see Message filtering bellow)
  13. message.characterToReplace - list of character which should be replaced in messages from controller to modem, gateway or media (see Message filtering bellow)
  14. message.characterReplacement - list of character used for replacement in messages from controller to modem, gateway or media (see Message filtering bellow)
  15. message.characterForbidenReplacement - a character to replace disallowed chars in messages from controller to modem, gateway or media (see Message filtering bellow)

Message filtering

When a message arrive to Driver from controller (the driver should to send the message to a modem, gateway or other media), the message text has to follow some rules and process:

When a property specified a list of character it should be separated by a colon character (,). I/E: U, u, \u00ED,;

A character can't be duplicated on characters list of properties message.characterForbidenReplacement, message.characterToReplace, or message.characterAllowed.

All characters specified in properties can be wrote as Unicode ("$" is the same that "\u0024")

Driver configuration sample file

#the ID for this driver in controller
driverId=SmsDriver

#While list access for WS 
wsClients=127.0.0.1 192.168.3.192

#URL for consume controller web service
controllerUrl=http://127.0.0.1:8080/cyclos3_sms_controller/services/controller
controllerDisableCNCheck=true
controllerTrustAllCert=true

# Incoming queue size for message (from controller)
fromControllerQSize=10 

# Outgoing queue size for message (to controller)
toControllerQSize=10

# The class path and name for extended engine class
#engineClass=nl.strohalm.cyclos.driver.sms.engine.SMSDriverEngine
#engineClass=nl.strohalm.cyclos.driver.sms.engine.HttpGatewayEngine
engineClass=nl.strohalm.cyclos.driver.dummy.engine.DummyDriverEngine

#test servlet white list access
testServletAccess=192.168.0.192 127.0.0.1

# message from controller text filter
message.maxLength=240
message.characterForbidden=\u0025,#
message.characterAllowed=\u0024,-,:
#replace accented vowels (á,é,í,ó,ú)and special characters (ñ,Ñ) by standar characters
message.characterToReplace=\u00E1,\u00E9,\u00ED,\u00F3,\u00FA,\u00F1,\u00D1
message.characterReplacement=a,e,i,o,u,n,N
message.characterForbidenReplacement=_

Controller setup

The system will choose a command to be executed based on the message text. This text will be matched by means of a regular expression. The first command that matches the regular expression is the one that will be executed. Command's parameters are defined in terms of regular expression groups, the first parameter is asociated with the group 2 and so on.


The controller configuration is based in two files config.xml and cyclosInstance.properties. The config.xml file (placed in the root folder of source) allow to set some aspects and behaviors. Here we will find the rules to route messages betwen cyclosInstances and driverInstances. Elements:

Cyclos instance

The Cyclos instance configuration has information about a cyclos which operate with this controller. Items:

Drivers instance

The Driver instance configuration has information for routing messages from the Driver to Cyclos. It is composed of a list of entry tags which contains the following tags:

Controller configuration sample file
<cycloscontroller  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:noNamespaceSchemaLocation="/opt/develop/workspace.galileo.cyclos3_sms/cyclos3_sms_controller/src/config.xsd">
         
         <cyclosInstances>
         	<entry>
         		<key>compras</key>
         		<value>
	         		<accountsAliases>
	         			<entry><key>UN</key><value>1</value></entry>
	         			<entry><key>UNITS</key><value>1</value></entry>
	         			<entry><key>PE</key><value>2</value></entry>
	         			<entry><key>PESOS</key><value>2</value></entry>
	         		</accountsAliases>
	         		<driverChannels>
	         			<entry><key>TtyDriver</key><value>sms</value></entry>
					<entry><key>SmsDriver</key><value>sms</value></entry>
	         		</driverChannels>
	         		<commandActions>
	         			<entry>
	         				<key>BALANCE_REQUEST</key>
	         				<value>nl.strohalm.cyclos.controller.command.BalanceCommand</value>
	         			</entry>
	         			<entry>
	         				<key>BALANCE_RESPONSE</key>
	         				<value>nl.strohalm.cyclos.controller.command.BalanceResponseCommand</value>
	         			</entry>

	         			<entry>
	         				<key>CONFIRM_PAYMENT</key>
	         				<value>nl.strohalm.cyclos.controller.command.ConfirmCommand</value>
	         			</entry>
	         			<entry>
	         				<key>REQUEST_PAYMENT</key>
	         				<value>nl.strohalm.cyclos.controller.command.RequestPayCommand</value>
	         			</entry>
	         			<entry>
	         				<key>ACCOUNT_DETAILS</key>
	         				<value>nl.strohalm.cyclos.controller.command.DetailCommand</value>
	         			</entry>
	         			<entry>
	         				<key>PERFORM_PAYMENT</key>
	         				<value>nl.strohalm.cyclos.controller.command.PayCommand</value>
	         			</entry>
	         		</commandActions>
                               <disableCNCheck>true</disableCNCheck>
	         		<driverDefault>
	         			<driverId>TtyDriver</driverId>
	         			<messageSource>1234</messageSource>
	         		</driverDefault>
	         		<driverMap>
	         			<entry>
	         				<key>Ancel</key>
	         				<value>
	         					<driverId>TtyDriver</driverId>
	         					<messageSource>1234</messageSource>
	         				</value>
	         			</entry>
	         			<entry>
	         				<key>Movistar</key>
	         				<value>
	         					<driverId>SmsDriver</driverId>
	         					<messageSource>4321</messageSource>
	         				</value>
	         			</entry>
	         		</driverMap>
	         		<languageProperties>cyclosInstance.properties</languageProperties>
	         		<memberDiscriminatorField>phone</memberDiscriminatorField>
	         		<provider>cell_provider</provider>
	         		<rootUrl>http://127.0.0.1:8280/cyclos</rootUrl>
                               <trustAllCert>true</trustAllCert>
         		</value>         	
         	</entry>
         </cyclosInstances>
          <digitsSessionId>12</digitsSessionId>
          <driverInstances>
          	<entry>
          		<key>SmsDriver</key>
          		<value>
         			<cyclosDefault>compras</cyclosDefault>
                               <disableCNCheck>true</disableCNCheck>
          			<rootUrl>http://localhost:8080/cyclos3_sms_driver/services/driver</rootUrl>
         			<routeToCyclos>
         				<entry>
          					<key>1234</key>
         					<value>compras</value>
         				</entry>
        				<entry>
         					<key>4321</key>
         					<value>compras</value>
         				</entry>
         			</routeToCyclos>
                               <trustAllCert>true</trustAllCert>
         		</value>
        	</entry>
         	<entry>
         		<key>TtyDriver</key>
         		<value>
         			<cyclosDefault>compras</cyclosDefault>
                               <disableCNCheck>true</disableCNCheck>
         			<rootUrl>http://localhost:8080/cyclos3_sms_driver/services/driver</rootUrl>
         			<routeToCyclos>
         				<entry>
         					<key>1234</key>
         					<value>compras</value>
         				</entry>
         				<entry>
         					<key>4321</key>
         					<value>compras</value>
         				</entry>
         			</routeToCyclos>
                               <trustAllCert>true</trustAllCert>
         		</value>
         	</entry>
          </driverInstances> 		 
	   <ipWhiteList>127.0.0.1</ipWhiteList>
          <maxSessionHandler>10</maxSessionHandler>
          <sessionTimeout>20</sessionTimeout>
</cycloscontroller>

Cyclos setup

Steps to integrate SMS service to Cyclos:

Usuario Administrador

Manual de Usuario y Administrador

Manual de Usuario

Este manual podrá ser utilizado por el usuario final, en el que se le ayudará a entender que significan las funcionalidades que tiene disponibles, así como seleccionar o no aquellas que prefiera.

Deben de haberle dado permisos al usuario para poder visualizar y modificar sus notificaciones. Para saberlo debe estar logueado e ir a Preferencias - Notificaciones. Allí vera tres columnas "Email" - "Mensajes de Cyclos" - "SMS"

Detalle de las columnas

Common mistakes

Once you have setup the environment it is important to run some test to check the setup was successfull.

Regular expressions

Language setup

Controller setup

Testing the system

This sub module use the testServletAccess parameter on DriverConfig.properties to specify the allowed source IP.

To simulate sending or recieving an SMS to the driver at URL:
http://<TomcatIp>:<TomcatPort>/cyclos3_sms_driver/test
Driver simulation servlet

Parameters

You can also use the Dummy driver (only create log, but don't take real action) by setting the parameter engineClass=nl.strohalm.cyclos.driver.dummy.engine.DummyDriverEngine into the properties file driver configuration.

Test sample

Simulate: Rx
From cellular: 59898399813
To cellular: 1234
Message: Py 5678 745812 110

The sample will simulate a received message (by driver) which would make a payment: from memeber with cellular 59898399813, to member with login name 745812, an by 110 unit in the default currency (1234 is the short number for Cyclos, and 5678 is the payer PIN).


Consideraciones para WIKI de módulo SMS 3.0.114

Considerar este caso, si se descuenta 1 peso a la cuenta por cada mensaje enviado, y se pide el saldo el valor de disponible sera el valor disponible real +1 (ya que luego de haber sacado el detalle y saldo disponible se envio el mensaje de respuesta que le resto 1 peso al valor). Para el caso que los SMs se carguen por paquete es incierto si el disponible mostrado por el comando sera el realmente disponible, o si el mensaje de respuesta genera cargo de costo de un nuevo paquete de sms (en cuyo caso el disponible sera el que mostro el mensaje menos el costo del paquete, pero esto solo sucede cuando se carga paquete porque se terminaron los sms disponibles).