System Administration Tools

26
CHAPTER 5-67 Cisco SIP Proxy Server Administrator Guide 5 System Administration Tools This chapter provides an overview and operation instructions of the following system administration tools of the Cisco SIP Proxy Server. Administration tool for routing and registry databases Administration tool for MySQL databases The following are covered in this chapter. Tool Menus Tool Activation Tutorial for MySQL subscriber database Tool functionalities and operations Error message format Administration Tool for Routing and Registry Databases This tool allows the user to manipulate data in the routing and registry databases without interrupting the proxy server operation. The current version of this administration tool, sysadmin_csps_regroute, does not prevent an administrator from starting multiple copies of the tool. It is strongly recommended that only one copy of the tool is used to update (add, delete, modify) the databases. For example, if you uses copy A to add a registry contact for a user X, then mistakenly uses copy B to import an old configuration file which has a different contact for the same user, user X will end up with both contacts. Note It is acceptable to use multiple copies of the tool to read. However, since the tool does not enforce a read/write mode, it is recommended to use one copy of the tool.

description

 

Transcript of System Administration Tools

Page 1: System Administration Tools

C H A P T E R

5-67Cisco SIP Proxy Server Administrator Guide

5System Administration Tools

This chapter provides an overview and operation instructions of the following system administration tools of the Cisco SIP Proxy Server.

• Administration tool for routing and registry databases

• Administration tool for MySQL databases

The following are covered in this chapter.

• Tool Menus

• Tool Activation

• Tutorial for MySQL subscriber database

• Tool functionalities and operations

• Error message format

Administration Tool for Routing and Registry DatabasesThis tool allows the user to manipulate data in the routing and registry databases without interrupting the proxy server operation.

The current version of this administration tool, sysadmin_csps_regroute, does not prevent an administrator from starting multiple copies of the tool. It is strongly recommended that only one copy of the tool is used to update (add, delete, modify) the databases.

For example, if you uses copy A to add a registry contact for a user X, then mistakenly uses copy B to import an old configuration file which has a different contact for the same user, user X will end up with both contacts.

Note It is acceptable to use multiple copies of the tool to read. However, since the tool does not enforce a read/write mode, it is recommended to use one copy of the tool.

Page 2: System Administration Tools

5-68Cisco SIP Proxy Server Administrator Guide

Chapter 5 System Administration ToolsAdministration Tool for Routing and Registry Databases

Tool Activation

Note Before tool activation, set the environment variable LD_LIBRARY_PATH to include libexec directory in the proxy server package. Example: “setenv LD_LIBRARY_PATH${LD_LIBRARY_PATH}:/opt/sip/libexec”, where libexec directory is opt/sip/libexec and csh is the environment.

At the system prompt, type sysadmin_csps_regroute, press Enter.

The following options are available for this command.

• [-i configuration file name]—Imports a configuration file into the database.

• [-p absolute path and config file name]—Allows a user to specify an absolute path and a file name for a sipd configuration file. If this is not specified, the libexec path in the environment variable, LD_LIBRARY_PATH, is searched. If this is found, we remove "libexec" and append "conf/" and a default file name "sipd.conf" to this path name.

• [-x configuration file name]—Allows a user to specify a file name. The regroute tool opens this file for appending and exporting the entries from the database(s) specified by the -m option (see below). The file format is the standard stanza format of a sipd configuration file for static route and registry entries.

• [-m database mode for export/list all 1, 2, 3]—Specify which database to use. It must be used in conjunction with -x and/or -l options. A value of 1 specifies route database; 2 specifies registry database; 3 specifies both databases. If -m is omitted, both databases will be used.

• [-l]—list all entries in the database(s) specified by the -m option.

Note This tool ends after -i, -x, or -l options is used. Option -m only works with options -x or -l, and it has no effect on other options.

Examples

Example 1sysadmin_csps_regroute -i xyz.conf

Example 2sysadmin_csps_regroute -x xyz.conf -l

Example 3sysadmin_csps_regroute -i abc.conf -x xyz.conf -m 2

Example 4sysadmin_csps_regroute -p /opt/sip/xyz.conf

Tool MenusThis administration tool contains multi-level menus as follows.

• Main Menu—This appears when the tool is activated.

Page 3: System Administration Tools

5-69Cisco SIP Proxy Server Administrator Guide

Chapter 5 System Administration ToolsAdministration Tool for Routing and Registry Databases

Figure 5-1 Main Menu for Routing and Registry Databases

• Database Interface Menu—This appears when the user selects option “D” from the Main menu. In this menu, a user can select to add and delete data in a database, or query the database.

Figure 5-2 Database Interface Menu for Routing and Registry Databases

Note For options in this menu, a wildcard character “*” can be used in place of the default selections when applicable. For example, when you select to add data to the registry database, you are prompted to enter a value for User Type. The default value is “Phone”. Instead of entering “Phone”, you can type *.

• Configuration Menu—This menu appears when the user selects option “S” in the Main menu. In this menu, the user can select to access either the routing database or the registry database.

Figure 5-3 Configuration Menu for Routing and Registry Databases

Page 4: System Administration Tools

5-70Cisco SIP Proxy Server Administrator Guide

Chapter 5 System Administration ToolsAdministration Tool for Routing and Registry Databases

Menu Operation

To select an option from a menu, type the character that precedes the option, then press the Enter key. You can use upper or lower case. For example, type Z and press the Enter key to select the routing database in the Configuration menu.

Some options require specific type of entries. The type of required entries are specified in a pair of <> bracket that are shown with the options on the screen. For example, in the following screen, option E requires a registry user ID entry.

Figure 5-4 Option Menu

Tool Functionalities and OperationsThis section describes operations of the following functionalities.

• Select a routing or registry database

• Add data to the database

• Delete data in the database

• Search for data in the database

• Display data of the database

• Import configuration file to the database

• Export database entries from a configuration file

• Display memory information

• Exit from the administration tool

Select a database

This functionality allows you to select between a routing and registry database.

Step 1 In the main menu, select option S by typing S and press Enter.

The following screen appears.

Page 5: System Administration Tools

5-71Cisco SIP Proxy Server Administrator Guide

Chapter 5 System Administration ToolsAdministration Tool for Routing and Registry Databases

Step 2 Select option Z to use the routing database, or select option Y to use the registry database.

The text line under the Configuration menu title on the screen indicates which database is selected.

Step 3 Select option M to return to the Main menu or option Q to exit from the tool.

Add or Delete Data

This functionality allows you to add or delete data from the database.

Add Data

Step 1 In the Main menu, select option D.

The following screen appears.

Step 2 Select option A to add an entry.

The following screen appears.

Page 6: System Administration Tools

5-72Cisco SIP Proxy Server Administrator Guide

Chapter 5 System Administration ToolsAdministration Tool for Routing and Registry Databases

Step 3 Select option E and enter the required data as prompted. Press Enter key.

Added data appears above option E on screen.

Step 4 Select option P to return to previous menu, option M to return to Main menu, Q or Crtl C to exit from the tool.

Delete Data

This functionality allows you to delete data from the database.

Step 1 In the Main menu, select option D.

The following screen appears.

Step 2 Select option D to delete an entry.

The following screen appears.

Page 7: System Administration Tools

5-73Cisco SIP Proxy Server Administrator Guide

Chapter 5 System Administration ToolsAdministration Tool for Routing and Registry Databases

Step 3 Select option E and enter the required data as prompted. Press Enter key.

Step 4 Select option P to return to previous menu, option M to return to Main menu, Q or Crtl C to exit from the tool.

Search Database

This functionality allows you to query the database.

Step 1 In the Main menu, select option D.

The following screen appears.

Step 2 Select option S to search the database.

The following screen appears.

Page 8: System Administration Tools

5-74Cisco SIP Proxy Server Administrator Guide

Chapter 5 System Administration ToolsAdministration Tool for Routing and Registry Databases

Step 3 Select option E and enter the required data as prompted. Press Enter key.

Step 4 Select option P to return to previous menu, option M to return to Main menu, Q or Crtl C to exit from the tool.

Display Data in Database

This functionality allows you to list all data in the database.

Step 1 In the Main menu, select option D.

The following screen appears.

Step 2 Select option L.

Data display similar to the following screen appears.

Page 9: System Administration Tools

5-75Cisco SIP Proxy Server Administrator Guide

Chapter 5 System Administration ToolsAdministration Tool for Routing and Registry Databases

Import Configuration File to a Database

This functionality allows you to import content of a configuration file into a database. This updates both the routing and registry databases with the configuration file content as long as matching entries are found.

Step 1 In the Main menu, select option I by typing i and the configuration file name as shown in the following example.

i t1k

When the import is done, the following message appears.

Export Database Entries to a Configuration File

This functionality allows you to export content of a database to a configuration file. This only exports the content of the selected database (routing or registry).

Step 1 In the Main menu, select option X by typing x and the configuration file name as shown in the following example.

x tlk

When the export is done, the following message appears.

Page 10: System Administration Tools

5-76Cisco SIP Proxy Server Administrator Guide

Chapter 5 System Administration ToolsAdministration Tool for MySQL Subscriber Database

Display Memory Information

Step 1 In the Main menu, Select option S.

The following screen appears.

Step 2 Select option D.

“Using Shared Memory” message appears.

Exit from the Tool

In the Main menu, Select option Q or press Crtl+C.

Error MessagesAn error message is enclosed between two lines of asterisks. See sample error message as follows.

Administration Tool for MySQL Subscriber DatabaseThis section describes the MySQL Subscriber Database Administration tool, sysadmin_mysql_user. This Administration tool runs on Linux and has been successfully tested on Redhat 6.2 and Redhat 7.0 platforms. It can be used to modify a MySQL server on a local Linux system or on a remote system.

Note If this Administration tool is running remotely, the remote MySQL server does not necessarily have to be a Linux machine.

This tool can be used to do the following:

• Add and remove subscriber records to and from the database.

Page 11: System Administration Tools

5-77Cisco SIP Proxy Server Administrator Guide

Chapter 5 System Administration ToolsAdministration Tool for MySQL Subscriber Database

• Modify the following:

– A subscriber’s password

– Call Forwarding on No Answer destination URL

– Call Forwarding on Busy destination URL

– Call Forwarding on Unavailable destination URL

– Call Forwarding Unconditional destination URL

MySQL Subscriber Database

Usage of the MySQL subscriber database with the Cisco SIP Proxy Server is optional. This database is needed when the Cisco SIP Proxy Server performs the following:

• Authorization (using HTTP-Digest), or

• Call Forwarding features

Note The MySQL subscriber database must be installed by using the install script “install_mysql_db” before the subscriber database can be used with this tool. See Chapter 2, “Installing MySQL Subscriber Database.”

Tool Activation

Step 1 At the system prompt, activate this tool from the bin directory of the Cisco SIP Proxy Server.

% /usr/local/sip/bin/sysadmin_mysql_user

The following screen appears.

Step 2 Enter hostname, user name and password accordingly. The following screen appears.

Page 12: System Administration Tools

5-78Cisco SIP Proxy Server Administrator Guide

Chapter 5 System Administration ToolsAdministration Tool for MySQL Subscriber Database

Step 3 Enter database name and table name accordingly. The Main menu appears (See Tool Menus section).

Tool MenusThis tool contains the following menus.

• Main menu—This appears when the tool is activated.

Figure 5-5 Main Menu for MySQL Databases

• Subscribers attributes submenu—This appears when you choose to add a subscriber.

Figure 5-6 Subscribers attributes submenu

Menu Operation

To select an option from a menu, type the character that precedes the option, then press the Enter key. You can use upper or lower case. For example, type A and press the Enter key to add a subscriber to the MySQL databases.

Note When you enter data into a subscriber record by using the Subscribers attributes submenu, you can clear a field in a subscriber record by pressing the Enter key.

TutorialThe following are demonstrated in this section.

• Add a subscriber with a password

Page 13: System Administration Tools

5-79Cisco SIP Proxy Server Administrator Guide

Chapter 5 System Administration ToolsAdministration Tool for MySQL Subscriber Database

• Add a subscriber with call forwarding features

• List Subscribers

• Rename a Subscriber record

• Remove a Subscriber from a MySQL database

Add a subscriber with a password

The following steps show you how to add a subscriber record for subscriber Alice.

Step 1 In the Main menu, select A.

Step 2 Enter the subscriber’s username as prompted.

See following screen for these steps.

Step 3 In the Subscriber attribute submenu, select P.

Step 4 Enter a password for Alice.

See following screen for these steps.

Step 5 To exit from the menu, select X.

Page 14: System Administration Tools

5-80Cisco SIP Proxy Server Administrator Guide

Chapter 5 System Administration ToolsAdministration Tool for MySQL Subscriber Database

List subscriber information

The following steps show you how to display subscriber information of subscriber Alice that you have entered.

Step 1 In the Main menu, select option L.

Step 2 Enter Y to show details for each subscriber record to be displayed, or Enter N to see a summary listing of the subscriber names.

The following screens show the actions and results of these steps.

The following screen shows detail information on subscriber Alice.

The following screen shows summary information on subscriber Alice.

Page 15: System Administration Tools

5-81Cisco SIP Proxy Server Administrator Guide

Chapter 5 System Administration ToolsAdministration Tool for MySQL Subscriber Database

Add a subscriber with call forwarding features

The following steps show you how to add subscriber information to a subscriber named Bob. We will add call forwarding features (No Answer, Busy and Unavailable).

Step 1 In the Main menu, select option A.

Step 2 Enter subscriber ID of Bob as prompted.

The following screens show the actions and result of these steps.

In the following sections, you will set options call forward on (user) no answer, call forward on busy, and call forward on (device) unavailable to Bob’s voicemail server.

Page 16: System Administration Tools

5-82Cisco SIP Proxy Server Administrator Guide

Chapter 5 System Administration ToolsAdministration Tool for MySQL Subscriber Database

Add Call Forward on No Answer URL

Step 1 In the Subscriber attribute submenu, select option N for Call Forward on (N)o Answer for user.

Step 2 Enter Call Forward on No Answer URL as prompted.

The following screen shows these steps.

Add Call Forward on Busy URL

Step 1 In the Subscriber attribute submenu, select option B for Call Forward on (B)usy.

Step 2 Enter Call Forward on Busy URL as prompted.

The following screen shows these steps.

Add Call Forward on Unavailable URL

Step 1 In the Subscriber attribute submenu, select option V for Call Forward Una(V)ailable.

Step 2 Enter Call Forward on Unavailable URL as prompted.

The following screen shows the actions and result of these steps.

Subscriber Bob’s record is displayed as follows.

Page 17: System Administration Tools

5-83Cisco SIP Proxy Server Administrator Guide

Chapter 5 System Administration ToolsAdministration Tool for MySQL Subscriber Database

Add a new subscriber with Call Forwarding (Unconditional)

In this section, we will add a new subscriber, Carol, who wants to forward all calls from her old phone number to her new SIP user agent. Her subscriber ID is 5551234. We can configure this by setting the Call Forward Unconditional field of Carol’s 5551234 subscriber record to the URL of her SIP user agent.

Step 1 In the Subscriber attributes menu, select option C for Create/change to a different subscriber.

Step 2 Enter subscriber ID of Carol (5551234) as prompted.

Step 3 Enter Y to the prompt “Add this user_id?” (y/n)

The following screen shows the actions and result of these steps.

Step 4 Select option U for Call Forward (U)nconditional.

Step 5 Enter Call Forward Unconditional URL as prompted.

The following screens show the actions and result of these steps. Also, a syntax error detection causes a prompt for the user to enter the destination URL again.

Page 18: System Administration Tools

5-84Cisco SIP Proxy Server Administrator Guide

Chapter 5 System Administration ToolsAdministration Tool for MySQL Subscriber Database

The following screen shows the result of re-entry of the URL.

Step 6 Select X to return to the Main menu.

List Subscribers

This section describes how to list subscribers in summary and detail formats.

Step 1 In the Main menu, select option L.

Step 2 Enter Y for the prompt “Show details? [n]”. Default is N for no detail.

The following screen shows the action and result of these steps. A detail listings of all subscribers appears.

Page 19: System Administration Tools

5-85Cisco SIP Proxy Server Administrator Guide

Chapter 5 System Administration ToolsAdministration Tool for MySQL Subscriber Database

If you enter N to the prompt “Show details? [n]”, only user IDs of all the subscribers appears as follows.

Rename an existing Subscriber Record

In this section, we will rename subscriber record of Alice to Ali by changing the subscriber ID.

Step 1 In the Main menu, select option M.

Step 2 Enter subscriber ID of Alice (alice) as prompted.

The following screen shows these steps and result.

Page 20: System Administration Tools

5-86Cisco SIP Proxy Server Administrator Guide

Chapter 5 System Administration ToolsAdministration Tool for MySQL Subscriber Database

Step 3 In the Subscriber attribute submenu, select option I.

Step 4 Enter new subscriber ID for this record (ali) as prompted.

The following screens show these steps and result.

Remove a Subscriber from a MySQL database

In this section, we will remove subscriber Bob from the subscriber database.

Step 1 In the Main menu, select option R.

Page 21: System Administration Tools

5-87Cisco SIP Proxy Server Administrator Guide

Chapter 5 System Administration ToolsAdministration Tool for MySQL Subscriber Database

Step 2 Enter subscriber ID of Bob as prompted.

The following screen shows these steps.

If you select to list all subscriber in detail format, the following screen appears without the subscriber record of Bob.

Tool Functionalities and OperationsThis section describes operations of the following functionalities.

• Add subscribers to the databases

• Remove subscribers from the databases

• Modify subscribers in the databases

• Rename an existing subscriber record

• Display a subscriber in the databases

• List all subscribers in the databases

Add Subscribers

This functionality allows you to add subscribers to the databases.

Note When you enter data into a subscriber record by using the Subscriber attributes submenu, you can clear a field in a subscriber record by pressing the Enter key.

Page 22: System Administration Tools

5-88Cisco SIP Proxy Server Administrator Guide

Chapter 5 System Administration ToolsAdministration Tool for MySQL Subscriber Database

Step 1 In the Main menu, select option A.

Step 2 Enter subscriber ID at the next prompt and press Enter key. The following screen appears.

Figure 5-7 Subscriber attribute submenu

Step 3 From the Subscriber attribute submenu, select option P to enter a password.

The entered password appears next to the password option in the menu on the screen.

Step 4 Select option N, B, V, U to enable the appropriate call forwarding options.

Step 5 Enter URL for the selected call forwarding option as prompted, and press Enter key.

The entered URL for each selected option appears next to the option in the menu.

Step 6 To leave the menu, select option X.

Remove Subscribers

This functionality allows you to remove subscribers from the databases.

Step 1 In the Main menu, select option R.

Step 2 Enter subscriber ID at the next prompt and press Enter key.

Message on operation completion appears.

Modify Subscribers

This functionality allows you to change subscriber information.

Step 1 In the Main menu, select option M.

Step 2 Enter subscriber ID at the next prompt and press Enter key. Subscriber attribute submenu with attributes of the selected subscriber appears.

Step 3 Modify the attributes by selecting the appropriate options in the menu accordingly.

Refer to Add Subscribers section for operations in the Subscriber attribute submenu.

Page 23: System Administration Tools

5-89Cisco SIP Proxy Server Administrator Guide

Chapter 5 System Administration ToolsAdministration Tool for MySQL Subscriber Database

Step 4 To leave the menu, select option X.

Rename an existing Subscriber Record

This functionality allows you to rename an existing subscriber record with a new subscriber ID.

Step 1 In the Main menu, select option A.

Step 2 Enter an existing subscriber ID as prompted.

Step 3 In the Subscriber attribute submenu, select option I.

Step 4 Enter new subscriber ID for this record as prompted.

Display Subscribers

This functionality allows you to display information on one or all subscribers.

Display a subscriber

Step 1 In the Main menu, select option S.

Step 2 Enter subscriber ID at the next prompt and press Enter key.

Step 3 Subscriber attribute submenu with attributes of the selected subscriber appears.

Step 4 To leave the menu, select option X.

Display all subscribers

Step 1 In the Main menu, select option L.

Step 2 Enter Y or N to the question “Show detail? [n]”

If you enter Y, all information, including attributes, related to the subscriber appears as follows.

Page 24: System Administration Tools

5-90Cisco SIP Proxy Server Administrator Guide

Chapter 5 System Administration ToolsAdministration Tool for MySQL Subscriber Database

If you enter N, only the subscriber IDs appears.

Exit from the Tool

In the Main menu, Select option X.

Error MessagesA sample of error messages are shown as follows.

Error Message 1

Reason

The MySQL database is not installed.

Remedy

Install the database before running the tool.

Page 25: System Administration Tools

5-91Cisco SIP Proxy Server Administrator Guide

Chapter 5 System Administration ToolsAdministration Tool for MySQL Subscriber Database

Error Message 2

Reason

• You have entered an invalid MySQL username and MySQL password, or

• The username and password you have specified have insufficient permission to access the specified MySQL server database.

Remedy

Enter correct username and password.

Error Message 3

Reason

The table name you have entered for specified database does not exist.

Remedy

Enter a valid table name or re-install the database.

Error Message 4

Reason

Invalid syntax specified for the subscriber id.

Remedy

Enter a valid subscriber id.

Page 26: System Administration Tools

5-92Cisco SIP Proxy Server Administrator Guide

Chapter 5 System Administration ToolsAdministration Tool for MySQL Subscriber Database

Error Message 5

Reason

Invalid syntax specified for a Call Forwarding destination URL.

Remedy

Enter a valid sip URL.