SmsService
The SmsService is responsible for receiving and sending SMS messages using SMS providers.
For this purpose, appropriate SMS managers are implemented for different SMS providers.
XML Configuration
Note: If you want to modify the configuration file for a service directly in the file system, you will find the appropriate file in the configuration file ./etc/factory.xml. Details about the configuration can be found in the respective documentation of a service. Otherwise, you can edit the configuration file directly via the respective service in the GUI.
The following XML fragment activates the forwarding of incoming SMS messages to the MessageService.
<
Call
name
=
"enableMessageService"
>
<
Arg
>messageService</
Arg
>
<
Arg
>context</
Arg
>
<
Arg
>queue</
Arg
>
</
Call
>
The parameters have the following meaning.
messageService |
The name of the message service to use. |
context |
The message context to be used. |
queue |
The message queue to be used. |
If the specified consumer queue does not yet exist, it will be created automatically.
Adding a SMS ProviderManager
The following XML fragment adds a ProviderManager.
<
Call
name
=
"addManager"
>
<
Arg
>
<
New
class
=
"name_of_provider_class"
>
[provider class specific settings]
</
New
>
</
Arg
>
</
Call
>
Adding and Configuring the MindMaticsManager
The MindMaticsManager makes it possible to send SMS messages using the web-based interface of the company Mindmatics. It is also possible to receive text messages form Mindmatics via a servlet. The class name to add the manager to the SMSService is com.ebd.hub.services.sms.MindMaticsManager.
Basic Configuration by Using the XML File
The following XML fragment with all possible basic settings can be used for the configuration of the MindMaticManager.
<
Set
name
=
"name"
>MindMaticsManager</
Set
>
<
Set
name
=
"passwd"
>mmpassword</
Set
>
<
Set
name
=
"prefix"
>+49</
Set
>
<
Set
name
=
"URL"
>
http://www.mindmatics.de/cgi-bin/sendsmsifn.pl
</
Set
>
<
Set
name
=
"user"
>user</
Set
>
The parameters have the following meaning.
Parameter |
Description |
name |
The name of the manager as it should appear in the information summary. |
passwd |
The password to use for authentication at the Mindmatics server. |
prefix |
The prefix to use when sending the recipient number if no explicit country code was specified. |
URL |
The URL to use to send SMS messages. The URL in the example is the default URL. |
user |
The user name to use for authentication at the Mindmatics server. |
Activating the SMS Reception
The receipt of SMS messages sent by Mindmatics requires the activation of the receive servlet. This is done with the following XML fragment, which must be inserted in configuration file ./etc/hub.xml.
<
Call
name
=
"addContext"
>
<
Arg
>/sms/*</
Arg
>
<
Call
name
=
"addServlet"
>
<
Arg
>MindMatics SMS Provider</
Arg
>
<
Arg
>/MindMaticsServlet</
Arg
>
<
Arg
>com.ebd.hub.services.sms.MindMaticsServlet</
Arg
>
</
Call
>
</
Call
>
The URL, you have to tell Mindmatics in the partner agreement, would be the following for the example above and can be changed by changing the corresponding entries.
http://yourhost.com/sms/MindMaticsServlet |
Note: The XML fragment is usually already present in file ./etc/hub.xml, possibly only commented out.
Adding and Configuring the YapsManager
The YapsManager allows to send SMS messages using the program yaps1. The program has to be installed on the system. The class name to add the manager to the SMSService is com.ebd.hub.services.sms.YapsManager.
Basic Configuration by Using the XML File
The following XML fragment with all possible basic settings can be used for the configuration of the YapsManager.
<
Set
name
=
"name"
>YapsManager</
Set
>
<
Set
name
=
"command"
>/usr/bin/yaps</
Set
>
The parameters have the following meaning.
Parameter |
Description |
name |
The name of the manager as it should appear in the information summary. |
command |
The command for sending the SMS message. |
Administration via the Admin Console
Administration of the SMSService via the Admin console is currently not supported.
Log Level Dependencies
Changes to the log level of the LogService have no influence on the logging behaviour of the SMSService.
If the verbose mode of the service is set, messages about the exact structure of the SMS to be sent and a possible response of a server used are added to the log when the SMS is transmitted.