SVC Installation

Overall Installation Steps

The high-level steps for installing and configuring N2CUG SVC nodes are:

  1. Determine the server(s) that will supply the SVC logical component, bearing in mind the supported operating systems and minimum server requirements.
  2. Ensure the installation pre-requisites are met.
  3. Install the SVC package.
  4. Perform any required post-installation steps.
  5. Update the SVC configuration as desired.

Installation Pre-requisites

OS-specific Setup

Refer to the specific Red Hat or Debian instructions for any pre-requisites as required.

Lua

Each N2CUG SVC instance requires Lua to be available at version 5.2+. Specifically, both lua and luac must be present in the PATH for all users. Consult your operating system documentation to determine the appropriate package to install.

If your distribution does not support Lua at version 5.2+, N-Squared maintains a pre-packaged, separately-installable version of Lua that meets N2CUG’s requirements. Contact N-Squared Support to discuss access to this if required.

N2SVCD

The N-Squared application framework N2SVCD must be installed. Follow the installation steps for this, noting any prerequisites.

The N2CUG SVC package also expects that the default N2SVCD configuration directory exists:

/etc/n2svcd

Be sure to apply any applicable N2SVCD post-installation steps once installation is complete.

Installation Steps

Follow the appropriate installation steps depending on your installation sources.

From N-Squared Repository

Execute the instructions specific to your operating system:

RHEL 8 Other RPM-based Systems DEB-based Systems
sudo dnf install n2cug-svc sudo yum install n2cug-svc sudo apt-get install n2cug-svc

As Manual Installation

Transfer the provided package file to the target node, then follow the instructions specific to your operating system.

Execute (adjusting as appropriate for package location and version details) the following:

RPM-based Systems DEB-based Systems
sudo rpm -Uvh /path/to/n2cug-svc-M.m.p-b.noarch.rpm sudo dpkg -i /path/to/n2cug-svc_M.m.p-b_all.deb

Post-Installation Steps

N2SVCD and Database Integration

The N2CUG runtime uses the several N2SVCD applications to perform call handling functions. For N2CUG call handling, the N2SVCD configuration must include at least one of the following to receive and process call triggers:

Note that the appropriate CUG protocol handler library

A Database N2SVCD application must also be configured.

At a high level, the required configuration for these applications looks like:

        <application name="SIGTRAN" module="SigtranApp" admin_alloc="1m" user_alloc="128m">
            ...
            <config>
                ...
                <handlers>
                    <handler application="N2CUG-SVC"/>
                </handlers>
            </config>
        </application>

        <application name="N2CUG-SVC" module="LhoScpApp"> <!-- or LhoSipApp --> 
            ...
            <parameters>
                ...
                <parameter name="default_logic_app_name"    value="N2CUG-Logic"/>
            </parameters>
        </application>
        
        <application name="N2CUG-Logic" module="LogicApp">
            ...
            <config>
                ...
                <services>
                    <service module="LhoScpApp::LhoScpLuaService"
                             libs="../../n2scp/apps/lho_scp/lib"
                             script_dir="../../n2cug/lua/svc/common/n2/n2svcd"
                             lua_lib_path="../lua/lib/?.lua;../../n2cug/lua/lib/n2/protocol/scp/?.lua;../../n2cug/lua/lib/?.lua;../../n2scp/lua/lib/?.lua">
                        <triggers>
                            <trigger script_key="cug_svc"/>
                        </triggers>
                        <globals>
                            <!-- Refer to CUG SVC globals documentation -->
                        </globals>
                    </service>
                </services>
            </config>
        </application>

        <application name="DB" module="DBApp">
            ...
            <parameters>
                ...
                <parameter name="connect" value="dbi:Pg:host=hostname;dbname=n2in"/> <!-- Assumes standard DB name used -->
                <parameter name="username" value="n2cug_oper"/> <!-- Assumes standard operator name used -->
                <parameter name="password" value="********"/> <!-- As configured during DB setup -->
            </parameters>
        </application>

Refer to the individual application configuration documentation for full details of the configuration required. The database application should be configured to connect to the appropriate primary or replica DB node that the SVC node will use.

Once N2SVCD is updated, restart the service:

systemctl System V
sudo systemctl restart n2svcd sudo service n2svcd restart

Reporting Integration

Statistics and EDRs may be disabled or sent to a data repository. Note that if EDRs are not disabled or transferred, they may eventually fill the file system.

Firewall

The firewall (if any) on the SVC node must be updated to allow:

If required, the firewall (if any) on the SVC node may also be updated to allow:

If statistics and EDRs are to be retained, the firewall must be updated to allow access for:

The exact commands to do this will depend both on the firewall on your platform and also which port(s) are in use. For example, to allow the default PostgreSQL port when using firewalld, the commands might be:

firewall-cmd --zone=public --add-port=5432/tcp --permanent
service firewalld restart