H3C XE 200/2000 IP, XE 2000 IP, XE 200 IP Operation Manual

H3C XE 200/2000 IP PBX
Operation Manual
Hangzhou H3C Technologies Co., Ltd. http://www.h3c.com
Manual Version: T2-08162N-20070520-C-3.01
Copyright © 2006-2007, Hangzhou H3C Techn ologies Co ., Ltd.
All Rights Reserved
No part of this manual may be reproduced or transmitted in any form or by any means without prior written consent of Hangzhou H3C Technologies Co., Ltd.
Trademarks
H3C, , Aolynk, , H3Care,
, TOP G, , IRF, NetPilot, Neocean, NeoVTL, SecPro, SecPoint, SecEngine, SecPath, Comware, Secware, Storware, NQA, VVG, V
2
G, VnG, PSPT, XGbus, N-Bus, TiGem, InnoVision and
HUASAN are trademarks of Hangzhou H3C Technologies Co., Ltd. All other trademarks that may be mentioned in this manual are the property of their
respective owners.
Notice
The information in this document is subject to change without notice. Every effort has been made in the preparation of this document to ensure accuracy of the content s, but all statements, information, and recommendations in this document do not constitute the warranty of any kind, express or implied.
To obtain the latest information, please access: http://www. h3c.com
Technical Support
customer_service@h3c.com http://www. h3c.com
About This Manual
Related Documentation
In addition to this manual, each H3C XE 200/2000 IP PBX documentation set includes the following:
Manual Description
H3C XE 200/2000 IP PBX Installation Manual
It provides information for the hardware features, installation, configuration, maintenance and troubleshooting involved in the XE series.
H3C XE 200/2000 IP PBX Command Manual
It provides information for the hardware features, installation, configuration, maintenance and troubleshooting involved in the XE 200/2000.
H3C XE 200/2000 IP PBX G-Remote User Manual
It introduces the graphic user interface and the operation through the XE 200/2000.
Organization
H3C XE 200/2000 IP PBX Operation Manual is organized as follows:
Chapter Contents
1 Basic Configuration
Profiles the system characteristics and major functions. It also describes command line interfaces (CLIs), required configuration environments, Comware CLI attributes and basic Comware configuration. The interface configuration covers the configuration on Ethernet interfaces and VLANs. The routing configuration involves the configuration on IP unicast static routes.
2 Process Server Configuration
Focuses on the functions and configuration procedure of the H.323 GateKeeper and SIP Server.
3 Location Server Configuration
Elaborates on the functions and configuration procedure of the Location Server.
Chapter Contents
4 Feature
Describes the unique functions and features that the IP PBX provides including number translation, overload protection and backup and load balancing.
5 System Management
Introduces Comware logging and debugging center, file system and file operation, user interface, user management system and NTP configuration. SNMP configuration involves the settings required when the IP PBX serves as NMS Agent. Terminal service presents allowable console terminal types and required settings. System management covers hierarchical command configuration, RADIUS-based AAA security.
6 IP Performance and Application
Includes the fundamentals and configuration of the IP address, IP applications, IP performance, as well as the configuration necessary when the IP PBX serves as HDCP Server.
7 Media Server
Introduces the functions of the media server, and describes the configuration steps of the media server in details.
8 Call Services
Introduces the various voice services provided with the XE voice servers, including Subscriber Management Service, Emergency Call Service, Inter-Group Call Restriction Service, Outgoing Call Authority Control Service, Abbreviated Dialing Service, Do-Not-Disturb Service, Calling Line Identification Services, Password Call Service, Call Forwarding Services , Third Party Call Termination Service, ONLY Service, Time Limit Call Service, Third Party Call Control Service, Callback-On-Busy Service, Call Pickup Service, Call Intervention Service, Dialing Test Service, Time Announcement Service, MyRing Service, CPCP Service, Automatic Operator Service, Group Notification Service, Call Transfer Service, Number Query Service and Alarm Clock Service.
9 Appendix A
Introduces usage of the license of the XE 200/2000 IP PBX.
10 Appendix B Lists the acronyms used in the manual.
Conventions
The manual uses the following conventions:
I. Command conventions
Convention Description
Boldface
The keywords of a command line are in Boldface.
italic
Command arguments are in italic.
[ ]
Items (keywords or arguments) in square brackets [ ] are optional.
{ x | y | ... }
Alternative items are grouped in braces and separated by vertical bars. One is selected.
[ x | y | ... ]
Optional alternative items are grouped in square brackets and separated by vertical bars. One or none is selected.
{ x | y | ... } *
Alternative items are grouped in braces and separated by vertical bars. A minimum of one or a maximum of all can be selected.
[ x | y | ... ] *
Optional alternative items are grouped in square brackets and separated by vertical bars. Many or none can be selected.
&<1-n>
The argument(s) before the ampersand (&) sign can be entered 1 to n times.
# A line starting with the # sign is comments.
II. GUI conventions
Convention Description
< >
Button names are inside angle brackets. For example, click <OK>.
[ ]
Window names, menu items, data table and field names are inside square brackets. For example, pop up the [New User] window.
/
Multi-level menus are separated by forward slashes. For example, [File/Create/Folder].
III. Symbols
Convention Description
Warning
Means reader be extremely careful. Improper operation may cause bodily injury.
Caution
Means reader be careful. Improper operation may cause data loss or damage to equipment.
Note Means a complementary description.
Basic Configuration
Operation Manual – Basic Configuration H3C XE 200/2000 IP PBX Table of Contents
i
Table of Contents
Chapter 1 H3C XE 200/2000 IP PBX Overview............................................................................1-1
1.1 Introduction........................................................................................................................1-1
1.2 Feature List........................................................................................................................ 1-1
Chapter 2 Command Line Interface for Configuration..............................................................2-1
2.1 Setting Up the Configuration Environment........................................................................2-1
2.1.1 Configuring the XE IP PBX through the CONSOLE Port........................................2-1
2.1.2 Configuring the XE IP PBX through the AUX Port.................................................. 2-3
2.1.3 Configuring the XE IP PBX through Telnet............................................................. 2-5
2.2 Command Line Interface ...................................................................................................2-8
2.2.1 Command Line View............................................................................................... 2-8
2.2.2 Command Line Online Help.................................................................................. 2-11
2.2.3 Command Line Error Information.......................................................................... 2-12
2.2.4 History Command .................................................................................................2-12
2.2.5 Edit Features......................................................................................................... 2-13
2.2.6 Display Features ................................................................................................... 2-13
2.2.7 Regular Expressions.............................................................................................2-14
2.3 Hot Keys .......................................................................................................................... 2-17
2.3.1 Classifying Hot Keys.............................................................................................2-17
2.3.2 Usage of the Hot Keys..........................................................................................2-18
2.3.3 Configuring Command Alias ................................................................................. 2-19
Chapter 3 Basic Configuration.....................................................................................................3-1
3.1 Basic Configuration of Comware.......................................................................................3-1
3.2 Ethernet Interface Configuration........................................................................................ 3-5
3.2.1 Introduction to the Ethernet Interface...................................................................... 3-5
3.2.2 Configuring the Ethernet Interface..........................................................................3-6
3.2.3 Displaying and Debugging Ethernet Interface ........................................................ 3-9
3.3 Static Route Configuration.................................................................................................3-9
3.3.1 Introduction to the Static Route...............................................................................3-9
3.3.2 Introduction to the Default Route ............................................................................ 3-9
3.3.3 Configuring a Static Route....................................................................................3-10
3.3.4 Configuring a Default Route.................................................................................. 3-10
3.3.5 Deleting all Static Routes...................................................................................... 3-10
3.3.6 Displaying and Debugging Routing Table.............................................................3-11
Operation Manual – Basic Configuration H3C XE 200/2000 IP PBX Chapter 1 H3C XE 200/2000 IP PBX Overview
1-1
Chapter 1 H3C XE 200/2000 IP PBX Overview
1.1 Introduction
H3C XE 200/2000 IP PBX (hereinafter referred to as XE IP PBX) is a part of H3C’s integrated cross-industry V oIP solutio n designed for enterp rise users. It can integrate a large number of voice devices into a voice network that is easy to maintain, manage and upgrade. With the XE IP PBX, you can make full use of the functions available with the voice gateways and IP telephone terminals and even obtain function enhancement. Thus, your investment can be protected to the maximum extent.
As a VoIP server, the XE IP PBX can centralize management of devices such as voice gateways and IP telephone terminals and uniformly process VoIP services. The major functions that it provides include registration management, dialing routing management, call control, and service processing:
1) Registration management: When receiving a register request from a voice
gateway or terminal, the XE IP PBX accepts or rejects the request according to the registration management policy and records the dynamic information such as the online state of the gateway or terminal as well.
2) Dialing routing management: The XE IP PBX maintains the number information of
voice gateways and terminals and a mapping table from number to IP address an d port. When a voice gateway or terminal receives a dialed number, it sends a call request to the XE IP PBX. Then the XE IP PBX searches for the number mapping table to find the IP address and port number mapped to the dialed number.
3) Call control: The XE IP PBX supports call tracing, statistics in addition to call
connection, maintenance, and release. The XE IP PBX provides two approaches: redirection and routing.
4) Service processing: Besides the basic call services, the XE IP PBX provides the
traditional PBX service. Service information can be set by administrators or users through the GUI client or a terminal.
1.2 Feature List
Table 1-1 Functionality of the XE IP PBX
Attribute Description
Connectivity
LAN protocol
Ethernet_II Ethernet_SNAP IEEE802.2 IEEE802.3
Operation Manual – Basic Configuration H3C XE 200/2000 IP PBX Chapter 1 H3C XE 200/2000 IP PBX Overview
1-2
Attribute Description
IP service
ARP Static DNS service
Network protocol
IP routing Static routing management
Security AAA Local authentication and authorization
Reliability
Dual power redundancy (XE 2000) Automatic temperature sensor inside the chassis (XE 2000)
Command line interface (CLI)
Local configuration through the CONSOLE port Remote configuration through the AUX port Local and remote configuration through Telnet Command protection hierarchy where only
authorized users can access the critical configurations of the XE IP PBX
Telnet to other devices to manage them User-interface configuration, providing multiple login
authentication and authorization approaches
File system
FTP Server/Client that provides configuration file/application upload and download
File upload and download with TFTP File system management
Test and debugging
Network test tools such as tracert and ping for quick diagnosis on the network status
Abundant debugging information for troubleshooting Logging function, allowing logging information to be
retained on the local hard disk
Configuration and management
SNMPv3, compatible with SNMPv2c and SNMPv1
Operation Manual – Basic Configuration H3C XE 200/2000 IP PBX Chapter 2 Command Line Interface for Configuration
2-1
Chapter 2 Command Line Interface for
Configuration
2.1 Setting Up the Configuration Environment
The XE IP PBX provides the configuration command line interface, with which you can configure the XE IP PBX locally or remotely through:
z CONSOLE port z AUX port z Telnet
2.1.1 Configuring the XE IP PBX through the CONSOLE Port
Step 1: Connect the serial port on a PC (or terminal) to the CONSOLE port on the XE IP PBX using a console cable, as shown in
Figure 2-1.
Figure 2-1 Set up a local configuration environment through the CONSOLE port
Step 2: Run the terminal emulation program (HyperTerminal of Win9X for example) on the PC and set the terminal communications parameters as follows:
Bits per second: 9600 bps Data bits: 8 Parity: None Stop bits: 1 Flow control: None Terminal emulation type: VT100 See
Figure 2-2 through Figure 2-4.
Operation Manual – Basic Configuration H3C XE 200/2000 IP PBX Chapter 2 Command Line Interface for Configuration
2-2
Figure 2-2 Set up a new connection
Figure 2-3 Select the desired COM port
Operation Manual – Basic Configuration H3C XE 200/2000 IP PBX Chapter 2 Command Line Interface for Configuration
2-3
Figure 2-4 Port settings
Step 3: Power up the XE IP PBX. The system runs the power-on self-test (POST), and then prompts you to press <Enter> until the command line prompt (<XE> for example) appears.
Step 4: Enter commands to configure the XE IP PBX or view its running status. If you need help, enter “?”. For more information about the commands, refer to the following chapters.
2.1.2 Configuring the XE IP PBX through the AUX Port
To configure the XE IP PBX through the AUX port, attach a modem to the serial port on the PC and one to the AUX port on the XE IP PBX, as shown in
Figure 2-5.
Step 1: Attach a modem to the AUX port.
Operation Manual – Basic Configuration H3C XE 200/2000 IP PBX Chapter 2 Command Line Interface for Configuration
2-4
Telephone l ine
Serial port
AUX port
P C
Modem
Modem
XE IP PBX
Telephone line
PSTN
Figure 2-5 Set up a remote configuration environment
Step 2: Dial on the terminal to set up a connection to the XE IP PBX through the terminal emulation program (such as HyperTerminal of Windows 9X), as shown in
Figure 2-6 and Figure 2-7. In the terminal emulation program, select the RS-232 serial
port of the PC to be used for connection, and set the terminal communications parameters as follows:
Bits per second: 9600 Data bits: 8 Parity: None Stop bits: 1 Flow control: None (or Hardware) Terminal emulation type: VT100 See
Figure 2-3 and Figure 2-4.
Operation Manual – Basic Configuration H3C XE 200/2000 IP PBX Chapter 2 Command Line Interface for Configuration
2-5
Figure 2-6 Set the dialup number
Figure 2-7 Dial on the remote PC
Step 3: Enter the correct username and p assword, and proceed to configure or manage the XE IP PBX when the command line prompt (<XE> for example) appears in the remote terminal emulation program.
2.1.3 Configuring the XE IP PBX through Telnet
Note:
Before setting up a Telnet connection, make sure that:
z An IP address has been assigned to the XE IP PBX. z VTY login authentication mode and the incoming and outgoing call restriction rules
have been configured.
z There is a reachable route between the console terminal and the XE IP PBX.
Operation Manual – Basic Configuration H3C XE 200/2000 IP PBX Chapter 2 Command Line Interface for Configuration
2-6
Step 1: If the PC and the XE IP PBX are located in the same LAN, connect the Et hernet interfaces on them through the LAN, as shown in
Figure 2-8. Otherwise, connect the
PC to the XE IP PBX through the WAN, as shown in
Figure 2-9.
Telnet Client
PC
XE
LAN
Figure 2-8 Set up a Telnet configuration environment through the LAN
Teln et Client
LAN
PC
R outer
XE
WA
N
WAN
Figure 2-9 Set up a remote Telnet configuration environment through the WAN
Step 2: Run the Telnet program on the PC and set its terminal type to VT100, as shown in
Figure 2-10.
Operation Manual – Basic Configuration H3C XE 200/2000 IP PBX Chapter 2 Command Line Interface for Configuration
2-7
Figure 2-10 Run the Telnet program
Step 3: Select [Connect\Remote system] in the Telnet window, and enter the IP address of the Ethernet interface on the XE IP PBX in the dialog box as shown in
Figure 2-11.
Figure 2-11 Set up a Telnet connection with the XE IP PBX
Note:
Host Name in Figure 2-11 refers to the IP address of the XE IP PBX.
Step 4: After telnetting to the XE IP PBX, you are prompted for the username and password. If the authentication is passed, the command line prompt (<XE > for example) appears for you to configure the XE IP PBX or view its running status.
Note:
When you configure the XE IP PBX through telnet, be careful of modifying its IP address as such modification may result in Telnet disconnection. If such modification is required, you need to enter a new IP address of the IP BPX and make a new connection.
Operation Manual – Basic Configuration H3C XE 200/2000 IP PBX Chapter 2 Command Line Interface for Configuration
2-8
2.2 Command Line Interface
The system provides a wide range of configuration commands and the command line interface (CLI) through which you can configure and manage the XE IP PBX. The CLI supports:
z Local configuration through the CONSOLE port. z Remote configuration through the AUX port. z Remote configuration through Telnet. z Management of the configurations of terminal users in user interface view. z Hierarchical command protection in which users can only execute the commands
commensurate with their levels.
z Local, password, and AAA authentication modes that safeguard the XE IP PBX
against intrusion of unauthorized users and guarantee system security.
z Easy access to on-line help by entering “?”. z Commands such as tracert and ping to provide quick network test. z Abundant debugging information for fault diagnosis. z The telnet client function that allows you to telnet from the XE IP PBX to other
devices for management.
z FTP services that facilitate file upload and download. z Ability to execute a previously executed command. z Command line interpreter that provides multiple intelligent command parse
methods such as fuzzy match and context association for the convenience of input.
Note:
You are not allowed to configure IDs or numbers that may conflict with command keywords for XE IP PBX; otherwise, when any of the keywords including, without limitation, active, all, allowable, callin, callout, config, h323, list, sip, subscriber and bind is used, the system prompts error messages in the CLI.
2.2.1 Command Line View
The system commands implement the hierarchical protection model with four levels: visit, monitor, system, and manage.
z Visit: Includes network diagnosis commands such as ping and tracert, and the
commands for accessing external devices, such as telnet and rlogin. No commands at this level can be used to save the configuration files.
z Monitor: Provides the commands used for system maintenance and service fault
diagnosis, including the display and debugging commands. No commands at this level can be used to save the configuration files.
Operation Manual – Basic Configuration H3C XE 200/2000 IP PBX Chapter 2 Command Line Interface for Configuration
2-9
z System: Includes routing and other service configuration commands that cover all
the layers of a network to provide direct network services for users.
z Manage: Includes the commands essential to system operations and support
modules. They are service support commands that involve file system, FTP, TFTP , configuration file switch, user management, level setting, as well as the parameter setting within a system (the last case involves those non-protocol or non-RFC specifications) commands.
Commensurate with the command levels, login users are divided into four levels, namely that they can only use the commands at their own, or lower levels.
To prevent intrusion of unauthorized users, a user must undergo authentication when switching to a higher level. In this case, the user must input the higher-level user password, provided one has been set using the super password [ level user-level ] { simple | cipher } text command. Only when the correct password is provided can the user switch to the higher level. Otherwise, the original user level remains unchanged.
Note:
For the sake of privacy, the system does not display the password that the user has entered. The user is allowed to make up to three attempts after an incorrect password input.
The command views are implemented according to different configuration requirements. They provide different functions but are still related to each other. For example, after setting up a connection with the XE IP PBX, you enter user view where you can simply view the running status and statistics. By entering system-view in user view, you go to the system view , where you can input dif ferent configuration commands to enter the corresponding protocol, interface or functional module view.
Command lines are associated with the following command views:
z User view z System view z Interface views including GE interface view and virtual interface view . z PS view z LS view z MS view z MA view z OverLoad Protection view z GUI Server view z User interface view
Table 2-1 shows the functionality of these command views and the commands for
entering them.
Operation Manual – Basic Configuration H3C XE 200/2000 IP PBX Chapter 2 Command Line Interface for Configuration
2-10
Table 2-1 Command view functionality
In command
view
To do… Prompt
Accessed by
entering the
command
Exit with the
command
User view
View brief operating information and statistics about the XE IP PBX
<XE>
None (the system accesses user view immediately after a connection is set up with the XE IP PBX)
quit to disconnect from the XE IP PBX
System view
Configure system parameters
[XE]
system-view in user view
quit to return to user view
User interface view
Manage the asynchronous and logical interfaces on the XE IP PBX
[XE-ui0]
user-interfac e 0 in system
view
quit to return to the system view
Interface view
Configure interface parameters
[XE-Ethernet1 /0]
interface Ethernet 1/0
in system view
quit to return to system view
PS view
Configure process server
[XE-ps]
process-serv er in system
view
quit to return to system view
LS view
Configure location server
[XE-ls]
location-serv er in system
view
quit to return to system view
MS view
Configure media server
[XE-ms]
media-server in system view
quit to return
to system view
MA view
Configure media ability
[XE-ma]
media-ability in system view
quit to return to system view
OverLoad protection view
Configure overload protection
[XE-olp]
overload-prot ection in system view
quit to return
to system view
GUI server view
Configure GUI server
[XE-gui]
gui in system view
quit to return to system view
Operation Manual – Basic Configuration H3C XE 200/2000 IP PBX Chapter 2 Command Line Interface for Configuration
2-11
Note:
The command line prompt uses IP PBX name as prefix (which defaults to H3C), view name as suffix, a pair of parentheses to denote the current view, a pair of point brackets (“<>”) to denote user view, and a pair of square brackets (“[ ]”) to denote system v iew or any other configuration views.
2.2.2 Command Line Online Help
CLI offers the following online help types:
z Full help z Fuzzy help
To obtain the desired help information, you can:
1) Enter “?” in any views, and you will obtain all the commands in this view and their
simple descriptions as well. For example, <XE> ?.
2) Enter a command and a “?” separated by a space, <XE> display ?. for example. If
"?" is at the position of a keyword, all the keywords and their brief descriptions are shown.
3) Enter a command and a “?” separated by a space. If "?" is at the position of a
parameter, descriptions of these parameters are shown. For example:
[XE] interface ethernet ? <0-0> Slot number [XE] interface ethernet 0? / [XE] interface ethernet 0/? <0-1> [XE] interface ethernet 0/0 ? <cr>
<cr> here indicates that no parameter is at this position. In this case, the command is repeated in the next command line and executed if <Enter> is input.
4) Enter a character string followed by a “?”. All the commands starting with this
string are displayed. For example:
<XE> d? debugging delete dir display
5) Enter a command followed by a character string and “?”. All the keywords starting
with this string are listed. For example:
<XE> display h? history-command hotkey
Operation Manual – Basic Configuration H3C XE 200/2000 IP PBX Chapter 2 Command Line Interface for Configuration
2-12
6) Press <Tab> after entering the first several letters of a keyword to have the system
display the complete keyword. If more than one keyword has the same letters at the front, press <Tab> repeatedly until the one that you need is displayed.
2.2.3 Command Line Error Information
The commands are executed only if they have no grammar error. Otherwise, error information is reported, as shown in
Table 2-2.
Table 2-2 Common command line errors
Error information Cause
The command was not found.
Unrecognized command
The keyword was not found. Parameter type error
Wrong parameter
Parameter value overflow Incomplete command Incomplete command Too many parameters Too many parameters Ambiguous command Ambiguous parameters
2.2.4 History Command
With the function similar to Doskey , the CLI can automatically save previously executed commands and repeat execution. By default, it saves up to ten history commands for each user.
Table 2-3 lists the operations that a user can perform.
Table 2-3 Retrieve history commands
To do…
Enter the command or
press the key
Result
View history commands display history-comman d
Display the history commands that the user has entered and executed successfully.
Retrieve the previous history command
Up arrow key or <Ctrl+P>
Retrieve the previous history command, if there is any. Otherwise, the system rings alarm.
Retrieve the next history command
Down arrow key or <Ctrl+N>
Retrieve the next history command, if there is any. Otherwise, the system rings alarm.
Operation Manual – Basic Configuration H3C XE 200/2000 IP PBX Chapter 2 Command Line Interface for Configuration
2-13
Note:
The arrow keys can be used to retrieve history commands in Terminal and Telnet of Windows 3.X. However, the up arrow key is invalid in the HyperTerminal of Windows 9X, because it is interpreted in a different way. In this case, you can use <Ctrl+P> instead. The display history-command command can only display the successfully executed commands. An end user can use the up arrow key (or <Ctrl+P>) and the down arrow key (or <Ctrl+N>) to display those commands.
2.2.5 Edit Features
The CLI provides the basic command editing features and suppo rts multi-line edit. The maximum length of each command is 254 characters.
T able 2-4 shows these functions.
Table 2-4 Edit functions
Key Function
Common keys
If the edit buffer is not full, insert the character at current cursor position and move the cursor to the right. Otherwise, the alarm rings.
Backspace key
Delete the character to the left of the cursor and move the cursor back. If the cursor gets to the beginning of the command line, the alarm rings.
Left-arrow key or <Ctrl+B>
Move the cursor backward one character, and the alarm rings when the cursor gets to the beginning of the command line.
Right-arrow key or <Ctrl+F>
Move the cursor forward one character, and the alarm rings when the cursor gets to end of the command line.
Tab key
Press <Tab> after entering part of a keyword to get fuzzy help. If finding a unique match, the system substitutes the complete keyword for the incomplete one and displays it on the next line. If there are several matches, press <Tab> repeatedly until the one that you need is displayed. If a parameter has no match, your original input will remain unchanged and be displayed again on the next line after you press <Tab>.
2.2.6 Display Features
The CLI provides the following display features:
Operation Manual – Basic Configuration H3C XE 200/2000 IP PBX Chapter 2 Command Line Interface for Configuration
2-14
I. Pausing information display
When the information displayed exceeds one screen page, the display is paused. In this case, three options shown in
Table 2-5 are available.
Table 2-5 Display functions
Key Function
<Ctrl+C> when information is being displayed
Stop the display and the command
execution. <Space> when information display pauses Continue to display the next screen. <Enter> when information display pauses Continue to display the next line.
2.2.7 Regular Expressions
I. Introduction to regular expressions
Regular expressions are a powerful and flexible tool for pattern matching and substitution. They are not restricted to a language or system and have been widely accepted.
When using a regular expression, you need to construct a matching pattern according to a certain rule, and then compare the matching pattern with the target object. The simplest regular expressions exclude all metacharacte rs. For example, you can specify a regular expression “hello”, which only matches the character string “hello”.
For flexible matching mode construction, regular expressions are allowed to contain some special characters, called metacharacters, to define how other characters appear in the target object. The following table d escribes the metacharacters.
Table 2-6 Metacharacters
Metacharacter Description
\ Escape character . Matches any single character except for “\n”, including spaces.
!
The character to the left of the exclamation mark in the expression should have no match or one match in the target object.
*
The character to the left of the asterisk in the expression should have no match or sequence of matches one after another in the target object.
+
The character to the left of the plus sign in the expression should have one match or sequence of matches one after another in the target object.
Operation Manual – Basic Configuration H3C XE 200/2000 IP PBX Chapter 2 Command Line Interface for Configuration
2-15
Metacharacter Description
|
Allows either expression on the side of the alternation character to match the target object.
^
The characters following the ^ sign must appear at the beginning of the target object.
$
The characters before the dollar sign must appear at the end of the target object.
(xyz)
The target object must contain the character string in the parenthesis.
[xyz] Matches any character contained in the square brackets.
[^xyz]
Matches any character except for those contained in the square
brackets. [a-z] Matches any character within the specified range. [^a-z] Matches any character beyond the specified range.
{n}
The “n” in the brace brackets is a non-negative integer, indicating
that there are consecutive n matches for a character string.
{n,}
The “n” in the brace brackets is a non-negative integer, indicating
that there are consecutive n or more than n matches for a
character string.
{n,m}
The “m” and “n” in the brace brackets are non-negative intege rs,
with n<=m. It indicates that the consecutive matches are in the
range n to m. Note that no space is allowed on either side of the
comma.
For example: ^ip: to match the target object starting with the character string “ip”. ip$: to match the target object ending with the character stri ng “ip”.
II. Usage of regular expressions
You can use regular expressions to filter out uninterested information when a large amount of information is present.
1) Specify filtering mode between screens If enormous information is present and output in multiple screens, you can filter
information after the prompt ”---- More ----” between screens appears by entering a regular expression in one of the following forms:
z /regular-expression: to output all lines starting with the line that matches the
specified regular expression.
z -regular-expression: to output all lines that do not match the specified regular
expression.
Operation Manual – Basic Configuration H3C XE 200/2000 IP PBX Chapter 2 Command Line Interface for Configuration
2-16
z +regular-expression: to output only the lines that match the specified regular
expression.
For example, you can use the following command to view the current configuration information:
<XE> display current-configuration # sysname XE2000 # interface Aux0 async mode flow # interface GigabitEthernet0/0 ip address 192.168.80.50 255.255.255.0 # interface GigabitEthernet0/1 # interface NULL0 # user-interface con 0 user-interface aux 0 user-interface vty 0 4 # process-server ps-config gkserver interface GigabitEthernet0/0 heartbeat password xe2000 start # gatekeeper
When the prompt “---- More ----” appears, you can manually enter a plus sign (+) and then a regular expression to filter information to be displayed. To output only the lines that contain the character string “gate”, for example:
---- More ---­+interface (manually entered)
filtering... gateway gw01 gateway gw02 <XE>
Operation Manual – Basic Configuration H3C XE 200/2000 IP PBX Chapter 2 Command Line Interface for Configuration
2-17
2.3 Hot Keys
2.3.1 Classifying Hot Keys
The hot keys in the system fall into two types: user-configurable and system. The user-configurable hot keys include CTRL_G, CTRL_L, CTRL_O, CTRL_T and
CTRL_U. You can associate these hot keys with any commands for automatic execution.
The system hot keys have fixed functions and do not allow customization, as shown in
Table 2-7.
Table 2-7 System hot keys
Keys or commands Function
CTRL_A Move the cursor to the beginning of current line CTRL_B Move the cursor one character leftward CTRL_C Terminate th e running function CTRL_D Delete the character at the cursor CTRL_E Move the cursor to the end of current line CTRL_F Move the cursor one character rightward CTRL_H Delete the character to the left of the cursor CTRL_K Terminate the outbound connection CTRL_N Display the next command in the history command buffer
CTRL_P
Display the previous command in the history command
buffer CTRL_R Refresh the information of current line CTRL_V Pasts the contents on the clipboard CTRL_W Delete the word to the left of the cursor CTRL_X Delete all the characters to the left of the cursor CTRL_Y Delete all the characters to the right of the cursor CTRL_Z Return to user view CTRL_] Terminate or re-direct the inbound connection ESC_B Move the cursor one word leftward ESC_D Delete the word to the right of the cursor ESC_F Move the cursor one word rightward ESC_N Move the cu rsor downward to the next line ESC_P Move the cursor upward to the previous line
Operation Manual – Basic Configuration H3C XE 200/2000 IP PBX Chapter 2 Command Line Interface for Configuration
2-18
Keys or commands Function
ESC_< Set the cursor’s location to the beginning of the clipboard ESC_> Set the cursor’s location to the end of the clipboard
2.3.2 Usage of the Hot Keys
z You can press a hot key combination wherever you are allowed to enter a
command. Then the system displays the corresponding command as if you have entered the complete command.
z If you have entered part of a command without pressing <Enter>, you can delete
the input characters and enter a complete command simply by pressing the hot key for this new command.
z Similar to executing a command, after a shortcut key is executed, its
corresponding command prototype is retained in the history command buffer and log for retrieving and locating problem.
Note:
The functionality of a hot key may be the user terminal dependent, for example, the hot key assigned from the terminal may conflict with the one on XE IP PBX. In this case, the application on the terminal responds to the hot key press.
Perform the following configuration in system view.
Table 2-8 Define hot keys
Operation Command
Define a hot key.
hotkey { CTRL_G | CTRL_L | CTRL_O | CTRL_T | CTRL_U } command_text
Restore the default values in the system.
undo hotkey { CTRL_G | CTRL_L | CTRL_O | CTRL_T | CTRL_U }
By default, the system assigns defaults to the hot keys of CTRL_G, CTRL_L and CTRL_O as follows:
CTRL_G: display current-configuration CTRL_L: display ip routing-table CTRL_O: undo debugging all
Operation Manual – Basic Configuration H3C XE 200/2000 IP PBX Chapter 2 Command Line Interface for Configuration
2-19
The default values of the other hot keys are null by default. Perform the following configuration in any view.
Table 2-9 Display the hot keys and their definitions
Operation Command
Display the hot keys and their functions.
display hotkey
2.3.3 Configuring Command Alias
The command alias configuration enables you to replace common Comware commands by what command formats you prefer.
I. Enabling command alias
Perform the following configurations in system view .
Table 2-10 Enabling command alias
Operation Command
Enable command alias
enable command-alias
Disable command alias
undo enable command-alias
By default, the command alias function is disabled.
II. Specifying a command alias
Perform the following configuration in system view.
Table 2-11 Specifying a command alias
Operation Command
Specify a command alias
command-alias alias currentfirstcmdkey
Cancel the configured command alias
undo command-alias alias
By default, no command alias is configured.
III. Displaying and Debugging
Perform the following configuration in any view.
Operation Manual – Basic Configuration H3C XE 200/2000 IP PBX Chapter 2 Command Line Interface for Configuration
2-20
Table 2-12 Displaying and Debugging
Operation Command
Display the current alias setting
display command-alias
Loading...
+ 484 hidden pages