Upgrading from NowSMS on Windows to NowSMS NextGen on Linux

Upgrading from NowSMS on Windows to NowSMS NextGen on Linux SearchSearch
Author Message
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 6265
Registered: 08-2008
Posted on Tuesday, April 06, 2021 - 09:28 pm:   

NowSMS NextGen is designed to be a drop-in replacement for the existing NowSMS Windows product. There are a few scenarios that require extra attention, but for many installations, the upgrade is as simple as copying the NowSMS directory structure from your existing Windows server to a new Linux server and the running the simple 2-step NowSMS install.

We understand that while many customers are eager to try new features of this product, the first and most important consideration for most is that this new version should be compatible with and provide functionality consistent with previous versions of NowSMS.

Similar to the Windows version of NowSMS, most configuration settings are stored in SMSGW.INI. In a default configuration, queued messages use the same directory structure and file format. (Optionally, configuration settings and queues can be stored in a MySQL or MariaDB database. If you want to use a database, the option to enable a database connection is provided after the initial install.)

If you are familiar with operating NowSMS in Windows, you will quickly adapt to NowSMS NextGen in a Linux (or Mac) environment.

For most installations, the process of converting from NowSMS Windows consists of the following steps:

1.) Review the list of "Configuration Issues Requiring Special Attention When Upgrading to NowSMS NextGen". Briefly stated, extra configuration steps will be required for installations using modems (both USB and Android). Additional recommendations are available for operator MMSC environments, and for any custom applications that process NowSMS log files.

2.) Copy the existing NowSMS directory containing configuration settings and data from the Windows server to /var/lib/nowsms on the Linux server.

3.) Install NowSMS NextGen (see "Quick Install" instructions here: https://nowsms.com/techsupport/nextgen-install)

4.) If desired, configure a database connection so that configuration settings and data will be stored on a database server, which will allow multiple NowSMS NextGen servers to operate in a fault tolerant configuration.

More detail regarding these steps is provided below.

Step 1: Configuration Issues Requiring Special Attention When Upgrading to NowSMS NextGen

Configurations Using USB or Serial GSM Modems: In Windows environs, modems are identified by either a COM port number or the name of a Windows modem driver. In Linux environs, the operating assigns a tty device name to each modem. It will be necessary to delete and then manually add any of these modems.

Configurations Using Android Modems #1: NowSMS NextGen does not support the "Local WiFi" connectivity mode, only "Remote Direct" (which is misnamed and should have been called "Direct") or "Remote via Cloud". In the "Remote Direct" mode, the Android app is configured to maintain a persistent connection to the IP address of the NowSMS server, which has proven to be a more reliable method of connectivity.

Configurations Using Android Modems #2: Android app modems will detect if the server is changed, and will refuse to connect, reporting a "security check" error. To avoid this error, and allow the Android app modems to connect to the new server, locate the "installation reference code" shown in NowSMS on the Windows server. On the Linux server, edit SMSGW.INI, and under the [SMSGW] header, add ModemIRC=xxxxxxxx ... where xxxxxxxx is the "installation reference code" from the old server.

Operator MMSC Configurations: To simplify the transition period, we recommend bringing the new server on-line and testing it, then updating DNS for the MMSC Server URL to redirect traffic to the new server.

Custom Applications Accessing NowSMS Log Files: Log file formats have also changed in NowSMS NextGen (to which most of us say good riddance). If you have created any custom applications that read the SMSOUT-yyyymmdd.LOG, SMSIN-yyyymmdd.LOG, SMSWEB-yyyymmdd.LOG or MMSC-yyyymmdd.LOG files, it is possible to continue to use the old NowSMS log file formats by adding UseCSVLogFormat=No under the [SMSGW] header of SMSGW.INI. Note that this will disable some of the cool new functionality in the web interface.

Customized user interface templates: In the Windows version of NowSMS, it is possible to customize the user interface templates of NowSMS by editing the contents of the HTML directory. This is not possible in the same way in the Linux environment, ass the templates are embedded inside the application. Details on how to override the built-in HTML templates is available on request. (Please be patient, as there is much documentation to write.)

Step 2: Copy the existing NowSMS directory containing configuration settings and data from the Windows server to /var/lib/nowsms on the Linux server

a.) On the Windows side, locate the directory that contains SMSGW.INI.

For most installations, this will be the directory in which NowSMS program files are installed in, which defaults to \Program Files (x86)\NowSMS

Some versions of NowSMS defaulted to storing configuration settings in a separate directory: c:\ProgramData\NowSMS (Note that by default, the Windows "ProgramData" directory is a hidden directory.)

b.) On the Linux side, if NowSMS NextGen has yet to be installed, create the directory /var/lib/nowsms

If you are in a desktop environment, or not logged in as root, you may need to use the sudo command (example: sudo mkdir /var/lib/nowsms)

To avoid any confusion, we suggest deleting any Windows executables that are copied as part of this process, which have .exe or .dll extensions.

Note: Most Linux file systems are case sensitive, while Windows is not.

While it is ok to copy the entire directory structure, most prefer to copy over only the most important files/directories, which are listed below:

SMSGW.INI
MMSC.INI
MMSCUsers.DB
SMSUsers.D2A
SMSUsers.D2I


If you have any external MMSC connections (MM1, MM4, MM7, EAIF), also copy VASPIN.D2A, VASPIN.D2I, VASPOUT.D2A, VASPOUT.D2I, and the VASPIN and VASPOUT directories. (NowSMS NextGen will read the configuration data from the VASP.INI files within these directories, and reformat the settings to save them in MMSC.INI.)

If an SSL certificate exists, copy SSL.CA, SSL.CRT and SSL.CSR.

The DLISTS directory contains user-created distribution lists, as well as the system blacklist, and should be copied.

(For DLISTS, note that because Windows is case insensitive, and Linux is usually not, the case of filenames in the DLISTS directory can be significant. Most versions of NowSMS Windows created this directory in a mixed case format of DLists. On start-up, if NextGen cannot find the DLISTS directory, it will look for the DLists directory and if found, rename it to DLISTS. Similarly, BlackList.TXT is automatically renamed to BLACKLIST.TXT and BlackList-Sender.TXT is automatically renamed to BLACKLIST-SENDER.TXT. However, there may be issues if you have custom scripts that submit messages to a named DLIST where the case of the list name in the script is different from the actual filename.)

UID.DAT is a binary file that tracks the last message ID generated by NowSMS, so that message IDs are not reused until the counter exceeds 0xFFFFFFFF, so you may want to copy it. However, note that this file is used only when NowSMS NextGen is not using a database. When NowSMS is connected to a database, it will restart this message id sequence from 00000001.

Other files & directories which may contain relevant data:

*.CTR (statistic counters)

MMS-IN (2-way received MMS queue)
MMSCDATA (MMSC message store for in-transit and recent messages)
MMSCIN (inbound message queue for messages received via MM4, SMTP, and delivery notifications)
MMSCOUT (outbound message queue for SMTP, and some MM4 acknowledgments)
MMSCUSERS (statistics and message counters for local “MMSC Users”)
MMSSMS (message store for MMS messages converted to SMS with web link)
Q (outbound SMS message queue)
SMPPDATA (SMS message ID tracking files)
SMS-IN (2-way received SMS queue)
STATS (statistic counters)
UAPROF (cached User-Agent profiles for MMSC)
USERS (SMS message queues for local user accounts)
VASPQ (message queue for “MMSC Routing” accounts)

Files & Directories which will not be referenced by NowSMS NextGen

*.ERR (error condition tracking files)
*.EXE/*.exe (program files)
*.DLL/*.dll (program files)
*.TMP (temporary files)

BULKQ (obsolete)
AUDIOBIN (obsolete program files)
IMAGEBIN (obsolete program files)
MMSCADMIN (obsolete web interface templates)
MMSINQ (in-process receiving message queue for MMS messages being received via GSM modem)
TEMP (temporary files)

html (Windows version web interface templates)
webadmin (Windows version web interface templates)

Step #3: Install NowSMS NextGen

Continue with https://nowsms.com/techsupport/nextgen-install
marc bazimon
Frequent Contributor
Username: Marc_orange

Post Number: 99
Registered: 01-2007
Posted on Tuesday, August 24, 2021 - 04:16 pm:   

Hi Des,
Nice job ,
i don't know if it is the right place to ask quick questions regarding the swap from windows to linux , tell me if i have to add a new subject by example
- regarding the log , we use grafana/elastiksearch for the statistics , that parse the MMSC.log into graphical stat, if we use the old version of the log , what are we missing as cool functionnality ?^^ is there any documenttation describing the LOG format , the field etc ....
- regarding the DB , what are your recomendation for the DB if we have around 300 ksubscribers?
- for the Operation maintenance , and more specifically for the alarms management , we are using Centreon that pool the MMSC event viewer in order to check if MM4 link are down by example or if the mmsc.exe process are up or down. For the NextGEN version , are the event write into the syslog or any log file? is there an snmp agent that could be implemented ( maybe in a futur version ^^)
- one last for the road , almost each day , we have to delete some subscriber from the mmsc db , for a portability purpose , and avoid a mis routing of mms. on the previous version , a cmd dos executable was using , is there an equivalent script on linux to do it ?

thanks beforehand for your feedback
Br
Marc
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 6308
Registered: 08-2008
Posted on Wednesday, August 25, 2021 - 11:52 pm:   

Hi Marc,

If you use the old log file format, you give up the ability to do some searching and filtering of the logs in the admin interface.

There is no formal documentation for the new logs, but the primary advantage is that they are proper CSV logs. The first record contains the column definitions. The first column is
DateTime, and the second column is LogType ... which is a record type. There you will find SMSOut, SMSIn, SMSSubmit, MMSIn, MMSOut, and a variety of different event types that stat with "Event-". The SMS and MMS types contain the same data as in the Windows version, except all record types are in a single log file named nowsms-YYYYMMDD.csv.

Note that if you use a database for the log, these log files are not created. The database has columns that match the column definitions in the CSV files, and the ability exists to extract from the database into CSV format.

For monitoring, the XML status query is the interface that we recommend. The XML status query interface described at https://nowsms.com/xml-status-query-for-smsc-connection-status-and-statistics

One of the easiest ways to parse the XML data is with PHP, where it is very simple to parse out specific counters of interest. Some examples are provided at https://nowsms.com/nowsms-status-query-with-php

SNMP would be nice, it is just very confusing to us how this status information would be mapped into an SNMP format.

Regarding deleting subscribers from the DB, you're using a routing callback, right? I'd recommend setting ForceRoutingCallback=Yes under the [MMSC] header in MMSC.INI, this way the callback will occur even if the number is in the subscriber database.

Regards,

Des
NowSMS Support
marc bazimon
Frequent Contributor
Username: Marc_orange

Post Number: 100
Registered: 01-2007
Posted on Thursday, August 26, 2021 - 01:53 pm:   

Hi Des ,
thanks for your clarification ,
do you have a prefrence for the DB ( mariadb or mysql ) ?

Heyyy this is my 100th post , it is like a birthday ^^is there any gift for that like a picture of all the nowsms team ?^^

clear enough ,
let's work for the swap now ,
Br
Marc

Add Your Message Here, or click here to start a new topic.
Post:
Bold text Italics Underline Create a hyperlink Insert a clipart image
Options: Automatically activate URLs in message
Action: