3 SMS Import Export

Overview

Introduction

This chapter explains the SMS import and export utility.

SMS Import Export Utility

Introduction

The SMS Import Export utility provides a replacement for the SMSMO Time of Day tariffing option.

It lets you perform the following actions:

  • Export the SMCB rating types and rules to a readable text file
  • Import a set of previously saved SMCB rating types and rules
  • Verify a set of previously exported SMCB rating types and rules. For example, use this option if you want to verify the validity of any manual changes you make to the file contents prior to importing the file into the database

All previous rating types and rules are replaced by the imported rules.

When the data has been imported into the database, the new data becomes available to the SMCB feature node once it has been replicated to the SLC. The text file takes a standard ‘config’ file format.

An additional utility is provided to swap the data using a single command. The smcbSwapData utility backs up the current data to an export file and imports data previously exported into the running database, replacing the current rules with the imported rules. This script can be run as a cron job to allow overnight rule and type changes with no user intervention.

Import Export Utility

Parameters

The SMCB Import Export utility is run using the smcbImportExport command which is installed into /IN/service_packages/SMCB/bin.

This command takes the following arguments:

Argument Default Explanation
import n/a Run in import, export or verify mode, can only be one
export n/a of ‘import’, ‘export’ or ‘verify’ (mandatory)
verify n/a  
-u / database user to connect to Oracle as (optional)
-f /IN/service_packages/SMCB/etc/ smcbDumpFile.cfg filename for import/export data (optional)

Procedure

Follow these steps to run the Import Export Utility on the SMS.

Step Action
1 Log in as ccs_oper.
2

Change to the SMCB directory, by typing:

cd /IN/service_packages/SMCB

3

Type:

bin/smcbImportExport export

Result: This invokes the utility to export the SMCB rating types and rules. If you specify the -f option, then the data is exported to the specified file, otherwise the data is exported to a file called smcbDumpFile.cfg located in /IN/service_packages/SMCB/etc.

4

Type:

bin/smcbImportExport verify

Result: This invokes the utility to verify the SMCB rating types and rules. If you specify the -f option, then the data from the specified file is verified, otherwise the data from a file called smcbDumpFile.cfg, located in /IN/service_packages/SMCB/etc, is verified. This is only required if changes were made to the exported data.

5

Type:

bin/smcbImportExport import

Result: This invokes the utility to import the SMCB rating types and rules. If you specify the -f option, then the data is imported from the specified file, otherwise the data is imported from a file called smcbDumpFile.cfg located in /IN/service_packages/SMCB/etc .

Enabling Debug

You can enable debug by setting the smcbImportExport debug section.

Example

DEBUG=smcbImportExport ; export DEBUG

Note: This only takes effect on the next run of smcbImportExport or smcbSwapData.sh.

This table describes any potential problems.

Problem Solution
Export mode failed because the file exists. Remove or rename the existing file.
Import/verify mode failed because the file does not exist or is unreadable. Make sure the file exists and is readable.
Import/verify mode failed because the import file is not well formed. Make sure import file has correct format.
Import/verify mode failed because the rating type does not exist. Make sure the rating type specified is in the import file.
Import mode failed because the named event does not exist. Make sure the named event specified has been created in the CCS tariff screens.
Import/export mode failed because the database login is incorrect. Make sure that the provided username and password are correct for your database instance and that the database is running.

Swap Data Utility

Parameters

The SMCB Swap Data utility is run using the smcbSwapData.sh command which is installed into /IN/service_packages/SMCB/bin.

This command takes the following arguments:

Argument Description
export-file Specifies the export file, this file cannot exist.
import-file Specifies the import file, this file must exist.
-u user/pass Specifies the oracle usename and password (optional).

Procedure

Follow these steps to run the Swap Data Utility on the SMS.

Step Action
1 Log in as ccs_oper.
2

Change to the SMCB directory, type:

cd /IN/service_packages/SMCB

3

Type either of the following:

  • bin/smcbSwapData.sh export-file import-file
  • bin/smcbSwapData.sh export-file
                              import-file
    -u user/pass

Result: This invokes the utility to swap the SMCB rating types and rules.

The live feature node data will be replaced when feature node refreshes its cache.

Potential problems

This table describes the potential problems and their resolution.

Problem Solution
Swap data utility failed with invalid arguments.

Specify one of the following:

  • 2 arguments: $1 = export file, $2 = import file
  • 4 arguments: $3 & $4 = -u user/pass.
Swap data utility failed because the export file exists. Remove or rename the existing export file.
Swap data utility failed because the import file does not exist or is unreadable. Make sure the import file exists and is readable.

Import-Export File Format

File format

The export/import files used by the SMCB Import Export utility have the format shown below.

Note: This file follows the standard eserv.config file formatting rules. Comments begin with a hash (#) symbol.

smcb = {ratingTypes = [{name =
“

string” # max 20 charsrtype = ‘

 char 

’ # values: ‘T’, ‘N’ or ‘F’acsCustId =

number

# the id of the ACS CustomercallingNumberPrefix = “

 string 

” # max 10 chars (optional)eventClass = “

string

" # NE class as string (optional)# (Note: required when type = ‘N’)eventName = “

string

” # NE name as string (optional)# (Note: required when type = ‘N’}{...}]ratingRules = [{name = “

string 

” # max 20 charspriority =

 number 

# values between 0 … 99999acsCustId =

 number 

# the id of the ACS CustomersourceRegEx = “

string

” # regex, max 64 charsdestRegEx = “

 string 

” # regex, max 64 charstextRegEx = “

 string 

” # max 200 charsratingType = “

 string 

” # name of rating typecomment = “

 string 

” # max 100 chars (optional)noFundsReply = “

 string 

” # max 160 chars (optional)ignoreTextCase =

true

|

false

# ignore or match text case}{...}]}