Description
The service is an interface that provides interaction between platform components and external SMS gateways, call centers and e-mail servers. Notification GW is used to send notifications to platform and Wi-Fi users.
To install the service, use the package eltex-ngw.
Starting/stopping procedure
To stop the service, the following command is used:
service eltex-ngw stop
To start the service after stopping:
service eltex-ngw start
To check if the service is operating at the moment, use the command:
service eltex-ngw status
The following message will be displayed, if the service is operating:
eltex-ngw start/running, process <pid>
or eltex-ngw stop/waiting will be displayed
eltex-ngw stop/waiting
Configuration
/etc/eltex-ngw/notification.properties
The main configuration file containing the following parameters:
- The configuration file for SMS gateway connection (for sending SMS to users)
sms.gate.outgoing.sms.config=smsc_gate.conf
- The configuration file for user identification by SMS sent by him:
sms.gate.incoming.sms.config=smpp_gate.conf
- The configuration file for user identification by incoming calls:
sms.gate.incoming.call.config=rtk_sbc.conf
- Configuring the size of an SMS pool and the waiting time:
#Gate pool settings sms.gate.pool.size=50 sms.gate.pool.wait.millis=5000
- Configuring the size of an SMS pool and the waiting time. The configuration file for incoming call authorization
#Call gate configuration call.gate.outgoing.call.config=smg_gate.conf call.gate.pool.size=50 pool.wait.millis=5000
- The port listened by the service to receive requests for SMS sending:
#Port to listen for requests server.port=8040
- Configuring MongoDB connection for keeping an SMS sending log
#============================= #=======database settings===== #============================= #mongodb.uri=mongodb://192.168.1.1,192.168.1.2:27017/notification-gw mongodb.host=localhost mongodb.port=27017 #mongodb.user=user #mongodb.password=password mongodb.name=notification-gw mongodb.fsfiles.store.period=7
To connect to replicaSet, the format mongo uri can be used. It is as follows:
mongodb://[username:password@]host1[:port1][,host2[:port2],...[,hostN[:portN]]][/[database][?options]]
An example of connecting to replicaSet with authorization configured:
mongodb.uri=mongodb://admin_ngw:password@192.168.42.224:27017,192.168.42.225:27017,192.168.42.226:27017/notification-gw?replicaSet=clustest
- Connecting to the mail service
#============================= #=======email settings======== #============================= mail.smtp.submitter=example@eltex.loc mail.smtp.password=password mail.smtp.auth=true mail.smtp.host=eltex.loc mail.smtp.port=587 mail.smtp.sendpartial=true mail.smtp.connectiontimeout=5000 mail.gate.pool.size=20 mail.pool.wait.millis=10000
To enable encryption of the mail service connection, specify the following option:
mail.smtp.starttls.enable=true
/etc/default/eltex-ngw
contains parameters for application launch
JAVA_INIT_HEAP=16m # Maximum size of Java heap JAVA_MAX_HEAP=128m LOG_LEVEL=info # Additional arguments to pass to java JAVA_OPTS="-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/var/log/eltex-ngw"
JAVA_INIT_HEAP - amount of memory allocated to an application when starting the service
JAVA_MAX_HEAP - maximum amount of memory that an application can use
LOG_LEVEL - a logging level: error, warning, info, debug
JAVA_OPTS - additional options for java launch
Configuration files to connect SMS gateways
To connect to different SMS gateways, a set of configuration templates was created. If you have not found a required template among suggested ones, contact the technical support to provide integration with your gateway.
- SMS center - smsc_gate.conf
- Seven Sky - 7sky_gate.conf
- Zagruzka - zagruzka_gate.conf
- SMS gateway with SMPP support - smpp_gate.conf
- NetPing SMS GSM gateway - netping_gate.conf
- Fargo maestro 100 GSM gateway - serial_port.conf
Contact the technical support to ask whether it is possible to provide integration with other gateways.