Import and Export the E-SBC Configuration

You can import and export the Oracle® Enterprise Session Border Controller (E-SBC) configuration to and from a Comma Separated Value (CSV) file with the Import Export SPL plug-in. The Import Export SPL plug-in is enabled by default. No configuration is required.

Import and Export Restrictions

The list describes the restrictions that the system enforces when importing and exporting the Oracle® Enterprise Session Border Controller (E-SBC) configuration.
  • Files are read/written to the volatile directory of the file system on the E-SBC.
  • Import and export occurs to and from the editing configuration.
  • The system displays all error messages on the screen where the command was issued and provides line numbers with the error, when possible.
  • The system does not allow you to set objects and attributes to inappropriate values. For example, you cannot set an IP address to "enabled". Parsing continues as normal after this error.
  • If the system cannot write an object, for example, when the key field is missing, the system discards the object and parsing continues as normal.
  • The import is additive. Each object that is imported is expected to be new to the configuration. If there is already an object with the same key present, the system generates the 409 error and discards the object. Parsing continues as normal after the error.

Configuration CSV Files

The Oracle® Enterprise Session Border Controller (E-SBC) import feature uses the import and export SPL plug-in. You must use a spreadsheet application, such as MS-Excel, that supports .csv files.

The following rules apply when entering configuration data into the .csv file.
  • Empty lines are ignored
  • The first non-empty line must be the keyword “object:”, followed by the configuration object name that is being configured (shown below as sip-interface).
    Example: object:sip-interface
  • The second non-empty line must be the parameter names of the objects to be configured, each parameter name in its own column. This row defines the labels for each column for the subsequent rows. Only the attributes that you want defined need to be present. You can specify the parameter names in any order, but the data in subsequent rows must be consistent with the labels that you define in this row.
    Example: state,realm-id,description
  • The third non-empty rows define values for the configuration object, each instance in its own column. In the following example, the third line defines a new sip-interface with state “enabled”, realm-id “public”, and description “public SIP interface”. These values are based on the labels defined in the second row.
    Example: enabled,public,public SIP interface

    Note:

    The Description field displays all text as one continuous line, unless you insert line breaks. When you want to insert line breaks in the Description field, for example between sentences that you want displayed on separate lines, do the following:
    • From the GUI, in the Description field of a Configuration object, add Line1 to the end of the line where you want the first break to occur. Add Line2 to the end of the next line where you want a break to occur, and so on.
    • In a .csv configuration file, add \010 to the end of the line where you want the first break to occur. Add \010 to the end of the next line where you want a break to occur.
  • On all subsequent rows, you can define any number of instances.
  • The next row with an “object” keyword selects a new configuration object that is based on the previous object. You continue to input the data for this object according to the rules stated above. The following example shows a “sip-port” object added that is related to the sip-interface object.
    Example: object:sip-port
             address,port,transport-protocol 
             192.168.1.1,5060,UDP 
             192.168.1.1,5061,TCP 
    In this example, “sip-port” is a sub-object of “sip-interface” and would create new sip-ports off of the last sip-interface instance (of realm-id public).

Create a CSV File

To create a Oracle® Enterprise Session Border Controller (E-SBC) configuration using a CSV file:

  1. Open an application that supports a CSV file, for example, MS-Excel.
  2. In the first row, first column, enter object: followed by a configuration object that you want to import.
    object:sip-interface
  3. In the second row, and each in its own column, enter the parameter names of the objects to configure.
    state,realm-id,description
  4. In the third row, and each in its own column, enter the values for the configuration objects.
    enabled,public,public SIP interface
  5. In subsequent rows, define additional values, if any.
  6. In the next empty row, first column, enter another object if required, related to the first object (sip-interface).
    object:sip-port
  7. Repeat steps 3 through 5 for this object. The following is an example of a CSV file containing the “sip-interface” and sip-port objects.
    This image shows an example of a CSV file containing the sip-interface and sip-port objects.
  8. Save the file as a comma-separated value file (.csv). For example,
    nnesd_config.csv
  9. Close the file.

Enter Configuration Data Using a Text File

You can create a configuration by entering the required data into a text file and then use an application, such as Excel, to open and save the file as a CSV file. You must enter the information in the text file in the exact format as shown in the following example so that the labels to go to the correct columns in the Excel application.

This image shows an example CSV file with the labels go to the correct columns in the Excel application.
Procedure
  1. Enter the required configuration data in a text file according to the format in the previous illustration.
  2. Save and close the file.
  3. Open an application that supports a CSV file, for example, MS-Excel.
  4. Browse for the SPL text file and open it. The configuration data opens in the correct columns within the application.
    This screenshot shows an example SPL text file.
  5. Save the file as a comma-separated value file (.csv). For example,
    nnesd_config.csv
  6. Close the file.

Import a CSV Configuration File

After you create a CSV file that contains the Oracle® Enterprise Session Border Controller (E-SBC) configuration, you can import the file into the E-SBC using the spl load acli config-csv command.

The spl load acli config-csv command loads the CSV file from the volatile file system (/var), into the editing configuration of the E-SBC.
spl load acli config-csv <filename>
  1. Access the E-SBC locally through the console connection or remotely through an SSH connection.
  2. Transfer the CSV file to the volatile file system (/var) on the E-SBC.
  3. At the prompt, type the password for entering the ACLI, and press Enter.
  4. Enter enable to access the Superuser mode, followed by the password, and press Enter.
  5. At the prompt, type delete-config cached to clear the current editing configuration on the E-SBC to prevent conflicts.

    Oracle# delete-config cached

  6. Type spl load acli config-csv <filename>, and press Enter. For example:

    Oracle# spl load acli config-csv esd-config.csv

    The E-SBC imports the CSV file containing the configuration you specified into the editing configuration.

  7. Type save, and press Enter.
  8. Typeactivate, and press Enter. The imported configuration data becomes part of the editing configuration on the E-SBC.

    The following code block shows an example of the imported configuration.

    sip-interface
    	state enabled
    	realm-id public
    	description public SIP interface
    	sip-port
    		address 192.168.1.1
    		port 5060
    		transport-protocol UDP
    	sip-port
    		address 192.168.1.1
    		port 5061
    		transport-protocol TCP

    Note:

    If you need to undo the import, run the restore-backup-config running command to restore the editing configuration that existed before you performed the import.

Export an E-SBC Configuration to a CSV File

You can export an existing configuration from the Oracle® Enterprise Session Border Controller (E-SBC ) to a CSV file that you name, using the following command:

spl save acli config-csv <filename>

The E-SBC saves the configuration in the /var directory.