Sie sind auf Seite 1von 123

H3C MSR Series Routers

Voice Configuration Guide(V7)

Hangzhou H3C Technologies Co., Ltd.


http://www.h3c.com
Software version: MSR-CMW710-R0007
Document version: 6W100-20140320

Copyright 2014, Hangzhou H3C Technologies Co., Ltd. and its licensors

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
, IRF, NetPilot, Netflow,
H3C,
, H3CS, H3CIE, H3CNE, Aolynk,
, H3Care,
SecEngine, SecPath, SecCenter, SecBlade, Comware, ITCMM 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 contents, but all statements, information, and
recommendations in this document do not constitute the warranty of any kind, express or implied.

Preface
The H3C MSR documentation set includes 14 configuration guides, which describe the software features
for the H3C MSR Series Routers and guide you through the software configuration procedures. These
configuration guides also provide configuration examples to help you apply software features to different
network scenarios.
The Voice Configuration Guide(V7) describes fundamentals and configuration of Voice Entity, Voice
Subscriber, Dial Plan, SIP, H.323, Call Services, and so on.
This preface includes:

Audience

Conventions

About the H3C MSR documentation set

Obtaining documentation

Technical support

Documentation feedback

These configuration guides apply to the following models of the H3C MSR series routers:
Model
MSR 2600

MSR 26-30

MSR 3600

MSR 5600

MSR 36-10
MSR 36-20
MSR 36-40
MSR 36-60
MSR3600-28
MSR3600-51

MSR 56-60
MSR 56-80

Audience
This documentation is intended for:

Network planners

Field technical support and servicing engineers

Network administrators working with the routers

Conventions
This section describes the conventions used in this documentation set.

Command conventions
Convention

Description

Boldface

Bold text represents commands and keywords that you enter literally as shown.

Italic

Italic text represents arguments that you replace with actual values.

[]

Square brackets enclose syntax choices (keywords or arguments) that are optional.

{ x | y | ... }

Braces enclose a set of required syntax choices separated by vertical bars, from which
you select one.

[ x | y | ... ]

Square brackets enclose a set of optional syntax choices separated by vertical bars, from
which you select one or none.

{ x | y | ... } *

Asterisk marked braces enclose a set of required syntax choices separated by vertical
bars, from which you select at least one.

[ x | y | ... ] *

Asterisk marked square brackets enclose optional syntax choices separated by vertical
bars, from which you select one choice, multiple choices, or none.

&<1-n>

The argument or keyword and argument combination before the ampersand (&) sign can
be entered 1 to n times.

A line that starts with a pound (#) sign is comments.

Convention

Description

Symbols

WARNING

An alert that calls attention to important information that if not understood or followed can
result in personal injury.

CAUTION

An alert that calls attention to important information that if not understood or followed can
result in data loss, data corruption, or damage to hardware or software.

IMPORTANT

An alert that calls attention to essential information.


An alert that contains additional or supplementary information.

NOTE
TIP

An alert that provides helpful information.

Network topology icons


Represents a generic network device, such as a router, switch, or firewall.
Represents a routing-capable device, such as a router or Layer 3 switch.
Represents a generic switch, such as a Layer 2 or Layer 3 switch, or a router that supports
Layer 2 forwarding and other Layer 2 features.

Port numbering in examples


The port numbers in this document are for illustration only and might be unavailable on your device.

About the H3C MSR documentation set


The H3C MSR documentation set includes:
Category

Documents

Purposes

Product description and


specifications

Marketing brochures

Describe product specifications and benefits.

Installation guide

Provides a complete guide to hardware installation


and hardware specifications.

MSR Series Routers


Interface Module Manual

Provide the hardware specifications of cards.

MSR Series Routers


Configuration guides(v7)

Describe software features and configuration


procedures.

MSR Series Routers


Command references(v7)

Provide a quick reference to all available


commands.

Hardware specifications
and installation

Software configuration

Operations and
maintenance

Release notes

Provide information about the product release,


including the version history, hardware and software
compatibility matrix, version upgrade information,
technical support information, and software
upgrading.

Obtaining documentation
You can access the most up-to-date H3C product documentation on the World Wide Web
at http://www.h3c.com.
Click the links on the top navigation bar to obtain different categories of product documentation:
[Technical Support & Documents > Technical Documents]Provides hardware installation, software
upgrading, and software feature configuration and maintenance documentation.
[Products & Solutions]Provides information about products and technologies, as well as solutions.
[Technical Support & Documents > Software Download]Provides the documentation released with the
software version.

Technical support
service@h3c.com
http://www.h3c.com

Documentation feedback
You can e-mail your comments about product documentation to info@h3c.com.

We appreciate your comments.

Contents
Configuring analog voice interfaces 1
FXS interface 1
FXO interface 1
E&M interface 1
Configuration task list 1
Configuring basic functions 2
Configuring call progress tones 2
Configuring an FXS interface 3
Configuring CID 3
Setting the electrical impedance 4
Configuring the packet loss compensation mode 5
Configuring an FXS interface to send LCFO signals 5
Configuring an FXO interface 6
Configuring CID 6
Configuring busy tone detection 6
Configuring an on-hook delay 9
Configuring the off-hook mode 10
Configuring ring detection parameters 10
Setting the electrical impedance 11
Configuring the packet loss compensation mode 11
Binding an FXS interface to an FXO interface 11
Configuring an E&M interface 12
Configuring the cable type 12
Configuring the signal type 12
Configuring a start mode for E&M signaling 12
Configuring E&M non-signaling mode 15
Enabling E&M control signals pass-through 16
Configuring the output gain of SLIC chip 16
Configuring DTMF 16
Configuring DTMF tone sending 17
Configuring DTMF tone detection 17
Adjusting parameters for voice interfaces 18
Adjusting gains 18
Adjusting timing parameters 18
Configuring the comfortable noise function 19
Configuring echo cancellation 19
Displaying and maintaining analog voice interfaces 21
Analog voice interface configuration examples 21
Two-dial configuration example for the FXO interface 21
FXO interface PLAR configuration example 22
E&M interface configuration example 24
E&M non-signaling mode configuration example 25
FXS&FXO 1:1 binding configuration example 27
Configuring digital voice interfaces 29
E1 and T1 interfaces 29
BSV interfaces 29
Configuration task list 29
Configuring basic parameters for an E1 interface 30
i

Configuring a TDM clock source 30


Configuring other parameters 31
Configuring basic parameters for a T1 interface 31
Configuring a TDM clock source 31
Configuring other parameters 32
Configuring a BSV interface 32
Configuring a BRI interface 33
Configuring a digital voice interface 33
Configuring a timeslot set 33
Creating a timeslot set 33
Configuring a logical digital voice interface 34
Configuring R2 signaling 34
Configuring basic R2 signaling parameters 39
Configuring R2 digital line signaling 42
Configuring R2 interregister signaling 43
Configuring the ISDN protocol 44
Binding a digital voice interface to a POTS entity 45
Displaying and maintaining digital voice interfaces 45
Digital voice interface configuration examples 45
R2 signaling configuration example 45
E1 DSS1 signaling configuration example 47
BSV DSS1 signaling configuration example 49

Configuring voice entities 52


Overview 52
Configuring a POTS entity 52
Configuration task list 52
Creating a POTS entity and configuring basic parameters 53
Configuring codecs for a POTS entity 53
Configuring a POTS entity to register with the registrar 54
Configuring DTMF for a POTS entity 55
Enabling VAD for a POTS entity 55
Configuring options related to dial program 56
Configuring a VoIP entity 56
Configuration task list 56
Creating a VoIP entity and configuring basic parameters 57
Configuring codecs for a VoIP entity 57
Configuring DTMF for a VoIP entity 58
Enabling VAD for a VoIP entity 59
Configuring options related to dial program 59
Displaying and maintaining voice entities 60
Configuring dial programs 61
Configuration task list 61
Configuring caller control 61
Procedure 61
Examples 62
Configuring caller group control 63
Configuring a subscriber group 63
Configuring a caller group on a voice entity 63
Enabling private line auto ring-down 64
Configuring a number match mode 64
Procedure 64
Examples 65
Configuring the maximum number of total calls allowed by a voice entity 66
ii

Configuring number substitution 66


Number substitution on the calling router 67
Number substitution on the called router 67
Configuring global number substitution 68
Configuring number substitution for a voice entity 69
Examples 70
Configuring a priority for a voice entity 71
Configuring a number sending mode 71
Procedure 71
Examples 71
Configuring a dial prefix 73
Dial program configuration examples 73
Configuring number substitution 74
Configuring caller group control 76

Configuring SIP 79
Overview 79
Terminology 79
SIP functions 79
SIP messages 80
SIP configuration task list 80
Configuring SIP UA registration 81
Configuration prerequisites 81
Configuring SIP credentials 82
Enabling a POTS entity to register with the registrar 84
Configuring registrar information 84
Displaying SIP UA registration status 85
Configuring the call destination address for a VoIP entity 85
Configuring the call destination IP address for a VoIP entity 85
Configuring a VoIP entity to obtain the call destination address from a proxy server 85
Configuring the destination domain name and port number for a VoIP entity 86
Configuring extended SIP functions 86
Configuring out-of-band DTMF 86
Configuring periodic refresh of SIP sessions 87
Configuring PSTN cause-to-SIP status mappings 87
Configuring caller privacy 88
Setting the P-Asserted-Identity or P-Preferred-Identity header field 88
Displaying and maintaining SIP 89
SIP UA configuration examples 89
Configuring direct SIP calling 89
Configuring SIP calling through a SIP server 90
Configuring SIP calling through DNS 92
Configuring out-of-band DTMF 93
Configuring SIP trunk 96
Background 96
Features 97
Typical applications 97
Protocols and standards 98
SIP trunk configuration task list 98
Enabling SIP-to-SIP calling 98
Configuring a SIP trunk account 99
Enabling codec transparent transmission 99
Enabling media flow-around 99
Enabling DO-EO conversion 100
iii

Displaying and maintaining SIP trunk 100


SIP trunk configuration examples 101

Configuring call services 103


Call waiting 103
Call hold 103
Call forwarding 103
Call transfer 103
Call backup 104
Call services configuration task list 104
Configuring the call hold mode 104
Configuring call forwarding 105
Call services configuration examples 105
Call waiting configuration example 105
Call forwarding configuration example 107
Call transfer configuration example 109
Call backup configuration example 110
Index 112

iv

Configuring analog voice interfaces


Analog voice interfaces include FXS, FXO, and E&M interfaces.

FXS interface
A Foreign Exchange Station (FXS) interface connects to a standard telephone, fax machine, or a Private
Branch Exchange (PBX) through an RJ-11 connector and a telephone cable. It provides ring, voltage, and
dial tone based on level changes on the Tip/Ring line. An FXS interface can only connect to an FXO
interface.

FXO interface
A foreign exchange office (FXO) interface connects to a PBX through an RJ-11 connector and a telephone
cable. It provides ring, voltage, and dial tone based on level changes on the Tip/Ring line. An FXO
interface can only connect to an FXS interface.

E&M interface
An ear & mouth or receive & transmit (E&M) interface is a common trunk line that connects to a PBX
through an RJ-48 connector. The E&M interface supports E&M signaling. The E signaling receives signals
from the peer, and the M signaling sends signals to the peer. An E&M interface can only connect to an
E&M interface.

Configuration task list


Tasks at a glance
(Optional.) Configuring basic functions
(Optional.) Configuring call progress tones
(Optional.) Configuring an FXS interface

Configuring CID
Setting the electrical impedance
Configuring the packet loss compensation mode
Configuring an FXS interface to send LCFO signals

Tasks at a glance
(Optional.) Configuring an FXO interface

Configuring CID
Configuring busy tone detection
Configuring an on-hook delay
Configuring the off-hook mode
Configuring ring detection parameters
Setting the electrical impedance
Configuring the packet loss compensation mode

(Optional.) Binding an FXS interface to an FXO interface


(Optional.) Configuring an E&M interface

Configuring the cable type


Configuring the signal type
Configuring a start mode for E&M signaling
Configuring E&M non-signaling mode
Enabling E&M control signals pass-through

(Optional.) Configuring DTMF

Configuring DTMF tone sending


Configuring DTMF tone detection
(Optional.) Adjusting parameters for voice interfaces

Adjusting gains
Adjusting timing parameters
Configuring the comfortable noise function
Configuring echo cancellation

Configuring basic functions


Step

Command

Remarks

1.

Enter system view.

system-view

N/A

2.

Enter voice interface view.

subscriber-line line-number

N/A

3.

Configure a description for


the voice interface.

description text

By default, the description of a


voice interface is interface name
Interface.

4.

Restore the default settings for


the voice interface.

default

N/A

5.

Bring up the voice interface.

undo shutdown

By default, a voice interface is up.

Configuring call progress tones


Perform this task to configure call progress tones for all voice interfaces on the device.
To configure call progress tones:
2

Step

Command

Remarks

1.

Enter system view.

system-view

N/A

2.

Enter voice view.

voice-setup

N/A

Specify a country:

cptone country-type locale

Customize call progress tone


3.

4.

Configure call progress tones.

Configure the amplitude value


for call progress tones.

parameters:
cptone custom { busy-tone |
congestion-tone | dial-tone |
ringback-tone |
special-dial-tone |
waiting-tone } comb freq1
freq2 time1 time2 time3 time4

cptone tone-type { all | busy-tone


| congestion-tone | dial-tone |
ringback-tone | special-dial-tone |
waiting-tone } amplitude value

By default, the call progress tones


of China are used.

The default is 1000 for busy tone


and congestion tone, 400 for dial
tone and special dial tone, and
600 for ringback tone and waiting
tone.

Configuring an FXS interface


This section covers the procedures for configuring an FXS interface.

Configuring CID
Caller identification (CID) enables called terminals to display the calling information, including the
calling number, calling name, date, and time.
CID supports two data formats:

Single-data-message formatContains date, time, and calling number.

Multiple-data-message formatContains date, time, calling number, and calling name.

The called telephone displays the calling number differently as follows:

The called telephone displays the calling number if the terminating device is enabled with CID and
can obtain the calling number.

The called telephone displays the character "O" if the terminating device is enabled with CID but
fails to obtain the calling number (for example, the originating device does not send the calling
number).

The called telephone displays the character "P" if CID is disabled on the terminating device.

The FXS interface sends the CID to the called telephone through frequency shift keying (FSK) modulation
between the first and second rings. For the CID to appear on the called telephone, the called user should
pick up the handset after the second ring.
The CID function requires configurations on both FXS and FXO interfaces. For configuration on the FXO
interface, see "Configuring CID."

Configuration guidelines

The PBX and called telephones must support CID.


3

To ensure correct call time, make sure the router system time transmitted in data-message format
stays synchronous with the local standard time.

For the CID function to operate correctly, keep the cid send command enabled.

Configuration procedure
Step

Command

Remarks

1.

Enter system view.

system-view

N/A

2.

Enter FXS interface view.

subscriber-line line-number

N/A

3.

(Optional.) Configure the


calling name for the FXS
interface.

By default, no calling name is configured.

4.

Enable the FXS interface


to send CID to the remote
end.

calling-name text

The calling name can be sent only in the


multiple-data-message format.
Use this command on the originating
device.
Optional.
By default, this function is enabled.

cid send

Use this command on the originating


device.
By default, the bellcore mode is used.

5.

Configure the standard


mode for sending CID.

cid standard-type { bellcore |


brazil }

This command is for use on the


terminating device, which encapsulates
the CID by using the configured standard
mode and sends it to the called
telephone.
The message format configured by using
the cid type command takes effect only
when the bellcore mode is used.
The default is complex.

6.

Configure the data


message format.

7.

Enable CID on the FXS


interface.

Use this command on the terminating


device.
cid type { complex | simple }

When the originating device supports


only one message format, you must use
that message format on the terminating
device.
By default, CID is enabled.

cid display

Use this command on the terminating


device.

Setting the electrical impedance


The electrical impedance setting must be subject to country specifications. Each country corresponds to
an impedance value. You specify an impedance value while specifying a country.
To set the electrical impedance:
Step
1.

Enter system view.

Command

Remarks

system-view

N/A

Step
Enter FXS interface view.

2.

Set the electrical impedance


of a country.

3.

Command

Remarks

subscriber-line line-number

N/A

impedance { country-name | r550


| r600 | r650 | r700 | r750 |
r800 | r850 | r900 | r950 }

The default is the electrical


impedance of China.
You must configure the same
electrical impedance value on the
originating and terminating
devices.

Configuring the packet loss compensation mode


You can configure the packet loss compensation mode to alleviate the impact of packet loss on voice
quality:

For discrete packet loss, you can use the general compensation mode to reconstruct lost packets.

For continuous packet loss, you can use the voice gateway-specific compensation mode to
compensate for lost packets.

To configure the packet loss compensation mode:


Step

Command

Remarks

1.

Enter system view.

System-view

N/A

2.

Enter FXS interface view.

subscriber-line line-number

N/A

3.

Configure the packet loss


compensation mode for the
FXS interface.

plc-mode { general | specific }

By default, the specific algorithm


provided by the voice gateway is
used for an FXS interface.

Configuring an FXS interface to send LCFO signals


You can configure an FXS interface to send a loop current feed open (LCFO) signal when the peer goes
on-hook. This function is used mainly in North America.
To configure an FXS interface to send LCFO signals:
Step

Command

Remarks

1.

Enter system view.

System-view

N/A

2.

Enter FXS interface view.

subscriber-line line-number

N/A

3.

Configure the FXS interface to


send an LCFO signal when the
peer goes on-hook.

disconnect lcfo

By default, no LCFO signal is sent


(a busy tone is played to the peer
end).

Set the duration of the LCFO


signal.

timer disconnect-pulse value

The default is 750 milliseconds.

4.

Configuring an FXO interface


This section covers the procedures for configuring an FXO interface.

Configuring CID
The CID function must be configured on both the FXS and FXO interfaces. For information about
configuring this function on the FXS interface, see "Configuring CID."
For the CID function to work correctly, enable both CID receiving and CID sending.

Enabling CID receiving for an FXO interface


The FXO interface receives the CID. By default, it detects the CID from the PBX between the first and
second rings.
To enable CID receiving:
Step

Command

Remarks

1.

Enter system view.

system-view

N/A

2.

Enter FXO interface view.

subscriber-line line-number

N/A

3.

Configure the time for CID detection


and after the CID detection, the
number of rings the FXO interface
receives before going off-hook.

cid ring { 0 | 1 | 2 } [ times ]

By default, CID detection is


performed between the first and
second rings, and the FXO
interface goes off-hook as soon
as the detection is complete (cid
ring 1 0).

Enable CID receiving for the FXO


interface.

cid receive

By default, this function is


enabled.

Command

Remarks

4.

Enabling CID sending for an FXO interface


Step
1.

Enter system view.

system-view

N/A

2.

Enter FXO interface view.

subscriber-line line-number

N/A

3.

Enable CID sending for the FXO


interface.

cid send

By default, this function is


enabled.

Configuring busy tone detection


PBX switches might use different busy tone standards. If a user on the PBX side hangs up, the router knows
the on-hook operation by detecting a busy tone.
As shown in Figure 1, Telephone A establishes a call to Telephone B, and then Telephone A goes on-hook.
The PBX plays the busy tone to Router A after detecting the on-hook condition of Telephone A. If Router
A cannot identify the played busy tone, the FXO interface on Router A will remain seized or fault
detection occurs. To solve this problem, you can configure busy tone detection for the FXO interface.

Figure 1 Busy tone detection

You can configure busy tone detection by customizing busy tone parameters or configuring automatic
busy tone detection. If the tone that the router receives from the PBX matches the busy tone parameters,
the router considers the tone as a busy tone and shuts down the FXO interface.

Configuring a busy tone standard


Two busy tone standards are available: European standard and North American standard. After you
specify a standard, the device uses a set of parameters compliant with that standard for busy tone
detection. If the actual busy tone data do not completely match the set of parameters, the device can use
customized busy tone parameters or automatic busy tone detection to accurately detect busy tones.
To configure a busy tone standard:
Step

Command

Remarks

1.

Enter system view.

system-view

N/A

2.

Enter voice view.

voice-setup

N/A

3.

Specify a busy tone standard.

area { europe |
north-america }

By default, the European


standard is used.

Customizing busy tone parameters


Step

Command

Remarks

1.

Enter system view.

system-view

N/A

2.

Enter voice view.

voice-setup

N/A

3.

Customize busy tone


parameters.

busytone-detect custom
area-number index argu f1 f2 p1
p2 p3 p4 p5 p6 p7

N/A
By default, the European standard
is used.

4.

Enable using customized busy


tone parameters.

area custom

This command takes effect on all


FXO interfaces on the device.
The customized busy tone
parameters take effect only after
you configure this command.

Configuring automatic busy tone detection


Figure 2 Automatic busy tone detection

As shown in Figure 2, the process of automatic busy tone detection is as follows:


1.

Telephone A establishes a call to Telephone B.


7

2.

Telephone A first goes on-hook. The PBX plays busy tones to Router A after detecting the on-hook
condition.

3.

Execute the busytone-detect auto command on Router A to detect the busy tone. To make sure the
FXO interface can capture the busy tone sent by the PBX, H3C recommends that you execute this
command two seconds after Telephone A goes on-hook.

4.

The console prompts that busy tone detection is in progress and prompts detection success when
the detection is complete.

5.

Check whether the detected busy tone parameters are valid by repeating steps 1 and 2.
After Telephone A goes on-hook, the PBX plays a busy tone to Router A. If Router A detects the busy
tone, it shuts down the FXO interface.

To configure automatic busy tone detection:


Step

Command

Remarks

1.

Enter system view.

system-view

N/A

2.

Enter voice view.

voice-setup

N/A

3.

Configure automatic busy


tone detection.

busytone-detect auto index


line-number

N/A

4.

Return to system view.

quit

N/A

5.

Enter FXO interface view.

subscriber-line line-number

N/A

6.

Configure the number of busy


tone detection periods.

The default is 2.
busytone-detect period value

Test multiple values to select the


value that can ensure normal
on-hook.

Configuring busy tone sending


If the PBX does not play busy tones, configure the FXO interface to send busy tones.
To configure busy tone sending:
Step

Command

Remarks

1.

Enter system view.

system-view

N/A

2.

Enter FXO interface view.

subscriber-line line-number

N/A

3.

Enable busy tone sending.

send-busytone enable

By default, this function is disabled.

4.

Set the busy tone duration.

send-busytone time seconds

The default is 3 seconds.

Configuring silence detection-based automatic on-hook


If the device fails to detect busy tones or the PBX does not play busy tones, you can configure this feature
to implement automatic on-hook.
When the duration of silence (whose volume is smaller than the configured threshold) exceeds the
configured silence duration, the FXO interface automatically disconnects the call.
Improper configuration of this function can lead to false on-hook. A good practice is to configure multiple
sets of parameters and select the set of parameters that can quickly release the FXO interface and does
not causes false on-hook.
8

To configure silence detection-based automatic on-hook:


Step

Command

Remarks

1.

Enter system view.

system-view

N/A

2.

Enter FXO interface view.

subscriber-line line-number

N/A

3.

Configure silence
detection-based automatic
on-hook.

silence-detect threshold threshold


time time-length

By default, the silence threshold is


20, and the silence duration f is
7200 seconds (2 hours).

Configuring forced on-hook


In some countries, PBXs do not play busy tones, or the busy tones only last for a short period of time.
When noise is present on a link, even the silence detection-based automatic on-hook function
(configured with silence-detect threshold) cannot detect the busy tones and fails to release a call after
on-hook. To solve this problem, configure the forced on-hook function. Forced on-hook disconnects a call
when the specified time expires, even if the call is ongoing.
To configure forced on-hook:
Step

Command

Remarks

1.

Enter system view.

system-view

N/A

2.

Enter FXO interface view.

subscriber-line line-number

N/A
By default, forced on-hook is disabled.

3.

Configure forced on-hook.

hookoff-time time

If you configure this command on an FXO


interface of a card, the configuration
takes effect on all FXO subscriber lines of
the card.

Configuring an on-hook delay


An FXO interface goes on-hook when detecting a busy tone. This will cause the user of an IP phone
connected to the FXO interface to mistake the on-hook as a line problem because the user cannot hear
the busy tones.
To solve this problem, you can configure a delay time. During the delay time, the FXO interface continues
sending the busy tones to the IP phone.
To configure an on-hook delay:
Step

Command

Remarks

1.

Enter system view.

system-view

N/A

2.

Enter FXO interface view.

subscriber-line line-number

N/A

3.

Configure the delay time from


when the FXO interface detects
a busy tone to when the
interface goes on-hook.

busytone-hookon delay-timer
value

The delay time is 0 seconds (the


FXO interface goes on-hook
immediately after detecting a busy
tone).

Configuring the off-hook mode


The FXO interface supports two off-hook modes:

Immediate modeUpon receiving a call, the FXO interface goes off-hook and sends a dial tone to
the calling party. Then, the calling party dials the destination number.

Delay modeUpon receiving a call, the FXO interface places a call to the specified private line
number. When the called party picks up the phone, the FXO goes off-hook. This mode needs to
work with the private line auto ring-down (PLAR) function. For more information about PLAR, see
"Configuring dial programs."

To configure the off-hook mode:


Step

Command

Remarks

1.

Enter system view.

system-view

N/A

2.

Enter FXO interface view.

subscriber-line line-number

N/A

3.

Configure the off-hook mode.

hookoff-mode { delay |
immediate }

By default, the immediate mode is


used.

Configuring ring detection parameters


PBXs from different vendors use different types of ring signals. By setting ring detection parameters, you
can enable the FXO interface to detect ring signals of different frequencies and waveforms.
To configure ring detection parameters:
Step

Command

Remarks

1.

Enter system view.

system-view

N/A

2.

Enter FXO interface view.

subscriber-line line-number

N/A
The default is 10 milliseconds.

Do not set the debounce time


during a conversation.

Do not set too short a debounce


3.

Set the debounce time for ring


detection on the FXO
interface.

ring-detect debounce value

time, because false ring tone


recognition might occur under
power line interference.

If you configure this command

on an FXO interface of a card,


the configuration takes effect on
all FXO subscriber lines of the
card.

4.

Set the frequency value for


ring detection.

ring-detect frequency value

10

The default is 40 Hz.

Setting the electrical impedance


The electrical impedance setting must be subject to country specifications. Each country corresponds to
an impedance value. You specify an impedance value while specifying a country.
To set the electrical impedance:
Step

Command

Remarks

1.

Enter system view.

system-view

N/A

2.

Enter FXO interface view.

subscriber-line line-number

N/A

Set the electrical impedance


of a country.

3.

impedance { country-name | r550


| r600 | r650 | r700 | r750 |
r800 | r850 | r900 | r950 }

The default is the electrical


impedance of China.
You must configure the same
electrical impedance value on the
originating and terminating
devices.

Configuring the packet loss compensation mode


You can configure the packet loss compensation mode to alleviate the impact on voice quality:

For discrete packet loss, you can use the general compensation mode to reconstruct lost packets.

For continuous packet loss, you can use the voice gateway-specific compensation mode to
reconstruct lost packets.

To configure the packet loss compensation mode:


Step

Command

Remarks

1.

Enter system view.

System-view

N/A

2.

Enter FXO interface view.

subscriber-line line-number

N/A

3.

Configure the packet loss


compensation mode for the
FXO interface.

plc-mode { general | specific }

By default, the voice


gateway-specific compensation
mode is used for an FXO interface.

Binding an FXS interface to an FXO interface


The one-to-one binding between FXS and FXO interfaces enhances the reliability of voice
communication. By working with the PLAR function, this feature enables the telephone connected to the
FXS interface to exclusively use the bound FXO interface to place and receive calls.
The on-hook/off-hook state of the bound FXS and FXO interfaces is consistent. If the FXS interface
receives a call when the bound FXS interface goes off-hook, the calling party will hear busy tones.
To bind an FXS interface to an FXO interface:
Step
1.

Enter system view.

Command

Remarks

system-view

N/A
11

Step

Command

Remarks

2.

Enter FXO interface view.

subscriber-line line-number

N/A

3.

Bind an FXS interface to the


FXO interface.

hookoff-mode delay bind


fxs_subscriber_line [ ring-immediately ]

By default, no FXS interface is


bound.
By default, the PLAR function is
disabled.

4.

Enable the PLAR function.

private-line string

For more information about this


command, see Voice Command
Reference.

5.

Configure the interval


between on-hook and
off-hook.

timer hookoff-interval milliseconds

The default is 500 milliseconds.

Configuring an E&M interface


Configuring the cable type
You must configure the same cable type for the E&M interfaces on the originating and terminating
devices. Otherwise, only one-way voice communication can be implemented.
To configure the cable type for an E&M interface:
Step

Command

Remarks

1.

Enter system view.

system-view

N/A

2.

Enter E&M interface view.

subscriber-line line-number

N/A

3.

Configure the cable type for


the E&M interface.

cable { 2-wire | 4-wire }

The default is 4-wire.

Configuring the signal type


You must configure the same signal type on the originating and terminating devices.
To configure the signal type for an E&M interface:
Step

Command

Remarks

1.

Enter system view.

system-view

N/A

2.

Enter E&M interface view.

subscriber-line line-number

N/A

3.

Configure a signal type for the


E&M interface.

type { 1 | 2 | 3 | 5 }

The default is 5 (corresponding V


type signal).

Configuring a start mode for E&M signaling


Three start modes are available for E&M signaling:
12

Immediate startAfter off-hook, the originating side waits for a specified period of time to send the
called number to the terminating side. During this period of time, the originating side does not
check whether the terminating side is ready to receive the called number. The terminating side
enters off-hook state after receiving the called number.
Figure 3 Immediate start

Delay startThe originating side goes off-hook and seizes the trunk. After detecting the seizure
signal from the originating side, the terminating side enters the off-hook state and remains in this
state until it is ready to receive the called number. Then, the terminating side enters the on-hook state
and sends a signal to indicate that the line is idle. After receiving the idle signal, the originating
side sends the called number to the terminating side, which relays the call to the user phone.
Figure 4 Delay start

Wink startThe terminating side remains in on-hook state until it receives the seizure signal from
the originating side and then sends a wink to the originating side. After receiving the wink, the
originating side sends the called number to the terminating side, which relays the call to the user
phone.

13

Figure 5 Wink start

To configure the immediate start mode:


Step

Command

Remarks

1.

Enter system view.

system-view

N/A

2.

Enter E&M interface view.

subscriber-line line-number

N/A

3.

Configure the immediate start


mode for the E&M interface.

signal immediate

The default is the immediate start


mode.

4.

Configure a delay the


originating side waits to send
DTMF tones in immediate start
mode.

delay send-dtmf milliseconds

The default is 300 milliseconds.


Use this command on the
originating device.

To configure the delay start mode:


Step

Command

Remarks

1.

Enter system view.

system-view

N/A

2.

Enter voice interface view.

subscriber-line line-number

N/A

3.

Configure the delay start mode for the


E&M interface.

signal delay

The default is the immediate


start mode.

4.

Configure the seizure signal duration in


delay start mode.

delay hold milliseconds

5.

Configure the delay time from when the


terminating side detects a seizure
signal to when it sends the seizure
signal in delay start mode.

delay rising milliseconds

The default is 400 milliseconds.


Use this command on the
terminating device.
The default is 300 milliseconds.
Use this command on the
terminating device.

To configure the wink start mode:


Step
1.

Enter system view.

Command

Remarks

system-view

N/A

14

Step

Command

Remarks

2.

Enter voice interface view.

subscriber-line line-number

N/A

3.

Configure the wink start mode for


the E&M interface.

signal wink

The default is the immediate start


mode.

4.

Configure the delay time from when


the terminating side receives a
seizure signal to when it sends a
wink signal in the wink start mode.

delay send-wink milliseconds

5.

6.

Configure the duration of a wink


signal sent by the terminating side
in wink start mode.
Configure the timeout time for the
originating side to wait for a wink
signal after sending a seizure
signal in the wink start mode.

The default is 200 milliseconds.


Use this command on the
terminating device.
The default is 500 milliseconds.
delay wink-hold milliseconds

delay wink-rising milliseconds

Use this command on the


terminating device.
The default is 2000
milliseconds.
Use this command on the
originating device.

Configuring E&M non-signaling mode


The E&M non-signaling mode is applied when the E&M interface of the peer device does not provide the
M line and E line. In this mode, the E&M interface communicates with the peer device without signaling.
You can configure the PLAR function by using the private-line command to form a three-segment E&M
virtual private line (E&M-VoIP-E&M). When a subscriber picks up the phone, the originating device
directly dials the number specified by using the private-line command.
To configure E&M non-signaling mode:
Step

Command

Remarks

1.

Enter system view.

system-view

N/A

2.

Enter voice interface view.

subscriber-line line-number

N/A

3.

Configure the immediate start


mode for the E&M interface.

signal immediate

The default is the immediate start


mode.
By default, E&M non-signaling
mode is disabled.

4.

Enable E&M non-signaling mode.

open-trunk { caller [ monitor


interval ] | called }

Configure the open-trunk caller


[ monitor interval ] command on
the originating device, and
configure the open-trunk called
command on the terminating
device.
Use this command on the
originating device.

5.

Enable the PLAR function.

private-line string

15

For more information about the


PLAR function, see "Configuring
dial programs."

Enabling E&M control signals pass-through


This feature operates only when the E&M non-signaling mode is enabled. As shown in Figure 6, an E&M
virtual private line is set up between the tone generator and the radio. Enable E&M control signals
pass-through for Router A and Router B so that they can send seize and idle signals for the E&M virtual
line over the IP network.
Figure 6 E&M analog control signals pass-through

To enable E&M control signals pass-through:


Step

Command

Remarks

1.

Enter system view.

system-view

N/A

2.

Enter voice interface view.

subscriber-line line-number

N/A

3.

Enable E&M control signals


pass-through.

By default, this function is disabled.


passthrough

Configure this command on both


the originating and terminating
devices.

Configuring the output gain of SLIC chip


Step

Command

Remarks

1.

Enter system view.

system-view

N/A

2.

Enter voice interface view.

subscriber-line line-number

N/A
Optional.

3.

Configure the output gain of


the SLIC chip.

slic-gain { 0 | 1 }

The default is 0 (0.8 dB).


This command controls signal
amplification.

Configuring DTMF
Dual tone multi-frequency (DTMF) uses a mixture of a high frequency tone and a lower frequency tone to
represent a key on a keypad. Each column of keys is represented by a high frequency tone and each row
of keys is represented by a low frequency tone. For example, as shown in Figure 7, the digit 1 is
represented by the combination of a pure 697 Hz signal and a pure 1209 Hz signal. Such DTMF tones
have good immunity to interference.

16

Figure 7 DTMF keypad frequencies


Column Frequency Group
1209Hz

1336Hz

1477Hz

1633Hz

697Hz

770Hz

852Hz

941Hz

A DTMF tone must last at least 45 milliseconds. A minimum interval of 23 milliseconds is required
between two DTMF tones to make sure DTMF tones are recognizable. Such requirements are roughly the
same in all countries. For more information, see the ITU-T Recommendation Q.24.

Configuring DTMF tone sending


Step

Command

Remarks

1.

Enter system view.

system-view

N/A

2.

Enter voice view.

voice-setup

N/A

3.

Configure the duration of


DTMF tones and the interval
between DTMF tones.

dtmf time {interval | persist }


milliseconds

The default duration and interval


are both 120 milliseconds.

4.

Configure the amplitude of


DTMF tones.

dtmf amplitude value

The default is 9.0 dBm.

Configuring DTMF tone detection


Use the following ways to detect DTMF tones:

Energy detectionCalculates the spectrum shape of input DTMF signals and matches the spectrum
shape with the threshold parameters. A DTMF tone is considered valid if it matches all threshold
parameters.

Sensitivity detectionA higher DTMF detection sensitivity reduces the possibility of missing a true
DTMF tone but increases the possibility of false detection. A lower DTMF detection sensitivity
reduces the possibility of false detection but increases the possibility of missing a true DTMF tone.

To configure DTMF tone detection:


17

Step

Command

Remarks

1.

Enter system view.

system-view

N/A

2.

Enter voice interface view.

subscriber-line line-number

N/A

3.

4.

Configure the threshold


parameters for DTMF
detection.

dtmf threshold analog index


value

Configure the DTMF


detection sensitivity level.

dtmf sensitivity-level { high |


low | medium
[ frequency-tolerance value ] }

By default, indexes 0 to 12 correspond to


1400, 458, -9, -9, -9, -9, -3, -12, -12, 30,
300, 3200, and 375, respectively.
This command is used by professional
personnel to adjust the device in the case
of DTMF detection failure. Usually, the
default value is adopted.
By default, the DTMF detection sensitivity
is low.
This command applies to only FXS and
FXO interfaces

Adjusting parameters for voice interfaces


The configuration tasks in this section are all optional.

Adjusting gains
You can adjust gains to control the amount of volume in the input or output direction.
IMPORTANT:
Gain adjustment might lead to call failures. H3C recommends not adjusting the gain. If necessary, do it
under the guidance of technical personnel.
To adjust gains:
Step

Command

Remarks

1.

Enter system view.

system-view

N/A

2.

Enter voice interface view.

subscriber-line line-number

N/A

3.

Set the input gain.

receive gain value

The default is 0 dB.

4.

Set the output gain.

transmit gain value

The default is 0 dB.

Adjusting timing parameters


Step

Command

Remarks

1.

Enter system view.

system-view

N/A

2.

Enter voice interface view.

subscriber-line line-number

N/A

18

Step
3.

4.

5.

Command

Remarks
The default is 10 seconds.

Configure the interval


between off-hook and dialing
the first digit.

timer first-dial seconds

This command applies only to FXO


and FXS interfaces.

Configure the maximum


interval for dialing the next
digit.

timer dial-interval seconds

The default is 10 seconds.

Configure the maximum


duration for playing ringback
tones.

timer ring-back seconds

The default is 60 seconds.


The default is 1 second.

6.

7.

Configure the dial delay time.

Configure the hookflash time


range.

delay start-dial seconds

timer hookflash-detect
hookflash-range

This command applies to only FXO


and FXS interfaces.
By default, the hookflash time
range is 50 to 180 milliseconds;
that is, if an on-hook condition lasts
for a period that falls within the
hookflash time range, it is
considered a hookflash.
This command applies to only FXS
interfaces.

8.

Configure the maximum


duration the terminating
device waits for the first digit.

timer wait-digit { seconds |


infinity }

The default is 5 seconds.


This command applies to only E&M
interfaces.

Configuring the comfortable noise function


You can configure this feature to generate comfortable background noise to replace the silent gaps
during a conversation.
To configure the comfortable noise function:
Step

Command

Remarks

1.

Enter system view.

system-view

N/A

2.

Enter voice interface view.

subscriber-line line-number

N/A

3.

Enable the comfortable noise


function.

cng-on

By default, this function is enabled.

Configuring echo cancellation


An echo is the audible leak-through of your own voice into your own receive path. When the voice of a
user leaks into the receive path, it is an echo. The echo cancellation function can alleviate the echo
problem.
The time when an echo occurs and the size of the echo are relatively fixed. As shown in Figure 8, there
is a voice signal at time 0, and an echo occurs after about 40 milliseconds (ms). To cancel this echo, set
19

the echo cancellation delay (the time between when an interface sends out a signal and when to the
interface receives an echo) to 33 ms and the echo cancellation coverage to 16 ms.
Figure 8 Echo

Configuring the echo cancellation function


Step

Command

Remarks

1.

Enter system view.

system-view

N/A

2.

Enter voice interface view.

subscriber-line line-number

N/A

3.

Enable the echo cancellation


function.

echo-canceler enable

By default, this function is enabled.

4.

Configure the echo


cancellation delay.

echo-canceler delay milliseconds

The default is 0 milliseconds.

5.

Configure the echo


cancellation coverage.

echo-canceler tail-length
milliseconds

The default is 128 milliseconds.

Adjusting echo cancellation parameters


Table 1 describes how to adjust echo cancellation parameters for different symptoms.
Table 1 Adjusting echo cancellation parameters
Symptom

Parameters adjusted

Effect

A user hears echoes or loud


background noises from the peer
when speaking.

Speed up the convergence of


comfortable noise amplitudes.

Too fast convergence might make


noises uncomfortable.

There are loud environment noises.

Increase the maximum amplitude


of comfortable noises.

Too large amplitude might make


noises uncomfortable.

A user hears echoes when


speaking.

Enlarge the mixture proportion


control factor of comfortable
noises.

Too high a control factor leads to


audio discontinuity.

There are echoes when both


parties speak at the same time.

Enlarge the two-way judgment


threshold.

Too high a judgment threshold


slows down the convergence of the
filter factor.

To adjust echo cancellation parameters:


Step
1.

Enter system view.

Command

Remarks

system-view

N/A

20

Step
2.

3.

Enter voice view.

Adjust echo cancellation


parameters.

Command

Remarks

voice-setup

N/A

echo-canceler { convergence-rate
value | max-amplitude value |
mix-proportion-ratio value |
talk-threshold value }

By default, the convergence rate of


comfort noise amplitude is 0, the
maximum amplitude of comfort
noise is 256, the comfort noise
mixture proportion control factor is
100, and the two-way judgment
threshold is 1.
The echo-canceler enable
command must be configured for
the configured parameters to take
effect.

Enabling the nonlinear function of echo cancellation


After echo cancellation is enabled, nonlinear parts in the line can cause residual echo. The nonlinear
function, also called residual echo suppression, can remove the residual echo.
To enable the nonlinear function of echo cancellation:
Step

Command

Remarks

1.

Enter system view.

system-view

N/A

2.

Enter voice interface view.

subscriber-line line-number

N/A

3.

Enable the nonlinear function


of echo cancellation.

By default, this function is enabled.


This command is available only
after you configure the
echo-canceler enable command.

nlp-on

Displaying and maintaining analog voice


interfaces
Execute display commands in any view.
Task

Command

Display information about analog voice


interfaces.

display voice subscriber-line

Analog voice interface configuration examples


Two-dial configuration example for the FXO interface
As shown in Figure 9, Router A and Router B are connected through an IP network and can reach each
other. The PBX is configured with a trunk number 07552003.
21

Configure the two routers to enable Telephone B to establish a call with Telephone A through two dials.
Figure 9 Network diagram
Eth2/1
1.1.1.1/24

FXS 1/0

Telephone A
0101001

IP network

Eth2/1
2.2.2.2/24

FXO 1/0

Router B

Router A

PBX

Telephone B
07552001

Configuration procedure
1.

On Router A, configure the local number as 0101001 for POTS entity 1001, and bind FXS
interface line1/0 to the POTS entity.
<RouterA> system-view
[RouterA] voice-setup
[RouterA-voice] dial-program
[RouterA-voice-dial] entity 1001 pots
[RouterA-voice-dial-entity1001] match-template 0101001
[RouterA-voice-dial-entity1001] line 1/0

2.

Configure Router B:
# Configure the called number as 010 for VoIP entity 010, and configure the destination IP
address as 1.1.1.1.
<RouterB> system-view
[RouterB] voice-setup
[RouterB-voice] dial-program
[RouterB-voice-dial] entity 010 voip
[RouterB-voice-dial-entity10] match-template 0101001.
[RouterB-voice-dial-entity10] address sip ip 1.1.1.1
[RouterB-voice-dial-entity10] quit

# Configure the local number as 07552001 for POTS entity 2001, and bind FXO interface
line1/0 to POTS entity 2001.
[RouterB-voice-dial] entity 2001 pots
[RouterB-voice-dial-entity2001] match-template 07552001
[RouterB-voice-dial-entity2001] line 1/0

# Configure the number sending mode as all.


[RouterB-voice-dial-entity2001] send-number all

Verifying the configuration


After the user of Telephone B dials 07552003, the user hears a dial tone. Then, the user of Telephone B
dials 0101001, and Telephone A rings. After the user of Telephone A picks up the handset, the two users
can establish a conversation.

FXO interface PLAR configuration example


Network requirements
As shown in Figure 10, Router A and Router B are connected through an IP network and can reach each
other. The PBX is configured with a trunk number 07552003.

22

Configure PLAR for the FXO interface of Router B. When the user of Telephone B dials 07552003, the
FXO interface automatically calls Telephone A.
Figure 10 Network diagram
Eth2/1
1.1.1.1/24

FXS 1/0

Telephone A
0101001

IP network

Eth2/1
2.2.2.2/24

FXO 1/0

Router B

Router A

PBX

Telephone B
07552001

Configuration procedure
1.

On Router A, configure the local number as 0101001 for POTS entity 1001, and bind FXS
interface line1/0 to the POTS entity.
<RouterA> system-view
[RouterA] voice-setup
[RouterA-voice] dial-program
[RouterA-voice-dial] entity 1001 pots
[RouterA-voice-dial-entity1001] match-template 0101001
[RouterA-voice-dial-entity1001] line 1/0

2.

Configure Router B:
# Configure the called number as 010 for VoIP entity 010, and configure the destination IP
address as 1.1.1.1.
<RouterB> system-view
[RouterB] voice-setup
[RouterB-voice] dial-program
[RouterB-voice-dial] entity 010 voip
[RouterB-voice-dial-entity10] match-template 0101001.
[RouterB-voice-dial-entity10] address sip ip 1.1.1.1
[RouterB-voice-dial-entity10] quit

# Configure the local number as 07552001 for POTS entity 2001, and bind FXO interface
line1/0 to the POTS entity.
[RouterB-voice-dial] entity 2001 pots
[RouterB-voice-dial-entity2001] match-template 07552001
[RouterB-voice-dial-entity2001] line 1/0

# Configure the number sending mode as all.


[RouterB-voice-dial-entity2001] send-number all

# Enable the PLAR function and configure the delay off-hook mode for the FXO interface.
[RouterB] subscriber-line 1/0
[RouterB-subscriber-line1/0] private-line 0101001
[RouterB-subscriber-line1/0] hookoff-mode delay

Verifying the configuration


After the user of Telephone B dials 07552003, the FXO interface automatically calls Telephone A, and
Telephone A rings. After the user of Telephone A picks up the handset, the two users can establish a
conversation.

23

E&M interface configuration example


Network requirements
As shown in Figure 11, Router A and Router B are connected through an IP network and can reach each
other.
Configure the two routers to enable Telephone A and Telephone B to establish calls.
Figure 11 Network diagram
Eth2/1
1.1.1.1/24

FXS 1/0

Telephone A
0101001

IP network

Eth2/1
2.2.2.2/24

Router A

E&M 5/0

Router B

PBX

Telephone B

Configuration procedure
1.

Configure Router A:
# Configure the called number as 0755 for VoIP entity 0755, and configure the destination IP
address as 2.2.2.2.
<RouterA> system-view
[RouterA] voice-setup
[RouterA-voice] dial-program
[RouterA-voice-dial] entity 0755 voip
[RouterA-voice-dial-entity755] match-template 07552001
[RouterA-voice-dial-entity755] address sip ip 2.2.2.2
[RouterA-voice-dial-entity755] quit

# Configure the local number as 0101001 for POTS entity 1001, and bind FXS interface line1/0
to the POTS entity.
[RouterA-voice-dial] entity 1001 pots
[RouterA-voice-dial-entity1001] match-template 0101001
[RouterA-voice-dial-entity1001] line 1/0

2.

Configure Router B:
# Configure the called number as 010 for VoIP entity 010, and configure the destination IP
address as 1.1.1.1.
<RouterB> system-view
[RouterB] voice-setup
[RouterB-voice] dial-program
[RouterB-voice-dial] entity 010 voip
[RouterB-voice-dial-entity10] match-template 0101001
[RouterB-voice-dial-entity10] address sip ip 1.1.1.1
[RouterB-voice-dial-entity10] quit

# Configure the local number as 07552001 for POTS entity 2001, and bind E&M interface line
5/0 to the POTS entity.
[RouterB-voice-dial] entity 2001 pots
[RouterB-voice-dial-entity2001] match-template 07552001
[RouterB-voice-dial-entity2001] send-number all
[RouterB-voice-dial-entity2001] line 5/0
[RouterB-voice-dial-entity2001] return

24

# Enter the view of E&M interface 5/0. The E&M interface must have the same configuration as the
connected PBX.
<RouterB> system-view
[RouterB] subscriber-line 5/0

# Configure the wink start mode.


[RouterB-subscriber-line5/0] signal wink

# Configure the 4-wire cable type (optional, because the default is the 4-wire cable type).
[RouterB-subscriber-line5/0] cable 4-wire

# Configure the signal type as 5 (optional, because the default is 5).


[RouterB-subscriber-line5/0] type 5

Verifying the configuration


After the user of Telephone A dials 07552001, Telephone B rings. When the user of Telephone B picks
up the handset, the two users can establish a conversation.
After the user of Telephone B dials 0101001, Telephone A rings. When the user of Telephone A picks up
the handset, the two users can establish a conversation.

E&M non-signaling mode configuration example


Network requirements
As shown in Figure 12, configure the PLAR mode for the E&M interface on Router A. When the user of
Telephone A dials picks up the handset, the E&M interface automatically calls Telephone B.
Figure 12 Network diagram

Configuration procedure
1.

Configure Router A:
# Configure the called number as 2000 for VoIP entity 2000, and configure the destination IP
address as 2.2.2.2.
<RouterA> system-view
[RouterA] voice-setup
[RouterA-voice] dial-program
[RouterA-voice-dial] entity 2000 voip
[RouterA-voice-dial-entity2000] match-template 2000
[RouterA-voice-dial-entity2000] address sip ip 2.2.2.2
[RouterA-voice-dial-entity2000] quit

# Configure the local number as 1000 for POTS entity 1000, and bind E&M interface line 5/0 to
the POTS entity.
25

[RouterA-voice-dial] entity 1000 pots


[RouterA-voice-dial-entity1000] match-template 1000
[RouterA-voice-dial-entity1000] line 5/0
[RouterA-voice-dial-entity1000] return

# Enter the view of E&M interface 5/0.


<RouterA> system-view
[RouterA] subscriber-line 5/0

# Configure the immediate start mode (optional, because the default is the immediate start mode).
[RouterA-subscriber-line5/0] signal immediate

# Enable the PLAR function.


[RouterA-subscriber-line5/0] private-line 2000

# Enable the E&M non-signaling mode.


[RouterA-subscriber-line5/0] open-trunk caller

# Enable E&M analog control signals pass-through.


[RouterA-subscriber-line5/0] passthrough

# Disable the echo cancellation function.


[RouterA-subscriber-line5/0] undo echo-canceler enable

2.

Configure Router B:
# Configure the called number as 1000 for VoIP entity 1000, and configure the destination IP
address as 1.1.1.1.
<RouterB> system-view
[RouterB] voice-setup
[RouterB-voice] dial-program
[RouterB-voice-dial] entity 1000 voip
[RouterB-voice-dial-entity10] match-template 1000
[RouterB-voice-dial-entity10] address sip ip 1.1.1.1
[RouterB-voice-dial-entity10] quit

# Configure the local number as 2000 for POTS entity 2000, and bind E&M interface line 5/0 to
the POTS entity.
[RouterB-voice-dial] entity 2000 pots
[RouterB-voice-dial-entity2000] match-template 2000
[RouterB-voice-dial-entity2000] line 5/0
[RouterB-voice-dial-entity2000] return

# Enter the view of E&M interface 5/0.


<RouterB> system-view
[RouterB] subscriber-line 5/0

# Configure the immediate start mode (optional, because the default is the immediate start mode).
[RouterB-subscriber-line5/0] signal immediate

# Enable the E&M non-signaling mode.


[RouterB-subscriber-line5/0] open-trunk called

# Enable E&M control signals pass-through.


[RouterB-subscriber-line5/0] passthrough

# Disable the echo cancellation function.


[RouterB-subscriber-line5/0] undo echo-canceler enable

26

Verifying the configuration


After the user of Telephone A picks up the handset, Router A automatically calls Telephone B. After the
user of Telephone B picks up the handset, the two users can establish a conversation.

FXS&FXO 1:1 binding configuration example


Network requirements
As shown in Figure 12, Telephone A calls Telephone B through the IP network. When the IP network is
unavailable, Telephone A uses the bound FXO interface to call Telephone B through the PSTN network.
Figure 13 Network diagram

192.168.0.71/24

FXS 1/0
Telephone A
0101001

IP

192.168.0.76/24

Router B

Router A

FXS 1/0

Telephone B
2101002

FXO 2/0

PSTN

FXO 2/0

Configuration procedure
1.

Configure Router A:
# Configure the called number template as 210. for VoIP entity 210, and configure the
destination IP address as 192.168.0.76.
<RouterA> system-view
[RouterA] voice-setup
[RouterA-voice] dial-program
[RouterA-voice-dial] entity 210 voip
[RouterA-voice-dial-entity210] match-template 210....
[RouterA-voice-dial-entity210] address sip ip 192.168.0.76
[RouterA-voice-dial-entity210] quit

# Configure the local number as 0101001 for POTS entity 0101001, and bind the FXS interface
line1/0 to the POTS entity.
[RouterA-voice-dial] entity 0101001 pots
[RouterA-voice-dial-entity101001] match-template 0101001
[RouterA-voice-dial-entity101001] line 1/0
[RouterA-voice-dial-entity101001] quit

# Configure the called number template as .T for POTS entity 211 used for call backup on FXO
interface line 2/0, and configure the permitted calling number as 0101001.
[RouterA-voice-dial] entity 211 pots
[RouterA-voice-dial-entity211] match-template .T
[RouterA-voice-dial-entity211] line 2/0
[RouterA-voice-dial-entity211] send-number all
[RouterA-voice-dial-entity211] caller-permit 0101001
[RouterA-voice-dial-entity211] quit

27

[RouterA-voice-dial] quit
[RouterA-voice] quit

# Enable the PLAR function for the FXO interface line 2/0, and bind the FXS interface line 1/0 to
the FXO interface line 2/0.
[RouterA] subscriber-line 2/0
[RouterA-subscriber-line2/0] private-line 0101001
[RouterA-subscriber-line2/0] hookoff-mode delay bind 1/0

2.

Configure Router B:
# Configure the called number template as 010. for VoIP entity 010, and configure the
destination IP address as 192.168.0.71.
<RouterB> system-view
[RouterB] voice-setup
[RouterB-voice] dial-program
[RouterB-voice-dial] entity 010 voip
[RouterB-voice-dial-entity10] match-template 010....
[RouterB-voice-dial-entity10] address sip ip 192.168.0.71
[RouterB-voice-dial-entity10] quit

# Configure the local number as 2101002 for POTS entity 2101002, and bind the FXS interface
line1/0 to the POTS entity.
[RouterB-voice-dial] entity 2101002 pots
[RouterB-voice-dial-entity2101002] match-template 2101002
[RouterB-voice-dial-entity2101002] line 1/0
[RouterB-voice-dial-entity2101002] quit

# Configure the called number template as .T for POTS entity 011 used for call backup on FXO
interface line 2/0, and configure the permitted calling number as 2101002.
[RouterB-voice-dial] entity 011 pots
[RouterB-voice-dial-entity11] match-template .T
[RouterB-voice-dial-entity11] line 2/0
[RouterB-voice-dial-entity11] send-number all
[RouterB-voice-dial-entity11] caller-permit 2101002
[RouterB-voice-dial-entity11] quit
[RouterB-voice-dial] quit
[RouterB-voice] quit

# Enable the PLAR function for the FXO interface line2/0, and bind the FXS interface line1/0 to the
FXO interface line2/0.
[RouterB] subscriber-line 2/0
[RouterB-subscriber-line2/0] private-line 2101002
[RouterB-subscriber-line2/0] hookoff-mode delay bind 1/0

Verifying the configuration

When the IP network operates correctly, Telephone A calls Telephone B through the IP network.

When the IP network is unavailable, Telephone A uses the bound FXO interface to call Telephone
B through the PSTN network.

28

Configuring digital voice interfaces


Digital voice interfaces include E1, T1, and BSV interfaces.

E1 and T1 interfaces
E1 interfaces (also called VE1 interfaces) and T1 interfaces (also called VT1 interfaces) can connect to
the PSTN as trunk interfaces. An E1 interface provides 32 timeslots and 2.048 Mbps bandwidth. A T1
interface provides 24 timeslots and 1.544 Mbps bandwidth. ITU-T E1 is used mainly in Europe and
China. ANSI T1 is used mainly in America, Canada, and Japan.
E1/T1 voice transmission allows a router to provide more communication channels, greatly improving
router utilization.
Figure 14 shows a typical network for E1/T1 interfaces.
Figure 14 Network diagram

BSV interfaces
BRI S/T voice (BSV) interfaces can compress, send, receive, and decompress voice packets. BSV
interfaces connect to PBXs as trunk interfaces. A BSV interface provides two B channels and one D
channel (2B+D) and supports only DSS1 signaling.

Configuration task list


To configure E1 and T1 interfaces, perform the following tasks:
Tasks at a glance
(Required.) Perform one of the following tasks:

Configuring basic parameters for an E1 interface


{

Configuring a TDM clock source

Configuring other parameters

Configuring basic parameters for a T1 interface


{

Configuring a TDM clock source

Configuring other parameters

(Required.) Configuring a timeslot set

Creating a timeslot set


Configuring a logical digital voice interface

29

Tasks at a glance
(Required.) Perform one of the following tasks:

Configuring R2 signaling
{

Configuring basic R2 signaling parameters

Configuring R2 digital line signaling

Configuring R2 interregister signaling

Configuring the ISDN protocol


(Required.) Binding a digital voice interface to a POTS entity

To configure BSV interfaces, perform the following tasks:


Tasks at a glance
(Required.) Configuring a BSV interface

Configuring a BRI interface


Configuring a digital voice interface
(Required.) Configuring the ISDN protocol
(Required.) Binding a digital voice interface to a POTS entity

Configuring basic parameters for an E1 interface


This section describes basic E1 interface settings.

Configuring a TDM clock source


E1 interfaces must use a common TDM clock source during timeslot interchange to prevent frame slips
and bit errors.
When both E1 and T1 cards are present on a device, all the E1 or T1 SIC cards are a subsystem, and
each E1 or T1 HMIM card is a subsystem. Each subsystem determines the clock source according to the
following rules:

If the line keyword is specified for all interfaces, the clock on the interface with the lowest number
is used. If the interface goes down, the clock on the interface with the second lowest number is used.

If the line and primary keywords are specified for one interface and the line or internal keyword is
specified for all other interfaces, the clock on that one interface is used.

If the line keyword is specified for one interface and the internal keyword is specified for all other
interfaces, the clock on that one interface is used.

The clock source of only one interface can be set to line primary.

The TDM clock sources on the local and peer devices must match. For example, if you set the clock source
to line for a subsystem on the local device, you must set the clock source to internal on the peer device;
and vice versa.
To configure a TDM clock source for an E1 interface:

30

Step

Command

Remarks

1.

Enter system view.

system-view

N/A

2.

Enter E1 interface view.

controller e1 number

N/A

3.

Configure a TDM clock source


for the E1 interface.

tdm-clock { internal | line


[ primary ] }

The default is internal.

Configuring other parameters


Step

Command

Remarks

1.

Enter system view.

system-view

N/A

2.

Enter E1 interface view.

controller e1 number

N/A

3.

Configure a description.

description text

The default is interface name


Interface.

4.

Configure the framing format.

frame-format { crc4 | no-crc4 }

The default is no-crc4.

5.

Set the line coding format.

code { ami | hdb3 }

The default is hdb3.

6.

Set the cable type.

cable { long | short }

The default is long.

7.

Configure the link idle code


type.

idle-code { 7e | ff }

The default is 0x7E.

8.

Set the interframe filling tag


type.

itf type { 7e | ff }

The default is 0x7E.

9.

(Optional.) Enable loopback


and set the loopback mode.

loopback { local | payload |


remote }

By default, loopback is disabled.

10. Restore the default settings for


the E1 interface.

default

N/A

11. Shut down the E1 interface.

undo shutdown

By default, an E1 interface is up.

Configuring basic parameters for a T1 interface


This section describes the basic T1 interface settings.

Configuring a TDM clock source


A T1 interface has the same TDM clock source configuration as an E1 interface. For more information,
see "Configuring a TDM clock source."
To configure a TDM clock source:
Step

Command

Remarks

1.

Enter system view.

system-view

N/A

2.

Enter T1 interface view.

controller t1 number

N/A

31

Step
Configure a TDM clock source
for the T1 interface.

3.

Command

Remarks

tdm-clock { internal | line


[ primary ] }

The default is internal.

Configuring other parameters


Step

Command

Remarks

1.

Enter system view.

system-view

N/A

2.

Enter T1 interface view.

controller t1 number

N/A

3.

Configure a description.

description text

The default is interface name


Interface.

4.

Configure the framing format.

frame-format { esf | sf }

The default is esf.

5.

Set the line coding format.

code { ami | b8zs }

The default is b8zs.

6.

Set the cable type.

cable { long | 0db | -7.5db |


-15db | -22.5db | short | 133ft |
266ft | 399ft | 533ft | 655ft }

The default is long 0db.

7.

Set the interframe filling tag


type.

itf type { 7e | ff }

The default is 0x7E.


By default:

For LOS alarms, the threshold of

8.

Set alarm thresholds.

alarm-threshold { ais { level-1 |


level-2 } | lfa { level-1 | level-2 |
level-3 | level-4 } | los
{ pulse-detection | pulse-recovery }
value }

pulse-detection is 176 and the


threshold of pulse-recovery is
22. If the number of pulses
detected during the total length
of 176 pulse detection intervals
is smaller than 22 (the
pulse-recovery threshold), a
LOS alarm occurs.

Both AIS alarm threshold and

LFA alarm threshold are level-1.

9.

Enable loopback and set the


loopback mode.

loopback { local | payload |


remote }

By default, loopback is disabled.

10. Restore the default settings for


the T1 interface.

default

N/A

11. Bring up the T1 interface.

undo shutdown

By default, a T1 interface is up.

Configuring a BSV interface


A BSV interface can generate basic rate interfaces (BRIs) and digital voice interfaces.

BRIHas the same logical characteristics as an ISDN BRI but can be used for only voice
transmission. You can configure ISDN parameters on a BRI interface.

Digital voice interfaceCan be configured with voice commands. A digital voice interface has two
subinterfaces, which correspond to the two B channels. You cannot configure commands on the
32

subinterfaces, but you can use the display voice subscriber-line line-number.subnumber command
to view the call state of a subinterface.

Configuring a BRI interface


Step

Command

Remarks

1.

Enter system view.

system-view

N/A

2.

Enter BRI interface view.

interface bri interface-number

N/A

3.

(Optional.) Configure a
description for the interface.

description text

The default is interface name


Interface.

4.

(Optional.) Enable loopback


detection for B channels.

loopback { b1 | b2 | both }

By default, loopback detection is


disabled.

5.

(Optional.) Configure the


expected bandwidth of the
interface.

bandwidth bandwidth-value

The default is 0 kbps.

6.

Set the MTU of the interface.

mtu size

The default is 1500 bytes.

7.

Set the polling interval for the


interface.

timer-hold seconds

The default is 10 seconds.

8.

(Optional.) Restore the default


settings for the interface.

default

N/A

9.

Bring up the interface.

undo shutdown

By default, a BRI interface is up.

activate

By default, a BRI interface is not


activated.

10. (Optional.) Activate the


interface.

For more information about these commands, see Interface Command Reference.

Configuring a digital voice interface


The description, shutdown, receive gain, transmit gain, and cng-on commands have the same functions
as those for analog voice interfaces. For more information about those commands, see related sections
in "Configuring analog voice interfaces."

Configuring a timeslot set


Creating a timeslot set
To use an E1 interface, you need to create a timeslot set and configure the signaling type, Then, the
system automatically creates a logical digital voice interface. Timeslot 0 is used for frame synchronization,
timeslot 16 is used to transmit signaling, and the other 30 timeslots are used to transmit voice packets.
A T1 interface is used in a similar way to an E1 interface, except that it has 24 timeslots and timeslot 24
is used to transmit signaling.
Only RS signaling can be configured for a timeslot set.
To create a timeslot set:
33

Step

Command

Remarks

1.

Enter system view.

system-view

N/A

2.

Enter E1 or T1 interface
view.

controller { e1 | t1 } number

N/A

3.

Create a timeslot set and


enable R2 signaling for it.

timeslot-set ts-set-number
timeslot-list timeslots-list signal r2

By default, no timeslot set is created.

Configuring a logical digital voice interface


The system automatically creates a logical voice interface in the form of E1/T1 interface number:timeslot
set number for a timeslot set.
The description, shutdown, receive gain, transmit gain, and cng-on commands for a logical digital voice
interface have the same functions as those for analog voice interfaces. For more information about those
commands, see related sections in "Configuring analog voice interfaces."
To configure a logical digital voice interface:
Step

Command

Remarks

1.

Enter system view.

system-view

N/A

2.

Enter logical digital voice


interface view.

subscriber-line
number:ts-set-number

N/A

pcm { a-law | -law }

The default is a-law for logical


digital voice interfaces of E1
interfaces and -law for logical
digital voice interfaces of T1
interfaces.

3.

Configure a companding law


for PCM.

Configuring R2 signaling
ITU-T recommendations Q.400 through Q.490 define the R2 signaling standards. However, the R2
signaling standards implemented in different countries and regions are ITU variants.
In R2 signaling, the calling side serves as the originating PBX, and the called side serves as the
terminating PBX. Signaling sent by the originating PBX is called forward signaling, and signaling sent by
the terminating PBX is called backward signaling, as shown in Figure 15.
Figure 15 R2 signaling elements

34

R2 signaling include two categories: digital line signaling and interregister signaling. Digital line
signaling conveys status information about E1 trunks to describe whether the trunks are seized, released,
or blocked. Interregister signaling transmits and requests calling and called numbers.

ITU-T digital line signaling


Digital line signaling monitors the state of a trunk and controls calls. It can identify the following state
changes:

The calling party goes off-hook and seizes the line.

The called party goes off-hook and answers the call.

The calling party releases the call.

The called party releases the call.

Digital line signaling sets the line to be idle or seized according to the state of the trunk. This signaling
is transmitted through timeslot 16. The two transmission directions of each line have four bits (A, B, C and
D) as flag bits, with C and D bits fixed to 01. The forward line signaling adopts af and bf bits, and the
backward line signaling adopts ab and bb bits, as shown in Table 2:
Table 2 Line signaling bit description
Bit

Description

Value = 0

Value = 1

af

Identifies the state of the originating device and


indicates the state of the calling line.

Off-hook, seized

On-hook (idle)

bf

Indicates a fault state from the originating side to


the terminating side.

Normal

Faulty

ab

Indicates the state of the called line (on-hook or


off-hook).

Off-hook by called
party

On-hook by called party

bb

Indicates the state of the terminating device (idle


or seized).

Idle

Seized or blocked

Table 3 State code of line signaling


Signaling code
State of the circuit

Forward

Backward

af

bf

ab

bb

Idle or release

Seized

Seizure-ack

Answer

Clear-back

Clear-forward

0/1

Blocked

Unblocked

R2 digital line signaling exchange includes the following processes:

Call establishment.
35

When the circuit is idle, the originating side sends a forward seizure signal (00) to the terminating
side, and the terminating side sends back a seizure acknowledgement signal (11). Then the circuit
is seized, and interregister signaling exchange begins. When the called party picks up the phone,
the terminating side sends a backward answer signal (01). After the originating side recognizes
the received signal, it establishes the call.
Figure 16 Call establishment

Call release at the originating side.


The originating side sends a clear-forward signal 10. When the terminating side recognizes the
clear-forward signal, it sends a backward signal 10. When the originating side recognizes the
backward signal 10, it releases the call.
Figure 17 Call release at originating side

Call release at the terminating side.


The terminating side sends a clear-back signal 11 to the originating side, and the originating side
sends back a clear-forward signal 10. When the terminating side recognizes the forward signal
10, it sends a release-guard signal 10. When the originating side recognizes the release-guard
signal 10, it releases the call.
Figure 18 Call release at terminating side

36

Blocking in idle state or during conversation.

After the originating side receives a blocking signal 11 from the terminating side when the circuit
is idle or during conversation, the circuit is blocked. In this case, the originating side still sends the
forward signal 10 to indicate that the line is idle. When the terminating side unblocks the circuit,
it sends a backward signal 10 to indicate that the line is idle. The originating side maintains the
forward signal 10 and unblocks the local-end circuit for the next call.

ITU-T interregister signaling


Interregister signaling transmits and requests calling and called numbers. It adopts the multi-frequency
compelled (MFC) mode and includes forward signaling and backward signaling. Forward signaling
exchange includes Group I and Group II, and backward signaling exchange includes Group A and
Group B. When the originating side recognizes the seizure acknowledgement signal, interregister
signaling begins to send the first digit of the called number, and waits for the response of Group A
signaling from the terminating side.
Group I forward signalsInclude connection control signals and digit signals.

Table 4 Forward Group I signals


Designation

Basic meaning

I-1 through I-10

Digits 1, 2, 3, 4, 5, 6, 7, 8, 9, and 0, responsible for sending number


information to the terminating side

I-11

Spare for national use

I-12

Request refused

I-13

Connected to tested device

I-14

Spare for national use

I-15

Address identification terminator and pulse terminator (used in


international calls)

Group A backward signalsControl signals used for controlling and acknowledging Group I
forward signals.

Table 5 Group A backward signals


Designation

Basic Meaning

A-1

Send next digit

A-2

Send last but one digit

A-3

Address-complete; changeover to reception of Group B signals

A-4

Congestion in the national network

A-5

Send calling party's category

A-6

Address-complete, charge, and set up speech conditions

A-7

Send last but two digits

A-8

Send last but three digits

A-9

Spare for national use

A-10

Spare for national use

A-11

Send country code indicator

37

Designation

Basic Meaning

A-12

Send language or discrimination digit

A-13

Send nature of circuit

A-14

Request for information on use of an echo canceller (is an incoming half-echo


suppressor required?)

A-15

Congestion in an international exchange; terminate interregister signaling


interaction or at its output

Group II forward signalsIdentify the calling party category. The system looks at the calling party
category to decide whether the calling party can perform forced release or break-in.

Table 6 Group II forward signals


Designation

Basic Meaning

II-1

Subscriber without priority

II-2

Subscriber with priority

II-3

Maintenance equipment

II-4

Spare for national use

II-5

Operator

II-6

Data transmission

II-7

Subscriber (or operator without forward transfer facility), for international use

II-8

Data transmission (for international use)

II-9

Subscriber with priority (for international use)

II-10

Operator with forward transfer facility (for international aid use)

II-11 through II-15

Spare for national use

Group B backward signalsAcknowledge Group II signals and indicate the status of the called
party.

Table 7 Group B backward signals


Designation

Basic Meaning

B-1

Spare for national use

B-2

Send special information tone

B-3

Subscriber line busy

B-4

Congestion

B-5

Unallocated number

B-6

Subscriber line free, charge

B-7

Subscriber line free, no charge

B-8

Subscriber line out of order

B-9 through B-15

Spare for national use

38

Figure 19 shows the exchange process requesting calling party information, which is typical of R2
interregister signaling.
Figure 19 ITU-T R2 interregister signaling exchange process
Originating side
Calling number: 123

Terminating side
Called number 789

Line signaling exchange


Send called number digit 7 (I-7)
Request next digit (A-1)
Send called number digit 8 (I-8)
Request calling party information (A-5)
Send calling accounting category 2 (II-7)
Request calling party information (A-5)
Send calling number digit 1 (I-1)
Request calling party information (A-5)
Send calling number digit 2 (I-2)
Request calling party information (A-5)
Send calling number digit 3 (I-3)
Request calling party information (A-5)
Send number terminator (I-15)
Request next digit (A-1)
Send called number digit 8 (I-9)
All digits are received completely (A-3)
Send calling service category 2 (II-2)
Subscriber idle and charging starts (B-6)
Line signaling exchange

Configuring basic R2 signaling parameters


Configuring the R2 signaling standard
For the device to perform R2 signaling exchange with devices in a specific country or region, you need
to specify the R2 signaling standard of that country or region.
To configure the R2 signaling standard:
Step

Command

Remarks

1.

Enter system view.

system-view

N/A

2.

Enter E1 or T1 interface view.

controller { e1 | t1 } number

N/A

3.

Create a timeslot set and


enable R2 signaling for it.

timeslot-set ts-set-number
timeslot-list timeslots-list signal r2

By default, no timeslot set is


created.

4.

Enter R2 CAS view.

cas ts-set-number

N/A

5.

Specify the R2 signaling


standard.

mode zone-name
[ default-standard ]

By default, the ITU-T standard is


adopted.

39

Configuring the trunk direction and routing mode


Step

Command

Remarks

1.

Enter system view.

system-view

N/A

2.

Enter E1 or T1 interface view.

controller { e1 | t1 } number

N/A

3.

Create a timeslot set and


enable R2 signaling for it.

timeslot-set ts-set-number
timeslot-list timeslots-list signal r2

By default, no timeslot set is


created.

4.

Enter R2 CAS view.

cas ts-set-number

N/A
The default is dual.

5.

Configure the trunk direction.

trunk-direction timeslots
timeslots-list { dual | in | out }

6.

Configure the routing mode.

select-mode { max | maxpoll | min


| minpoll }

You cannot configure the in or out


direction on both ends of a trunk. If
you configure the dual direction on
both ends, you need to configure
different routing modes on the two
ends by using the select-mode
command to prevent timeslot
contention.
The default is min.

Configuring the terminating side to send busy tones to the originating side
Step

Command

Remarks

1.

Enter system view.

system-view

N/A

2.

Enter E1 or T1 interface view.

controller { e1 | t1 } number

N/A

3.

Create a timeslot set and


enable R2 signaling for it.

timeslot-set ts-set-number
timeslot-list timeslots-list signal r2

By default, no timeslot set is


created.

4.

Enter R2 CAS view.

cas ts-set-number

N/A

5.

6.

Configure the terminating side


to send busy tones to the
originating side.

Configure the duration for


playing busy or ringback
tones.

By default, the terminating side


sends busy tones to the originating
side.
send ringbusy enable

timer { ringback | ringbusy } time

If you want the originating side to


play busy tones, execute the undo
send ringbusy enable command on
the terminating side.
By default, the duration for playing
a ringback tone is 60000
milliseconds, and the duration for
playing a busy tone is 30000
milliseconds.
This command takes effect only
after you configure the send
ringbusy enable command.
This command takes effect only on
the terminating side.

40

Enabling DTMF to receive and send numbers


R2 signaling has two modes to send and receive numbers:

MFCThe originating and terminating sides use interregister signaling to transmit and request
number information, including the calling number, line information, and billing. In the exchange
process, the terminating side sends responses to the originating side.

DTMFThe originating side transmits the called number to the terminating side digit by digit. The
terminating side does not send any responses.

Compared with the MFC mode, the DTMF mode has a faster connection speed but transmits a smaller
amount of information.
To enable DTMF to receive and send numbers:
Step

Command

Remarks

1.

Enter system view.

system-view

N/A

2.

Enter E1 or T1 interface view.

controller { e1 | t1 } number

N/A

3.

Create a timeslot set and


enable R2 signaling for it.

timeslot-set ts-set-number
timeslot-list timeslots-list signal r2

By default, no timeslot set is


created.

4.

Enter R2 CAS view.

cas ts-set-number

N/A
By default, MFC mode is used.

5.

Enable DTMF to receive and


send numbers.

6.

Configure the delay before


sending DTMF tones.

dtmf enable

Configure the same mode on the


originating and terminating
devices. Otherwise, call
establishment will fail.
The default is 50 milliseconds.

timer dtmf-delay time

This command takes effect only


when the dtmf enable command
has been configured.

Configuring the connection mode


There are two connection modes:

terminalAfter receiving the called number, the terminating side must wait for the real state (busy
or idle) of the called party before returning the corresponding interregister information to the
originating side.

segmentAfter receiving the called number, the terminating side directly returns the "called party
idle" interregister signaling, without waiting for the real state of the terminating side. If the called
party is busy, the terminating side plays busy tones to the originating side.

To configure the connection mode:


Step

Command

Remarks

1.

Enter system view.

system-view

N/A

2.

Enter E1 or T1 interface view.

controller { e1 | t1 } number

N/A

3.

Create a timeslot set and


enable R2 signaling for it.

timeslot-set ts-set-number timeslot-list


timeslots-list signal r2

By default, no timeslot set is


created.

4.

Enter R2 CAS view.

cas ts-set-number

N/A

41

Step
5.

Configure the connection


mode.

Command

Remarks

callmode { terminal | segment }

By default, the terminal


mode is used.

Maintaining specified timeslots


Step

Command

Remarks

1.

Enter system view.

system-view

N/A

2.

Enter E1 or T1 interface view.

controller { e1 | t1 } number

N/A

3.

Create a timeslot set and


enable R2 signaling for it.

timeslot-set ts-set-number timeslot-list


timeslots-list signal r2

By default, no timeslot
set is created.

4.

Enter R2 CAS view.

cas ts-set-number

N/A

5.

Maintain specified timeslots.

ts { block | open | query | reset } timeslots


timeslots-list

N/A

Configuring R2 digital line signaling


Step

Command

Remarks

1.

Enter system view.

system-view

N/A

2.

Enter E1 or T1 interface view.

controller { e1 | t1 } number

N/A

3.

Create a timeslot set and


enable R2 signaling for it.

timeslot-set ts-set-number
timeslot-list timeslots-list signal r2

By default, no timeslot set is


created.

4.

Enter R2 CAS view.

cas ts-set-number

N/A

5.

Configure the originating side


to require the terminating side
to send answer signals.

answer enable

By default, the originating side


requires the terminating side to
send answer signals.

Enable re-answer signal


processing on the originating
side.

re-answer enable

By default, re-answer signal


processing is disabled on the
originating side.

Configure the terminating side


to send clear-back signals
when the originating side first
disconnects the line.

clear-forward-ack enable

By default, the terminating side


does not send clear-back signals
when the originating side first
disconnects the line.

8.

Enable metering signal


processing.

metering enable

By default, metering signal


processing is disabled.

9.

Configure the originating side


to require the terminating side
to send seizure
acknowledgement signals.

seizure-ack enable

By default, the originating side


requires the terminating side to
send seizure acknowledgement
signals.

6.

7.

10. Configure the ABCD bit


pattern for line signals.

dl-bits { answer | blocking |


clear-back | clear-forward | idle |
release-guard | seizing |
seizing-ack } { receive | transmit }
ABCD
42

The defaults are the values of the


ITU-T standard.
For specific default values, see this
command in Voice Command
Reference.

Step

Command

Remarks

11. Configure the C and D signal


bits.

renew ABCD

The default depends on the R2


signaling standard (configured by
using the mode command).

12. Configure line signal


inversion mode.

reverse ABCD

The default is 0000, that is, line


signal inversion is disabled.
By default, the timeout time is:

60000 milliseconds for answer


13. Set the timeout time of line
signals.

timer dl { answer | clear-back |


clear-forward | | re-answer |
release-guard | seizing } time

signals.

10000 milliseconds for

clear-back, clear-forward, and


release-guard signals.

1000 milliseconds for seizing


and re-answer signals.

Configuring R2 interregister signaling


Step

Command

Remarks

1.

Enter system view.

system-view

N/A

2.

Enter E1 or T1 interface view.

controller { e1 | t1 } number

N/A

3.

Create a timeslot set and


enable R2 signaling for it.

timeslot-set ts-set-number
timeslot-list timeslots-list signal r2

By default, no timeslot set is


created.

4.

Enter R2 CAS view.

cas ts-set-number

N/A

5.

Configure the terminating side


to request calling party
information (calling category
and calling number) from the
originating side.

ani { all | ka }

By default, the terminating side


does not request calling party
information.

Configure the number of


dialed digits that the
terminating side collects
before requesting calling
party information.

ani-digit number

The default is 1.

Use Group B signals to


complete interregister
signaling exchange.

group-b enable

By default, Group B signals are


used.

final-callednum enable

By default, the originating side


does not send a number terminator
to the terminating side after
sending the called number.

6.

7.

8.

9.

Configure the originating side


to send a number terminator
to the terminating side after
sending the called number.

Configure a signal code for a


special character.

special-character character
number

43

By default, no signal code is


configured for a special character.
To configure signal codes for more
special characters, repeat this
command.

Step

Command

Remarks

10. Configure interregister signal


values.

register-value { billingcategory |
callcreate-in-groupa |
callingcategory | congestion |
demand-refused | digit-end |
null-number | req-billingcategory
|
req-callednum-and-switchgroupa
| req-callingcategory |
req-currentcallednum-in-groupc |
req-currentdigit |
req-firstcallednum-in-groupc |
req-firstcallingnum | req-firstdigit
| req-lastfirstdigit |
req-lastseconddigit |
req-lastthirddigit |
req-nextcallednum |
req-nextcallingnum |
req-switch-groupb |
subscriber-abnormal
|subscriber-busy |
subscriber-charge
|subscriber-idle } value

The defaults depend on the R2


signaling standard (configured by
using the mode command).

11. Configure the duration of


register pulse signals.

timer register-pulse time

The default is 150 milliseconds.

12. Configure the maximum time


to wait for a Group B signal.

timer group-b time

The default is 30000 milliseconds.

Configuring the ISDN protocol


To use an E1 interface as an ISDN PRI, you need to create a PRI set by bundling timeslots other than
timeslots 0 and 16. Timeslot 0 is used to transmit synchronization information, and timeslot 16 is used as
the D channel for signaling transmission. For each PRI set, the system generates a serial interface and a
logical digital voice interface. The serial interface is named serial interface-number:15, where
interface-number is the number of the E1 interface. The serial interface has the same logical
characteristics as synchronous serial interfaces and can be configured with ISDN settings.
A T1 interface is used in the same way as an E1 interface, except that it has 24 timeslots and timeslot 24
is used as the D channel for signaling transmission.
For more information about the ISDN protocol, see Layer 2WAN Configuration Guide.
To configure the ISDN protocol:
Step

Command

1.

Enter system view.

system-view

2.

Enter E1 or T1 interface view.

controller { e1 | t1 } number

3.

Bundle timeslots into a PRI set.

pri-set [ timeslots-list range ]

44

Binding a digital voice interface to a POTS entity


Step

Command

Remarks

1.

Enter system view.

system-view

N/A

2.

Enter voice view.

voice-setup

N/A

3.

Enter voice dial program


view.

dial-program

N/A

4.

Create a POTS entity and


enter POTS entity view.

entity entity-number pots

N/A

For E1 and T1 interfaces:


5.

Bind a digital voice interface


to the POTS entity.

line line-number:{ ts-set-number


| 15 | 23 }

For BSV interfaces:

By default, no digital voice


interface is bound to the POTS
entity.

line line-number:

Displaying and maintaining digital voice interfaces


Execute display commands in any view.
Task

Command

Display digital voice interfaces (for E1


or T1 interfaces).

display voice subscriber line line-number:{ ts-set-number |


ts-set-number.sub-timeslot | 15 | 23 }

Display digital voice interfaces (for


BSV interfaces).

display voice subscriber line { line-number |


ts-set-number.subnumber }

Digital voice interface configuration examples


This section provides configuration examples for digital voice interfaces.

R2 signaling configuration example


Network requirements
As shown in Figure 20, configure R2 signaling on the routers so the telephones can call each other.

45

Figure 20 Network diagram

Configuration procedure
1.

Configure Router A:
# Configure the IP address 1.1.1.1/24 for interface GigabitEthernet 0/0.
<RouterA> system-view
[RouterA] interface GigabitEthernet 0/0
[RouterA-GigabitEthernet0/0] ip address 1.1.1.1 255.255.255.0
[RouterA-GigabitEthernet0/0] quit

# Create a timeslot set on interface E1 5/0.


[RouterA] controller e1 5/0
[RouterA-E1 5/0] timeslot-set 1 timeslot-list 1-31 signal r2
[RouterA-E1 5/0] quit

# Configure the local number 0101001 for POTS entity 1001, and bind the digital voice interface
line 5/0:1 to the POTS entity.
[RouterA-voice-dial] entity 1001 pots
[RouterA-voice-dial-entity1001] match-template 0101001
[RouterA-voice-dial-entity1001] line 5/0:1
[RouterA-voice-dial-entity1001] send-number all
[RouterA-voice-dial-entity1001] quit

# Configure the local number 0101002 for PORTS entity 1002, and bind the digital voice
interface line 5/0:1 to the POTS entity.
[RouterA-voice-dial] entity 1002 pots
[RouterA-voice-dial-entity1002] match-template 0101002
[RouterA-voice-dial-entity1002] line 5/0:1
[RouterA-voice-dial-entity1002] send-number all
[RouterA-voice-dial-entity1002] quit

# Configure the called number template 0755. for VoIP entity 0755, and configure the
destination IP address as 2.2.2.2.
[RouterA-voice-dial] entity 0755 voip
[RouterA-voice-dial-entity755] match-template 0755....
[RouterA-voice-dial-entity755] address sip ip 2.2.2.2

2.

Configure Router B:
# Configure the IP address 2.2.2.2/24 for interface GigabitEthernet 0/0.
<RouterB> system-view
[RouterB] interface GigabitEthernet 0/0
[RouterB-GigabitEthernet0/0] ip address 2.2.2.2 255.255.255.0

46

[RouterB-GigabitEthernet0/0] quit

# Create a timeslot set on interface E1 5/0.


[RouterB] controller e1 5/0
[RouterB-E1 5/0] timeslot-set 1 timeslot-list 1-31 signal r2
[RouterB-E1 5/0] quit

# Configure the local number 07552001 for POTS entity 2001, and bind the digital voice
interfaces line 5/0:1 to the POTS entity.
[RouterB] voice-setup
[RouterB-voice] dial-program
[RouterB-voice-dial] entity 2001 pots
[RouterB-voice-dial-entity2001] match-template 07552001
[RouterB-voice-dial-entity2001] line 5/0:1
[RouterB-voice-dial-entity2001] send-number all
[RouterB-voice-dial-entity2001] quit

# Configure the local number 07552002 for POTS entity 2002, and bind the digital voice
interfaces line 5/0:1 to the POTS entity.
[RouterB-voice-dial] entity 2002 pots
[RouterB-voice-dial-entity2002] match-template 07552002
[RouterB-voice-dial-entity2002] line 5/0:1
[RouterB-voice-dial-entity2002] send-number all
[RouterB-voice-dial-entity2002] quit

# Configure the called number template 010. for VoIP entity 010, and configure the destination
IP address as 1.1.1.1.
[RouterB-voice-dial] entity 010 voip
[RouterB-voice-dial-entity10] match-template 010....
[RouterB-voice-dial-entity10] address ip 1.1.1.1

Verifying the configuration


The telephones can call each other through R2 signaling. You can use the display voice subscriber-line
command to view information about digital voice interfaces.

E1 DSS1 signaling configuration example


Network requirements
As shown in Figure 21, the routers connect to the PBXs through E1 interfaces.
Configure DSS1 signaling on the routers so the telephones can call each other.

47

Figure 21 Network diagram

Configuration procedure
1.

Configure Router A:
# Configure the IP address 1.1.1.1/24 for interface GigabitEthernet 0/0.
<RouterA> system-view
[RouterA] interface GigabitEthernet 0/0
[RouterA-GigabitEthernet0/0] ip address 1.1.1.1 255.255.255.0
[RouterA-GigabitEthernet0/0] quit

# Bundle the timeslots on interface E1 5/0 into a PRI set.


[RouterA] controller e1 5/0
[RouterA-E1 5/0] pri-set
[RouterA-E1 5/0] quit

# Configure the local number 0101001 for POTS entity 1001, and bind the digital voice
interfaces line 5/0:15 to the POTS entity.
[RouterA] voice-setup
[RouterA-voice] dial-program
[RouterA-voice-dial] entity 1001 pots
[RouterA-voice-dial-entity1001] match-template 0101001
[RouterA-voice-dial-entity1001] line 5/0:15
[RouterA-voice-dial-entity1001] send-number all
[RouterA-voice-dial-entity1001] quit

# Configure the local number 0101002 for POTS entity 1002, and bind the digital voice
interfaces line 5/0:15 to the POTS voice entity.
[RouterA-voice-dial] entity 1002 pots
[RouterA-voice-dial-entity1002] match-template 0101002
[RouterA-voice-dial-entity1002] line 5/0:15
[RouterA-voice-dial-entity1002] send-number all
[RouterA-voice-dial-entity1002] quit

# Configure the called number template 0755. for VoIP entity 0755, and configure the
destination IP address as 2.2.2.2.
[RouterA-voice-dial] entity 0755 voip
[RouterA-voice-dial-entity755] match-template 0755....
[RouterA-voice-dial-entity755] address ip 2.2.2.2

2.

Configure Router B:
# Configure the IP address 2.2.2.2/24 for interface GigabitEthernet 0/0.
<RouterB> system-view

48

[RouterB] interface GigabitEthernet 0/0


[RouterB-GigabitEthernet0/0] ip address 2.2.2.2 255.255.255.0
[RouterB-GigabitEthernet0/0] quit

# Bundle the timeslots on interface E1 5/0 into a PRI set.


[RouterB] controller e1 5/0
[RouterB-E1 5/0] pri-set
[RouterB-E1 5/0] quit

# Configure the local number 07552001 for POTS entity 2001, and bind the digital voice
interfaces line 5/0:15 to the POTS entity.
[RouterB] voice-setup
[RouterB-voice] dial-program
[RouterB-voice-dial] entity 2001 pots
[RouterB-voice-dial-entity2001] match-template 07552001
[RouterB-voice-dial-entity2001] line 5/0:15
[RouterB-voice-dial-entity2001] send-number all
[RouterB-voice-dial-entity2001] quit

# Configure the local number 07552002 for POTS entity 2002, and bind the digital voice
interfaces line 5/0:15 to the POTS entity.
[RouterB-voice-dial] entity 2002 pots
[RouterB-voice-dial-entity2002] match-template 07552002
[RouterB-voice-dial-entity2002] line 5/0:15
[RouterB-voice-dial-entity2002] send-number all
[RouterB-voice-dial-entity2002] quit

# Configure the called number template 010. for VoIP entity 010, and configure the destination
IP address as 1.1.1.1.
[RouterB-voice-dial] entity 010 voip
[RouterB-voice-dial-entity10] match-template 010....
[RouterB-voice-dial-entity10] address ip 1.1.1.1

Verifying the configuration


The telephones can call each other through DSS1 signaling. You can use the display voice
subscriber-line command to view information about digital voice interfaces.

BSV DSS1 signaling configuration example


Network requirements
As shown in Figure 21, the routers connect to the PBXs through BSV interfaces.
Configure DSS1 signaling on the routers so the telephones can call each other.

49

Figure 22 Network diagram

Configuration procedure
1.

Configure Router A:
# Configure the IP address 1.1.1.1/24 for interface GigabitEthernet 0/0.
<RouterA> system-view
[RouterA] interface GigabitEthernet 0/0
[RouterA-GigabitEthernet0/0] ip address 1.1.1.1 255.255.255.0
[RouterA-GigabitEthernet0/0] quit

# Configure the local number 0101001 for POTS entity 1001, and bind the digital voice
interfaces line 1/1 to the POTS entity.
[RouterA] voice-setup
[RouterA-voice] dial-program
[RouterA-voice-dial] entity 1001 pots
[RouterA-voice-dial-entity1001] match-template 0101001
[RouterA-voice-dial-entity1001] line 1/1
[RouterA-voice-dial-entity1001] send-number all
[RouterA-voice-dial-entity1001] quit

# Configure the local number 0101002 for POTS entity 1002, and bind the digital voice
interfaces line 1/1 to the POTS entity.
[RouterA-voice-dial] entity 1002 pots
[RouterA-voice-dial-entity1002] match-template 0101002
[RouterA-voice-dial-entity1002] line 1/1
[RouterA-voice-dial-entity1002] send-number all
[RouterA-voice-dial-entity1002] quit

# Configure the called number template 0755. for VoIP entity 0755, and configure the
destination IP address as 2.2.2.2.
[RouterA-voice-dial] entity 0755 voip
[RouterA-voice-dial-entity755] match-template 0755....
[RouterA-voice-dial-entity755] address sip 2.2.2.2

2.

Configure Router B:
# Configure the IP address 2.2.2.2/24 for interface GigabitEthernet 0/0.
<RouterB> system-view
[RouterB] interface GigabitEthernet 0/0
[RouterB-GigabitEthernet0/0] ip address 2.2.2.2 255.255.255.0
[RouterB-GigabitEthernet0/0] quit

50

# Configure the local number 07552001 for POTS entity 2001, and bind the digital voice
interfaces line 1/1 to the POTS entity.
[RouterB] voice-setup
[RouterB-voice] dial-program
[RouterB-voice-dial] entity 2001 pots
[RouterB-voice-dial-entity2001] match-template 07552001
[RouterB-voice-dial-entity2001] line 1/1
[RouterB-voice-dial-entity2001] send-number all
[RouterB-voice-dial-entity2001] quit

# Configure the local number 07552002 for POTS entity 2002, and bind the digital voice
interfaces line 1/1 to the POTS entity.
[RouterB-voice-dial] entity 2002 pots
[RouterB-voice-dial-entity2002] match-template 07552002
[RouterB-voice-dial-entity2002] line 1/1
[RouterB-voice-dial-entity2002] send-number all
[RouterB-voice-dial-entity2002] quit

# Configure the called number template 010. for VoIP entity 010, and configure the destination
IP address as 1.1.1.1.
[RouterB-voice-dial] entity 010 voip
[RouterB-voice-dial-entity10] match-template 010....
[RouterB-voice-dial-entity10] address ip 1.1.1.1

Verifying the configuration


The telephones can call each other through DSS1 signaling. You can use the display voice
subscriber-line command to view information about digital voice interfaces.

51

Configuring voice entities


Overview
Voice entities include POTS and VoIP entities:

POTS entityA local POTS entity connects to a local telephone and maintains local number
information. A trunk POTS entity connects to the PSTN and maintains call destination information.

VoIP entityConnects to the IP side and maintains the called information such as the called
number and call destination.. A VoIP entity can use SIP to make VoIP calls.

Figure 23 Voice entities


PBX

Router A

Router B

PSTN
Local POTS
entity

IP

Trunk POTS entity

POTS entity

VoIP entity

Configuring a POTS entity


This section covers the procedures for creating and configuring a POTS entity.

Configuration task list


To configure a POTS entity, perform the following tasks:
Tasks at a glance
(Required.) Creating a POTS entity and configuring basic parameters
(Optional.) Configuring codecs for a POTS entity
(Optional.) Configuring a POTS entity to register with the registrar
(Optional.) Configuring DTMF for a POTS entity
(Optional.) Enabling VAD for a POTS entity
(Optional.) Configuring options related to dial program

52

Creating a POTS entity and configuring basic parameters


Step

Command

Remarks

1.

Enter system view.

system-view

N/A

2.

Enter voice view.

voice-setup

N/A

3.

Enter dial program view.

dial-program

N/A

4.

Create a POTS entity and enter


POTS entity view.

entity entity-number pots

By default, no POTS voice


entities exist.

5.

(Optional.) Configure a description


for the POTS entity.

description string

By default, no description is
configured.
By default, no number template
is configured for the POTS
entity.
The POTS entity uses the number
template to match phone
numbers. For example, the
match-template 20 command
matches all numbers beginning
with 20.

6.

Configure a number template for


the POTS entity.

match-template match-string

7.

Bind a voice interface to the POTS


entity.

line line-number

By default, no voice interface is


bound to the POTS entity.

8.

Enable the POTS entity.

undo shutdown

By default, a POTS entity is


enabled.

Configuring codecs for a POTS entity


By default, a POTS entity has four codecs g729r8, g711alaw, g711ulaw, and g723r53 in descending
order of priority.
You can use one of the following methods to configure codecs for a POTS entity:

Method 1: Configure codecs for a POTS entity.

Method 2: Create a codec template, assign priorities to codecs in the codec template, and bind the
codec template to a POTS entity.

Two parties must have the same codecs to communicate with each other. You can use the display voice
sip call command (see Voice Command Reference) to view the codec used by two parties.
To configure codecs for a POTS entity (method 1):
Step

Command

Remarks

1.

Enter system view.

system-view

N/A

2.

Enter voice view.

voice-setup

N/A

3.

Enter dial program view.

dial-program

N/A

4.

Create a POTS entity and


enter POTS entity view.

entity entity-number pots

N/A

53

Step
5.

Configure a codec for the


POTS entity.

Command

Remarks

codec { g711alaw | g711ulaw |


g723r53 | g723r63 | g726r16 |
g726r24 | g726r32 | g726r40 |
g729a | g729br8 | g729r8 }
[ bytes payload-size ]

By default, no codecs are


configured.

To configure codecs for a POTS entity (method 2):


Step

Command

Remarks

1.

Enter system view.

system-view

N/A

2.

Enter voice view.

voice-setup

N/A

3.

Create a codec template.

voice class codec tag

By default, no codec templates


exist.

Assign a priority to a codec in


the codec template.

codec preference priority


{ g711alaw | g711ulaw |
g723r53 | g723r63 | g726r16 |
g726r24 | g726r32 | g726r40 |
g729a | g729br8 | g729r8 }
[ bytes payload-size ]

5.

Return to voice view.

quit

N/A

6.

Enter dial program view.

dial-program

N/A

7.

Create a POTS entity and


enter POTS entity view.

entity entity-number pots

N/A

8.

Bind the codec template to the


POTS entity.

voice-class codec tag

By default, the binding does not


exist.

4.

By default, no codecs exist in a


template.
Repeat this command to assign
priorities to more codecs.

Configuring a POTS entity to register with the registrar


Step

Command

Remarks

1.

Enter system view.

system-view

N/A

2.

Enter voice view.

voice-setup

N/A

3.

Enter dial program view.

dial-program

N/A

4.

Create a POTS entity and


enter POTS entity view.

entity entity-number pots

N/A

5.

Configure the POTS entity to


register with the registrar
server.

By default, a POTS entity initiates a


registration to the registrar server
after the SIP registration
configuration is complete.
register number

54

If you do not want to register a


number or you want to deregister a
number from the registrar server,
you can use the undo register
number command.

Configuring DTMF for a POTS entity


There are two ways to transmit DTMF tones: in-band signaling and out-of-band signaling.
In-band signaling sends DTMF tones in RTP packets, and out-of-band signaling sends DTMF tones in SIP
messages, or RFC 2883-compliant RTP messages (NTE mode).
To use NTE mode, configure the outband nte command and the same payload type value on the
originating and terminating sides. Otherwise, DTMF tones might fail to be transmitted. For more
information about out-of-band DTMF, see "Configuring SIP."
To configure DTMF for a POTS entity:
Step

Command

Remarks

1.

Enter system view.

system-view

N/A

2.

Enter voice view.

voice-setup

N/A

3.

Enter dial program view.

dial-program

N/A

4.

Create a POTS entity and


enter POTS entity view.

entity entity-number pots

N/A

(Method 1) Configure NTE

Use either method.

mode:
{

5.

Configure out-of-band DTMF


transmission.

Enable NTE mode:


outband nte
Configure the value of the
payload type used by NTE:
rtp payload-type nte value

(Method 2) Configure SIP


mode:
outband sip

By default, in-band transmission is


adopted, and the value of the
payload type used by NTE is 101.
When the device is connected to a
device from another vendor, you
cannot set the payload type field to
any value forbidden by that
device. Otherwise, an NTE
negotiation failure might occur.

Enabling VAD for a POTS entity


The voice activity detection (VAD) discriminates between silence and speech on a voice connection
according to their energies. With VAD, a POTS entity does not generate traffic during periods of silence.
To enable VAD for a POTS entity:
Step

Command

Remarks

1.

Enter system view.

system-view

N/A

2.

Enter voice view.

voice-setup

N/A

3.

Enter dial program view.

dial-program

N/A

4.

Create a POTS entity and


enter POTS entity view.

entity entity-number pots

N/A
By default, VAD is disabled.

5.

Enable VAD.

vad-on [ g723r53 | g723r63 |


g729a | g729r8 ] *

55

The G.711 and G.726 codecs do


not support VAD. The G.729br8
codec always supports VAD.

Configuring options related to dial program


Step

Command

Remarks

1.

Enter system view.

system-view

N/A

2.

Enter voice view.

voice-setup

N/A

3.

Enter dial program view.

dial-program

N/A

4.

Create a POTS entity and


enter POTS entity view.

entity entity-number pots

N/A

5.

Configure permitted calling


numbers.

caller-permit calling-string

Optional.
By default, the voice entity permits all calling
numbers.
Optional.

Configure the priority of the


POTS entity.

priority priority-order

7.

Bind a number substitution


rule list to the voice entity.

substitute { called |
calling } list-number

By default, no number substitution rule list is


bound to a voice entity (no number
substitution is performed).

8.

Bind a subscriber group to


the voice entity.

caller-group { deny |
permit } group-id

By default, no subscriber group is bound to


the voice entity (any calling number is
allowed to originate calls).

9.

Configure the number


sending mode.

send-number
{ digit-number | all |
truncate }

By default, the truncate mode is used.

6.

By default, the priority level is 0.


The smaller the number, the higher the
priority.

For more information about the above commands, see "Configuring dial programs."

Configuring a VoIP entity


This section covers the procedures for creating and configuring a VoIP entity.

Configuration task list


To configure a VoIP entity, perform the following tasks:
Tasks at a glance
(Required.) Creating a VoIP entity and configuring basic parameters
(Optional.) Configuring codecs for a VoIP entity
(Optional.) Configuring DTMF for a VoIP entity
(Optional.) Enabling VAD for a VoIP entity
(Optional.) Configuring options related to dial program

56

Creating a VoIP entity and configuring basic parameters


Step

Command

Remarks

1.

Enter system view.

system-view

N/A

2.

Enter voice view.

voice-setup

N/A

3.

Enter dial program view.

dial-program

N/A

4.

Create a VoIP entity and enter


VoIP entity view.

entity entity-number voip

By default, no VoIP voice entities


exist.

5.

(Optional.) Configure a
description for the VoIP entity.

description string

By default, no description is
configured.
By default, no number template is
configured for the POTS entity.

Configure a number template


for the POTS entity.

6.

match-template match-string

7.

Configure the destination IP


address.

address sip ip ip-address [ port


port-number ]

8.

Enable the VoIP entity.

undo shutdown

The POTS entity uses the number


template to match phone numbers.
For example, the match-template
20 command matches all numbers
beginning with 20.
By default, no destination IP
address is configured.
For more information about this
command, see Voice Command
Reference.
By default, a VoIP entity is enabled.

Configuring codecs for a VoIP entity


By default, a VoIP entity has four codecs g729r8, g711alaw, g711ulaw, and g723r53 in descending
order of priority.
You can use one of the following methods to configure codecs for a VoIP entity:

Method 1: Configure codecs directly for a VoIP entity.

Method 2: Create a codec template, assign priorities to codecs in the codec template, and bind the
codec template to a VoIP entity.

Two parties must have the same codecs to communicate with each other. You can use the display voice
sip call command (see Voice Command Reference) to view the codec used by two parties.
To configure codecs for a VoIP entity (method 1):
Step

Command

Remarks

1.

Enter system view.

system-view

N/A

2.

Enter voice view.

voice-setup

N/A

3.

Enter dial program view.

dial-program

N/A

4.

Create a VoIP entity and enter


VoIP entity view.

entity entity-number voip

N/A

57

Step
5.

Specify a codec for the VoIP


entity.

Command

Remarks

codec { g711alaw | g711ulaw |


g723r53 | g723r63 | g726r16 |
g726r24 | g726r32 | g726r40 |
g729a | g729br8 | g729r8 }
[ bytes payload-size ]

By default, no codecs are


configured.

To configure codecs for a VoIP entity (method 2):


Step

Command

Remarks

1.

Enter system view.

system-view

N/A

2.

Enter voice view.

voice-setup

N/A

3.

Create a codec template.

voice class codec tag

By default, no codec templates


exist.

Assign a priority to a codec in


the codec template.

codec preference priority


{ g711alaw | g711ulaw |
g723r53 | g723r63 | g726r16 |
g726r24 | g726r32 | g726r40 |
g729a | g729br8 | g729r8 }
[ bytes payload-size ]

5.

Return to voice view.

quit

N/A

6.

Enter dial program view.

dial-program

N/A

7.

Create a VoIP entity and enter


VoIP entity view.

entity entity-number voip

N/A

8.

Bind the codec template to the


VoIP entity.

voice-class codec tag

By default, the binding does not


exist.

4.

By default, no codecs exist in a


template.
Repeat this command to assign
priorities to more codecs.

Configuring DTMF for a VoIP entity


There are two ways to transmit DTMF tones: in-band signaling and out-of-band signaling.
In-band signaling sends DTMF tones in RTP packets, and out-of-band signaling sends DTMF tones in SIP
messages, or RFC 2883-compliant RTP messages (NTE mode).
To use the NTE mode, configure command outband nte and the same payload type value on both the
originating and terminating sides. Otherwise, DTMF tones might fail to be transmitted. For more
information about out-of-band DTMF, see "Configuring SIP."
To configure DTMF for a VoIP entity:
Step

Command

Remarks

1.

Enter system view.

system-view

N/A

2.

Enter voice view.

voice-setup

N/A

3.

Enter dial program view.

dial-program

N/A

4.

Create a POTS entity and


enter POTS entity view.

entity entity-number pots

N/A

58

Step

Command

Remarks

(Method 1) Configure NTE

Use either method.

mode:
{

5.

Configure out-of-band DTMF .

Enable NTE mode:


outband nte
Configure the value of the
payload type used by NTE:
rtp payload-type nte value

(Method 2) Configure SIP


mode:
outband sip

By default, inband transmission is


adopted, and the value of the
payload type used by NTE is 101.
When the device is connected to a
device from another vendor, you
cannot set the payload type field to
any value forbidden by that
device. Otherwise, an NTE
negotiation failure might occur.

Enabling VAD for a VoIP entity


The voice activity detection (VAD) discriminates between silence and speech on a voice connection
according to their energies. With VAD, a POTS entity does not generate traffic during periods of silence
in an active voice connection.
To enable VAD:
Step

Command

Remarks

1.

Enter system view.

system-view

N/A

2.

Enter voice view.

voice-setup

N/A

3.

Enter dial program view.

dial-program

N/A

4.

Create a VoIP entity and enter


VoIP entity view.

entity entity-number voip

N/A
By default, VAD is disabled.

5.

Enable VAD.

vad-on [ g723r53 | g723r63 |


g729a | g729r8 ] *

The G.711 and G.726 codecs do


not support VAD. The G.729br8
codec always supports VAD.

Configuring options related to dial program


Step

Command

Remarks

1.

Enter system view.

system-view

N/A

2.

Enter voice view.

voice-setup

N/A

3.

Enter dial program view.

dial-program

N/A

4.

Create a VoIP entity and


enter VoIP entity view.

entity entity-number voip

N/A

5.

(Optional.) Configure the


permitted calling numbers.

caller-permit calling-string

Optional.

59

By default, the voice entity permits all calling


numbers.

Step

Command

Remarks
Optional.

Configure the priority of the


VoIP entity.

priority priority-order

7.

Bind a number substitution


rule list to the VoIP entity.

substitute { called |
calling } list-number

By default, no number substitution rule list is


bound to a VoIP entity (no number
substitution is performed).

8.

Bind a subscriber group to


the VoIP entity.

caller-group { deny |
permit } group-id

By default, no subscriber group is bound to a


VoIP entity (any calling number is allowed to
originate calls).

6.

By default, the priority level is 0.


The smaller the number, the higher the
priority.

For more information about the above commands, see "Configuring dial programs."

Displaying and maintaining voice entities


Execute display commands in any view.
Task

Command

Display voice call information.

display voice call-info { tag | all }

Display the configuration of voice entities.

display voice entity { entity-tag | all | pots | voip }

60

Configuring dial programs


This chapter describes using dial programs to define call control policies such as caller control, number
substitution, call sending, and number match policies.

Configuration task list


Tasks at a glance
(Optional.) Configuring caller control
(Optional.) Configuring caller group control
(Optional.) Enabling private line auto ring-down
(Optional.) Configuring a number match mode
(Optional.) Configuring the maximum number of total calls allowed by a voice entity
(Optional.) Configuring number substitution
(Optional.) Configuring a priority for a voice entity
(Optional.) Configuring a number sending mode
(Optional.) Configuring a dial prefix

Configuring caller control


Caller control allows you to filter outgoing calls on the calling side or filter incoming calls on the called
side based on calling numbers.

Procedure
To configure caller control:
Step

Command

Remarks

1.

Enter system view.

system-view

N/A

2.

Enter voice view.

voice-setup

N/A

3.

Enter dial program view.

dial-program

N/A

4.

Create a voice entity and


enter voice entity view.

entity entity-number { pots | voip }

N/A

61

Step

Command

Remarks
By default, the voice entity permits
all calling numbers.

5.

Configure permitted calling


numbers.

caller-permit calling-string

The calling-string argument is in the


format of { [ + ] string [ $ ] }| $. For
details, see Voice Command
Reference.

Examples
As shown in Figure 24, configure caller control to permit only the number 1000 to call the number 2000.
Figure 24 Caller control diagram

You can configure caller control either on the calling side or on the called side to meet the requirement.

Method 1: Configure the calling side to permit only the calling number 1000 to call the number
2000.
<RouterA> system-view
[RouterA] voice-setup
[RouterA-voice] dial-program
[RouterA-voice-dial] entity 2000 voip
[RouterA-voice-dial-entity2000] match-template 2000
[RouterA-voice-dial-entity2000] address sip ip 1.1.1.2
[RouterA-voice-dial-entity2000] caller-permit 1000$

Method 2: Configure the called side to permit only the calling number 1000 to call the number
2000.
<RouterB> system-view
[RouterB] voice-setup
[RouterB-voice] dial-program
[RouterB-voice-dial] entity 2000 pots
[RouterB-voice-dial-entity2000] match-template 2000
[RouterB-voice-dial-entity2000] caller-permit 1000$
[RouterB-voice-dial-entity2000] line 1/0

62

Configuring caller group control


Caller group control allows you to filter outgoing calls on the calling side or filter incoming calls on the
called side based on caller groups. Caller group control is often used on the calling side.
A caller group references a subscriber group that defines the matching calling numbers. After you bind
a caller group to a voice entity on the calling side, the matching calling numbers can or cannot call the
called numbers on the voice entity.

Configuring a subscriber group


Step

Command

Remarks

1.

Enter system view.

system-view

N/A

2.

Enter voice view.

voice-setup

N/A

3.

Enter dial program view.

dial-program

N/A

4.

Create a subscriber group and


enter subscriber group view.

subscriber-group group-id

(Optional.) Configure a
description for the subscriber
group.

description text

5.

6.

Configure a match template for


the subscriber group.

match-template match-string

By default, no subscriber group


exists.
You can configure a maximum of
10 subscriber groups.
By default, no description is
configured for the subscriber
group.
By default, no match template is
configured for the subscriber
group.
You can configure multiple match
templates for a subscriber group.

Configuring a caller group on a voice entity


Step

Command

Remarks

1.

Enter system view.

system-view

N/A

2.

Enter voice view.

voice-setup

N/A

3.

Enter dial program view.

dial-program

N/A

4.

Create a voice entity and enter


voice entity view.

entity entity-number { pots |


voip }

N/A

5.

Configure the voice entity to


permit or deny the calling
numbers in the specified
subscriber group.

caller-group { deny | permit }


group-id

By default, all calling numbers are


permitted.

63

Enabling private line auto ring-down


The private line auto ring-down (PLAR) function enables a subscriber line to automatically call the
specified called number when the phone goes off-hook.
To configure the PLAR function:
Step

Command

Remarks

1.

Enter system view.

system-view

N/A

2.

Enter subscriber line view.

subscriber-line line-number

N/A

3.

Configure PLAR.

private-line string

By default, PLAR is not configured.

Configuring a number match mode


Two number match modes are available: longest match and shortest match.
Suppose you have configured match-template 0106688 on a voice entity and match-template
01066880011 on another voice entity.
When a subscriber dials 01066880011:

If shortest match is used, the router matches and calls the number 0106688.

If longest match is used, the router matches and calls the number 01066880011.

When a subscriber dials 0106688:

If shortest match is used, the router immediately matches and calls the number 0106688.

If longest match is used, the router waits until the dial timer expires. Then the router matches the
received number against match templates. If a match is found, the router calls the matching number.
If no match is found, the router releases the call.

You can configure a terminator that identifies the end of a number. Suppose the terminator is the pound
sign #. When a subscriber dials 0106688#, the router immediately matches the number 0106688 with
match templates regardless of whether longest match is used. If a match is found, the router calls the
matching number.

Procedure
To configure a number match mode:
Step

Command

Remarks

1.

Enter system view.

system-view

N/A

2.

Enter voice view.

voice-setup

N/A

3.

Enter dial program view.

dial-program

N/A

4.

Configure a number match


mode.

number-match { longest |
shortest }

By default, shortest match is used.

5.

Configure a terminator.

terminator character

By default, no terminator is
configured.

64

Examples
As shown in Figure 25, configure number match modes for calls from Telephone A to Telephones B and
C.
Figure 25 Network diagram

Using shortest match


1.

Configure Router A:
# Configure POTS entity 1000.
<RouterA> system-view
[RouterA] voice-setup
[RouterA-voice] dial-program
[RouterA-voice-dial] entity 1000 pots
[RouterA-voice-dial-entity1000] match-template 10001234$
[RouterA-voice-dial-entity1000] line 1/0
[RouterA-voice-dial-entity1000] quit

# Configure VoIP entity 2000 and VoIP entity 2001.


[RouterA-voice-dial] entity2000 voip
[RouterA-voice-dial-entity2000] match-template 20001234$
[RouterA-voice-dial-entity2000] address ip 1.1.1.2
[RouterA-voice-dial-entity2000] quit
[RouterA-voice-dial] entity2001 voip
[RouterA-voice-dial-entity2001] match-template 200012341234$
[RouterA-voice-dial-entity2001] address ip 1.1.1.2
[RouterA-voice-dial-entity2001] quit

2.

Configure Router B:
# Configure POTS entity 2000 and POTS entity 2001.
<RouterB> system-view
[RouterB] voice-setup
[RouterB-voice] dial-program
[RouterB-voice-dial] entity 2000 pots
[RouterB-voice-dial-entity2000] match-template 20001234$

65

[RouterB-voice-dial-entity2000] line 1/0


[RouterB-voice-dial-entity2000] quit
[RouterB-voice-dial] entity2001 pots
[RouterB-voice-dial-entity2001] match-template 200012341234$
[RouterB-voice-dial-entity2001] line 1/1

After you dial number 20001234 at Telephone A, the number matches VoIP entity 2000 and
Telephone B rings because the device uses shortest match mode by default.

Configuring longest match


# Configure the longest match mode on Router A.
[RouterA-voice-dial] number-match longest

After you dial number 20001234 at Telephone A and waits for a period of time, the number matches
VoIP entity 2000 and Telephone B rings. If you dial 1234 during the waiting period (the dialed number
is 200012341234), the number matches VoIP entity 2001 and Telephone C rings.

Configuring a terminator
# Configure the terminator # on Router A.
[RouterA-voice-dial] terminator #

After you dial 20001234# at Telephone A, the number immediately matches VoIP entity 2000 and
Telephone B rings.

Configuring the maximum number of total calls


allowed by a voice entity
You can limit the maximum number of total calls (both incoming and outgoing) allowed by a voice entity.
The device stops establishing new calls when the limit is reached.
To configure the maximum number of total calls allowed:
Step

Command

Remarks

1.

Enter system view.

system-view

N/A

2.

Enter voice view.

voice-setup

N/A

3.

Enter dial program view.

dial-program

N/A

4.

Enter voice entity view.

entity entity-number { pots | voip }

N/A

5.

Configure the maximum


number of total calls allowed
by the voice entity.

max-conn max-number

By default, no maximum number of


total calls is configured.

Configuring number substitution


A number substitution rule replaces a matching number with another number. You can configure number
substation rules and then apply these rules globally or to voice entities.
A number substitution process is as follows:

66

1.

The router first matches a number against the preferred number substitution rule. If they match, the
router replaces the number based on the preferred rule.

2.

If the match fails, the router matches the number against other number substitution rules in
sequence. Once a rule is matched, the router replaces the number based on the matching rule and
stops matching other number substitution rules.

Number substitution on the calling router


As shown Figure 26, the calling router performs number substitution for a number as follows:
1.

The router matches the number against global number substitution rules. If a match is found, the
router replaces the number based on the matching rule.

2.

If no match is found, the router selects a matching voice entity, and replaces the number based on
the matching rule on the voice entity.

3.

The router initiates a call to the called side.

Figure 26 Flow chart for number substitution on the calling router


Voice interface

PSTN

Yes

Global number
substitution rule matched?

Performs number
substitution

No

Voice entity matched?

No

Yes
Number
substitution rule on the voice
entity matched?

No

Yes
Performs number substitution

Calls the called party

Call failure

Number substitution on the called router


As shown Figure 26, the called router performs number substitution for a number as follows:
1.

The router matches the number against global number substitution rules. If a match is found, the
router replaces the number based on the matching rule.
67

2.

If no match is found, the router selects a matching voice entity, and matches the number against
rules on the voice entity. If a match is found, the router replaces the number based on the matching
rule.

3.

If no match is found, the router calls the called number if the callee is a local subscribe line, or
initiates a call to the PSTN if the callee is in the PSTN.

Figure 27 Flow chart for number substitution on the called router


Receives the called
number

Global number substitution


rule matched?

Yes

Performs number
substitution

No

No
Voice entity matched?
Yes

Number substitution rule on


the voice entity matched?

No

Yes

Performs number substitution

PSTN

Call failure

Voice interface

Configuring global number substitution


Step

Command

Remarks

1.

Enter system view.

system-view

N/A

2.

Enter voice view.

voice-setup

N/A

3.

Enter dial program view.

dial-program

N/A

4.

Create a number substitution


rule list and enter
number-substitute view.

number-substitute list-number

By default, no number substitution


rule list exists.

Configure a dot-match rule.

dot-match { end-only | left-right |


right-left }

By default, the dot match rule is


end-only.

5.

68

Step

Command

Remarks

By default, no number substitution


rule is configured.

6.

Configure a number
substitution rule.

rule id input-template
output-template [ number-type
input-number-type
output-number-type |
numbering-plan
input-numbering-plan
output-numbering-plan ] *

7.

(Optional.) Configure the


preferred number substitution
rule.

first-rule id

By default, the preferred number


substitution rule is not configured.

8.

Return to dial program view.

quit

N/A

9.

Apply the number substitution


rule list to the calling/called
number of
incoming/outgoing calls.

substitute { incoming-call |
outgoing-call } { called | calling }
list-number

By default, no number substitution


rule list is applied.

Configuring number substitution for a voice entity


Step

Command

Remarks

1.

Enter system view.

system-view

N/A

2.

Enter voice view.

voice-setup

N/A

3.

Enter dial program view.

dial-program

N/A

4.

Create a number substitution


rule list and enter
number-substitute view.

number-substitute list-number

By default, no number substitution


rule list exists.

Configure a dot match rule.

dot-match { end-only | left-right |


right-left }

By default, the dot match rule is


end-only.

6.

Configure a number
substitution rule.

rule id input-template
output-template [ number-type
input-number-type
output-number-type |
numbering-plan
input-numbering-plan
output-numbering-plan ] *

By default, no number substitution


rule is configured.

7.

(Optional.) Configure the


preferred number substitution
rule.

first-rule id

By default, the preferred number


substitution rule is not configured.

8.

Return to dial program view.

quit

N/A

9.

Enter voice entity view.

entity entity-number { pots |voip }

N/A

substitute { called | calling }


list-number

By default, no number substitution


rule list is applied to a voice entity.

5.

10. Apply the number substitution


rule list to the voice entity.

69

Examples
This section provides examples for global number substitution and voice entity number substitution.
Figure 28 Network diagram

Configuring global number substitution


# Create number substitution rule list 1 and add a rule to the list.
<RouterA> system-view
[RouterA] voice-setup
[RouterA-voice] dial-program
[RouterA-voice-dial] number-substitute 1
[RouterA-voice-dial-substitute101] rule 0 ^010....$ ....
[RouterA-voice-dial-substitute101] quit

# Configure the destination address as 1.1.1.2 and the called number as 1001 for VoIP entity 1001.
[RouterA-voice-dial] entity 1001 voip
[RouterA-voice-dial-entity1001] address sip ip 1.1.1.2
[RouterA-voice-dial-entity1001] match-template 1001
[RouterA-voice-dial-entity1001] quit

# Apply number substitution rule list 1 to the called number of outgoing calls.
[RouterA-voice-dial] substitute outgoing-call called 1

When you use Telephone A to call number 0101001, Router A replaces 0101001 with 1001 and sends
the call to the destination address 1.1.1.2. Then Telephone B rings.

Configuring voice entity number substitution


# Create number substitution rule list 1 and add a rule to the list.
<RouterA> system-view
[RouterA] voice-setup
[RouterA-voice] dial-program
[RouterA-voice-dial] number-substitute 1
[RouterA-voice-dial-substitute101] rule 0 ^010....$ ....
[RouterA-voice-dial-substitute101] quit

# Configure the destination address as 1.1.1.2 and the called number as 0101001 for VoIP entity 1001.
[RouterA-voice-dial] entity 1001 voip
[RouterA-voice-dial-entity1001] address sip ip 1.1.1.2
[RouterA-voice-dial-entity1001] match-template 0101001

# Apply number substitution rule list 1 to the called number on VoIP entity 1001.
[RouterA-voice-dial-entity1001] substitute called 1

When you use Telephone A to call number 0101001, VoIP entity 1001 replaces 0101001 with 1001 and
sends the call to the destination address 1.1.1.2. Then Telephone B rings.

70

Configuring a priority for a voice entity


If a number matches multiple voice entities, the router selects the voice entity with the highest priority.
To configure a priority for a voice entity:
Step

Command

Remarks

1.

Enter system view.

system-view

N/A

2.

Enter voice view.

voice-setup

N/A

3.

Enter dial program view.

dial-program

N/A

4.

Enter voice entity view.

entity entity-number { pots | voip }

N/A

5.

Configure a priority for the


voice entity.

priority priority-order

The default priority is 0.

Configuring a number sending mode


The number sending mode controls how the originating router sends a called number. The router
supports the following number sending modes:

Sends the least significant digits of a called number (the number of the least significant digits is
specified with the send-number digit-number command).

Sends all the digits of a called number.

Sends a truncated called number. When the match-template command configured for a voice
entity contains dots ".", only the digits that match the dots are sent.

Procedure
To configure a number sending mode:
Step

Command

Remarks

1.

Enter system view.

system-view

N/A

2.

Enter voice view.

voice-setup

N/A

3.

Enter dial program view.

dial-program

N/A

4.

Enter POTS voice entity view.

entity entity-number pots

N/A

5.

Configure a number sending


mode.

send-number { digit-number | all |


truncate }

By default, the truncate mode is


used.

Examples
As shown in Figure 29, Router A and Router B connect to each other through an IP link and an E1 link.
The telephones at two sides call each other through the E1 link. This section provides examples for
configuring number sending modes to achieve different call policies.

71

Figure 29 Network diagram


FXS 3/0

FXS 3/0

Telephone A
2000

Router A

Eth2/1
1.1.1.1/24

Eth2/1
1.1.1.2/24
E1 1/1

E1 1/1

Telephone B
01001

FXS 3/1

Telephone C
0101001

FXS 3/2

Telephone D
1001

Router B

Configuring basic settings


1.

Configure Router A:
# Configure a timeslot set using R2 signaling for controller E1 1/1.
<RouterA> system-view
[RouterA] controller e1 1/1
[RouterA-E1 1/1] timeslot-set 0 timeslot-list 1-31 signal r2
[RouterA-E1 1/1] quit
[RouterA] voice-setup
[RouterA-voice] dial-program

# Configure a match template to match 010.$ for POTS entity 1001 and bind line 1/1:0 to the
entity.
[RouterA-voice-dial] entity 1001 pots
[RouterA-voice-dial-entity1001] match-template 010....$
[RouterA-voice-dial-entity1001] line 1/1:0

# Configure a local number 2000 for POTS entity 2000, and bind line3/0 to the entity.
[RouterA-voice-dial] entity 2000 pots
[RouterA-voice-dial-entity2000] match-template 2000
[RouterA-voice-dial-entity2000] line 3/0

2.

Configure Router B:
# Configure a timeslot set using R2 signaling for controller E1 1/1.
<RouterB> system-view
[RouterB] controller e1 1/1
[RouterB-E1 1/1] timeslot-set 0 timeslot-list 1-31 signal r2
[RouterB-E1 1/1] quit

# Configure a local number 1001 for POTS entity 1002, and bind line 3/0 to the entity.
[RouterB] voice-setup
[RouterB-voice] dial-program
[RouterB] voice-setup
[RouterB-voice] dial-program
[RouterB-voice-dial] entity 1002 pots
[RouterB-voice-dial-entity1002] match-template 01001
[RouterB-voice-dial-entity1002] line 3/0
[RouterB-voice-dial-entity1002] quit

# Configure a local number 0101001 for POTS entity 0101001, and bind line 3/1 to the entity.
[RouterB-voice-dial] entity 0101001 pots

72

[RouterB-voice-dial-entity101001] match-template 0101001


[RouterB-voice-dial-entity101001] line 3/1
[RouterB-voice-dial-entity101001] quit

# Configure a local number 1001 for POTS entity 1001, and bind line 3/2 to the entity.
[RouterB-voice-dial] entity 1001 pots
[RouterB-voice-dial-entity1001] match-template 1001
[RouterB-voice-dial-entity1001] line 3/2

Configuring number sending modes on Router A


# Configure Router A to send the five least significant digits of a called number.
[RouterA-voice-dial-entity1001] send-number 5

If you use Telephone A to call 0101001, Router A sends the called number 01001, which are the five least
significant digits. Then Telephone B rings.
# Configure Router A to send all the digits of a called number.
[RouterA-voice-dial-entity1001] send-number all

If you use Telephone A to call 0101001, Router A sends the complete called number 0101001. Then
Telephone C rings.
# Configure Router A to send a truncated called number.
[RouterA-voice-dial-entity1001] send-number truncate

If you use Telephone A to call 0101001, Router A sends the called number 1001, which match the dots in
"010.$". Then Telephone D rings.

Configuring a dial prefix


After you configure a dial prefix, the router adds the prefix before each called number. If the called
number exceeds 31 digits, the router sends only the first 31 digits.
To configure a dial prefix:
Step

Command

Remarks

1.

Enter system view.

system-view

N/A

2.

Enter voice view.

voice-setup

N/A

3.

Enter dial program view.

dial-program

N/A

4.

Enter POTS entity view.

entity entity-number pots

N/A

5.

Configure a dial prefix.

dial-prefix string

By default, no dial prefix is


configured.

Dial program configuration examples


This section provides dial program configuration examples.

73

Configuring number substitution


Network requirements
As shown in Figure 30, configure number substitution on the routers so departments in different areas can
call each other by using the area code of the destination area plus a four-digit local number. For example,
to use phone 1688 of the F department in area B to call phone 6788 of the M department in area A, dial
the number 0103366, in which 3366 is the number of the M department in area B. On phone 6788, the
calling number 1688 is displayed as 0211234, which is the area code of area A plus the number of the
F department in area A.
Figure 30 Network diagram
B area code: 021

A area code: 010

M Dept. 3366

M Dept. 6788
Eth2/1
2.2.2.2/24

FXO 1/0
F Dept. 1688

PBX

WAN

Eth2/1
1.1.1.1/24

Router B

FXO 1/0

Router A

PBX

F Dept 1234

S Dept. 6565

S Dept. 2323

Configuration procedure
The following only provides the number substitution configuration for calls from area B to area A.
1.

Configure Router B:
# Create number substitution rule list 21101 and add rules to the list.
<RouterB> system-view
[RouterB] voice-setup
[RouterB-voice] dial-program
[RouterB-voice-dial] number-substitute 21101
[RouterB-voice-dial-substitute21101] rule 1 ^0101688$ 0001
[RouterB-voice-dial-substitute21101] rule 2 ^0103366$ 0002
[RouterB-voice-dial-substitute21101] rule 3 ^0102323$ 0003
[RouterB-voice-dial-substitute21101] quit

# Create number substitution rule list 21102 and add rules to the list.
[RouterB-voice-dial] number-substitute 21102
[RouterB-voice-dial-substitute21102] rule 1 ^1688$ 0210001
[RouterB-voice-dial-substitute21102] rule 2 ^3366$ 0210002
[RouterB-voice-dial-substitute21102] rule 3 ^2323$ 0210003
[RouterB-voice-dial-substitute21102] quit

# Configure the match template "010...." to match called numbers, and set the destination IP
address as 1.1.1.1 for VoIP entity 10.
[RouterB-voice-dial] entity 10 voip
[RouterB-voice-dial-entity10] match-template 010....
[RouterB-voice-dial-entity10] address sip ip 1.1.1.1

74

# Apply the number substitution rule list 21101 to called numbers on VoIP entity 10, which will
change the called numbers 0101688, 0103366, and 0102323 into 0001, 0002, and 0003
respectively.
[RouterB-voice-dial-entity10] substitute called 21101

# Apply the number substitution rule list 21102 to calling numbers on VoIP entity 10, which will
change the calling numbers 1688, 3366, and 2323 into 0210001, 0210002, and 0210003
respectively.
[RouterB-voice-dial-entity10] substitute calling 21102

2.

Configure Router A:
# Create number substitution rule list 101 and add rules to the list.
<RouterA> system-view
[RouterA] voice-setup
[RouterA-voice] dial-program
[RouterA-voice-dial] number-substitute 101
[RouterA-voice-dial-substitute101] rule 1 ^0001$ 1234
[RouterA-voice-dial-substitute101] rule 2 ^0002$ 6788
[RouterA-voice-dial-substitute101] rule 3 ^0003$ 6565
[RouterA-voice-dial-substitute101] quit

# Create number substitution rule list 102 and add rules to the list.
[RouterA-voice-dial] number-substitute 102
[RouterA-voice-dial-substitute102] dot-match left-right
[RouterA-voice-dial-substitute102] rule 1 ^...0001$ ...1234
[RouterA-voice-dial-substitute102] rule 2 ^...0002$ ...6788
[RouterA-voice-dial-substitute102] rule 3 ^...0003$ ...6565
[RouterA-voice-dial-substitute102] quit

# Apply the number substitution rule list 101 to the called numbers of incoming calls, which will
change the called numbers 0001, 0002, and 0003 into 1234, 6788, and 6565 respectively.
[RouterA-voice-dial] substitute incoming-call called 101

# Apply the number substitution rule list 102 to the calling numbers of incoming calls, which will
change the called numbers 0210001, 0210002, and 0210003 into 0211234, 0216788, and
0216565 respectively.
[RouterA-voice-dial] substitute incoming-call calling 102

# Configure the match template "." for POTS entity 1010, bind line 1/0 to the entity, and
configure the entity to send all the digits of a called number.
[RouterA-voice-dial] entity 1010 pots
[RouterA-voice-dial-entity1010] match-template ....
[RouterA-voice-dial-entity1010] line 1/0
[RouterA-voice-dial-entity1010] send-number all

Verifying the configuration


Use phone 1688 to dial the number 0103366. Then phone 6788 rings and the displayed calling number
is 0211234.
During the calling process, Router B changes the calling number 1688 into 0210001 and changes the
called number 0103366 into 0002, and then Router A changes 0210001 into 0211234 and changes
0002 into 6788.

75

Configuring caller group control


Network requirements
As shown in Figure 31, areas A, B, and C call each other through the SIP server. Configure caller group
control on Router A so when the SIP server fails, the areas call each other though the public PBXs in PSTN
as follows:

The phone numbers starting with 1100 in area A can only call the phone numbers in area B.

The phone numbers starting with 1200 in area A can call the phone numbers both in area B and
area C.

Figure 31 Network diagram


Area A

Area B

110000
Router B
2100

E1 1/0

1100..
Internal
PBX
110099

Router A

IP
120000

Internal
PBX

2200
Public PBX
Area C
Router C

1200..

3100

E1 1/0

120099

Public PBX

Internal
PBX

SIP server

3200
Public PBX

Configuration procedure
This example does not provide SIP server and digital voice interface configurations. For related
information, see "Configuring SIP" and "Configuring voice interfaces."
1.

Configure Router A:
# Configure subscriber group 1 that matches calling numbers starting with 1100 and configure
subscriber group 2 that matches calling numbers starting with 1200.
<RouterA> system-view
[RouterA] voice-setup
[RouterA-voice] dial-program
[RouterA-voice-dial] subscriber-group 1
[RouterA-voice-dial-group1] match-template 1100..
[RouterA-voice-dial-group1] quit
[RouterA-voice-dial] subscriber-group 2
[RouterA-voice-dial-group2] match-template 1200..
[RouterA-voice-dial-group2] quit

# Configure VoIP entity 2000 to use the SIP proxy server to find call destination addresses and to
match called numbers in area B.
[RouterA-voice-dial] entity 2000 voip

76

[RouterA-voice-dial-entity2000] address sip proxy


[RouterA-voice-dial-entity2000] match-template 2...
[RouterA-voice-dial-entity2000] quit

# Configure VoIP entity 3000 to use the SIP proxy server to find call destination addresses and to
match called numbers in area C.
[RouterA-voice-dial] entity 3000 voip
[RouterA-voice-dial-entity3000] address sip proxy
[RouterA-voice-dial-entity3000] match-template 3...
[RouterA-voice-dial-entity3000] quit

# Configure a caller group to permit subscriber groups 1 and 2 on POTS entity 2100 so the phone
numbers starting with 1100 or 1200 in area A can call the phone numbers in area B.
[RouterA-voice-dial] entity 2100 pots
[RouterA-voice-dial-entity2100] line 2/0:15
[RouterA-voice-dial-entity2100] send-number all
[RouterA-voice-dial-entity2100] match-template 2...
[RouterA-voice-dial-entity2100] caller-group permit 1
[RouterA-voice-dial-entity2100] caller-group permit 2
[RouterA-voice-dial-entity2100] quit

# Configure a caller group to permit subscriber group 2 on POTS entity 3100 so the phone
numbers starting with 1200 in area A can call the phone numbers in area C.
[RouterA-voice-dial] entity 3100 pots
[RouterA-voice-dial-entity3100] line 2/0:15
[RouterA-voice-dial-entity3100] send-number all
[RouterA-voice-dial-entity3100] match-template 3...
[RouterA-voice-dial-entity3100] caller-group permit 2
[RouterA-voice-dial] quit

# Configure POTS entity 2100 to match local numbers and bind line 1/0:15 to the entity.
[RouterA-voice-dial] entity 2100 pots
[RouterA-voice-dial-entity2100] line 1/0:15
[RouterA-voice-dial-entity2100] send-number all
[RouterA-voice-dial-entity2100] match-template 1.....

2.

Configure Router B:
# Configure POTS entity 2100 to match local numbers and bind line 1/0:15 to the entity.
<RouterB> system-view
[RouterB] voice-setup
[RouterB-voice] dial-program
[RouterB-voice-dial] entity 2100 pots
[RouterB-voice-dial-entity2100] line 1/0:15
[RouterB-voice-dial-entity2100] send-number all
[RouterB-voice-dial-entity2100] match-template 2...

3.

Configure Router C:
# Configure POTS entity 3100 to match local numbers and bind line 1/0:15 to the entity.
<RouterC> system-view
[RouterC] voice-setup
[RouterC-voice] dial-program
[RouterC-voice-dial] entity 3100 pots
[RouterC-voice-dial-entity3100] line 1/0:15

77

[RouterC-voice-dial-entity3100] send-number all


[RouterC-voice-dial-entity3100] match-template 3...

Verifying the configuration


The phone numbers starting with 1100 in area A can only call the phone numbers in area B.
The phone numbers starting with 1200 in area A can call the phone numbers both in area B and area
C.

78

Configuring SIP
Overview
The Session Initiation Protocol (SIP) is an application layer control protocol that can create, modify, and
terminate multimedia sessions such as voice and video calls over IP networks.

Terminology
User agent
A user agent (UA) is a SIP endpoint such as a phone, a gateway, or a router.
There are two types of UAs: user agent client (UAC) and user agent server (UAS). A UAC sends SIP
requests, and a User Agent Server (UAS) receives SIP requests and returns SIP responses. These roles of
UAC and UAS only last for the duration of a SIP transaction.

Proxy server
A proxy server primarily forwards session requests and responses. It can also provide call control,
accounting, and authorization functions.

Redirect server
A redirect server sends new addresses to UACs so the UAC sends session requests to the new addresses.

Location server
A location server provides UA information to proxy and redirect servers.

Registrar
A registrar receives registrations from UAs and generates UA information. The UA information is stored
on the location server.

SIP functions
SIP supports the following facets of establishing and terminating multimedia communications:

User locationDetermines the end system to be used for communication. SIP can use UA
information on the registrar, or use information provided by DNS or LDAP to locate end systems.

User availabilityDetermines the willingness of the called party to engage in communications.

User capabilitiesDetermines the media type and media parameters to be used. In a message
exchange process, each SIP endpoint advertises media information so that all other participants
can learn about its capabilities.

Session setupEstablishes session parameters at both called and calling parties.

Session managementTransfers and terminates sessions, modifies session parameters, and


invokes services.

79

SIP messages
SIP is a text-based protocol. A SIP message is either a request from a client to a server, or a response from
a server to a client.
SIP requests include INVITE, ACK, OPTIONS, BYE, CANCEL, and REGISTER.

INVITEInvites a user to join a call.

ACKAcknowledges the response to a request.

OPTIONSQueries for the capabilities.

BYEReleases an established call.

CANCELGives up a call attempt.

REGISTERRegisters with the SIP registrar.

SIP responses indicate the status of a call or registration. Responses are distinguished by status codes. As
shown in Table 8, each status code is a 3-digit integer, where the first digit defines the class of the
response, and the last two digits describe the response message in more detail.
Table 8 Status codes of responses
Code

Description

Class

100199

The request was received and is being processed.

Provisional

200299

The request was successfully received, understood, and accepted.

Success

300399

A further action needs to be taken to complete the request.

Redirection

400499

The request contains bad syntax or cannot be fulfilled at this server.

Client error

500599

The server failed to fulfill an apparently valid request.

Server error

600699

The request cannot be fulfilled at any server.

Global failure

SIP configuration task list


Tasks at a glance
Configuring SIP UA registration

(Optional.) Configuring SIP credentials


(Required.) Enabling a POTS entity to register with the registrar
(Required.) Configuring registrar information
(Required.) Use one of the following methods to specify a call destination address for a VoIP entity

Configuring the call destination IP address for a VoIP entity


Configuring a VoIP entity to obtain the call destination address from a proxy server
Configuring the destination domain name and port number for a VoIP entity
(Optional.) Configuring the call destination address for a VoIP entity

80

Tasks at a glance
(Optional.) Configuring extended SIP functions

Configuring out-of-band DTMF


Configuring periodic refresh of SIP sessions
Configuring PSTN cause-to-SIP status mappings
Configuring caller privacy
Setting the P-Asserted-Identity or P-Preferred-Identity header field

Configuring SIP UA registration


A SIP UA registers with a SIP registrar as shown in Figure 32:
1.

The SIP UA sends a REGISTER request to the registrar.

2.

The registrar returns a 200 OK response to the UA if the registration is accepted.

Figure 32 Registration process


Registrar

UA

IP network

REGISTER
200 OK

If the registrar needs to authenticate the UA, the UA registers with the registrar as shown in Figure 33:
3.

The UA sends a REGISTER request to the registrar.

4.

The registrar returns a 401/407 response, challenging the originator to provide credentials.

5.

The UA sends a REGISTER request that includes credentials to the registrar.

6.

The registrar returns a 200 OK response to the UA if the authentication succeeds.

Figure 33 Registration process with authentication

Configuration prerequisites
Complete the following tasks before you configure SIP credentials information:
81

Configure a number template on each voice entity with the match-template command and bind
each voice entity to a voice subscriber line with the line command.

Enable the voice entities and voice subscriber lines (in undo shutdown state).

Configuring SIP credentials


If the registrar provides UA authentication, configure SIP credentials on the SIP UA in the following ways:

Use the user command in SIP view to configure global SIP credentials.

Use the credentials command to configure SIP credentials for a SIP trunk account. For more
information about SIP trunk, see Configuring SIP trunk.

Use the user command in voice entity view to configure SIP credentials for a voice entity.

Registration with multiple registrars


A SIP UA can register with up to six registrars, and it uses the domain name in the 401/407 response
from a registrar to identify the credentials to be sent to the registrar.
You can configure only one username with the user command in SIP view or voice entity view. The
username can contain 12 credentials bindings. A binding that does not include a domain name can be
used to respond to a 401/407 response that does not match any domain name-included binding. The
following example configures four credentials bindings:
[Sysname-voice-dial-entity100] user 1000 password simple 1000 realm server1
[Sysname-voice-dial-entity100] user 1000 password simple 1000 realm server2
[Sysname-voice-dial-entity100] user 1000 password simple 2000 realm server3
[Sysname-voice-dial-entity100] user 1000 password simple 3000

The first three bindings each contain a domain name, and the last binding contains no domain name. If
the SIP UA receives a 401/407 response that includes a domain name server2, the SIP UA responds with
the username 1000 and password 1000. If the SIP UA receives a 401/407 response that includes a
domain name server4, the SIP UA responds with the username 1000 and password 3000 because no
credentials binding contains the domain name server4.

Credentials selection for a phone number that exists on multiple voice entities
Upon receiving a 401/407 response for a phone number that exists on multiple voice entities, the SIP UA
considers the phone number belongs to the voice entity with the smallest ID and selects the credentials for
the phone number in the following order:
1.

Credentials on the voice entity with the smallest ID.

2.

Credentials configured with the credentials command.

3.

Credentials configured in SIP view.

The SIP UA always uses the matching credentials for the phone number even if a voice entity that has a
higher match priority is added. If no matching credentials are found, the SIP UA fails to register the
phone number.
For example, the registrar maintains the username abcd, password 1234, and domain name abc for the
phone number 1000. The SIP UA has the following settings for the phone number 1000:

POTS entity 1 maintains the username abcd, password 1234, and domain name aaa for the phone
number 1000.
<Sysname> system-view
[Sysname] voice-setup
[Sysname-voice] dial-program

82

[Sysname-voice-dial] entity 1 pots


[Sysname-voice-dial-entity1] match-template 1000
[Sysname-voice-dial-entity1] user abcd password simple 1234 realm aaa

POTS entity 2 maintains the username abcd, password 1234, and domain name abc for the phone
number 1000.

<Sysname> system-view
[Sysname] voice-setup
[Sysname-voice] dial-program
[Sysname-voice-dial] entity 2 pots
[Sysname-voice-dial-entity2] match-template 1000
[Sysname-voice-dial-entity2] user abcd password simple 1234 realm abc

The SIP trunk account maintains the username abcd, password 1234, and domain name abc for the
phone number 1000.

<Sysname> system-view
[Sysname] voice-setup
[Sysname-voice] sip
[Sysname-voice-sip] credentials number 1000 username abcd password simple 1234 realm
abc

The global SIP credentials information includes the username abcd, password 1234, and domain
name abc.

<Sysname> system-view
[Sysname] voice-setup
[Sysname-voice] sip
[Sysname-voice-sip] user abcd password simple 1234 realm abc

Upon receiving a 401/407 response for the phone number 1000, the SIP UA considers the phone
number belongs to POTS entity 1 and selects the credentials on POTS entity 1 because POTS entity 1 has
a smaller ID, but the credentials fail the authentication. Then the SIP UA selects the credentials configured
with the credentials command and the credentials pass the authentication. The output from the display
voice sip register-status command shows that the phone number 1000 belongs to voice entity 1.
<Sysname> display voice sip register-status
Number

Entity

Registrar Server

Expires Status

-------------------------------------------------------------------------------1000

192.168.4.240:5060

2877

Online

Configuration procedure
To configure global SIP credentials:
Step

Command

Remarks

1.

Enter system view.

system-view

N/A

2.

Enter voice view.

voice-setup

N/A

3.

Enter SIP view.

sip

N/A

4.

Configure global SIP


credentials.

user username password { cipher |


simple } password [ realm realm ]

By default, no global SIP credentials are


configured.

To configure SIP credentials for a POTS entity:

83

Step

Command

Remarks

1.

Enter system view.

system-view

N/A

2.

Enter voice view.

voice-setup

N/A

3.

Enter dial program view.

dial-program

N/A

4.

Enter POTS entity view.

entity entity-number pots

N/A

5.

Configure SIP credentials for


the POTS entity.

user username password

{ cipher | simple } password


[ cnonce cnonce | realm
realm ] *

By default, no SIP credentials are


configured for a POTS entity.

Enabling a POTS entity to register with the registrar


Perform this task to enable a POTS entity to register with the registrar. You can also disable a POTS entity
to register with the registrar by using the undo register-number command if registration is not needed.
To enable a POTS entity to register with the registrar:
Step

Command

Remarks

1.

Enter system view.

system-view

N/A

2.

Enter voice view.

voice-setup

N/A

3.

Enter dial program view.

dial-program

N/A

4.

Enter POTS entity view.

entity entity-number pots

N/A

5.

Enable the POTS entity to


register with the registrar.

register-number

By default, a POTS entity registers


with the registrar after UA
registration is configured.

Configuring registrar information


Perform this task to specify a registrar. The expires keyword sets the registration expiry time, and the
refresh-ratio keyword sets the refresh percentage. When the registration time reaches the registration
expiry time multiplied by the refresh percentage, a voice entity or SIP trunk re-registers the number with
the registrar to avoid expiration.
To configure registrar information:
Step

Command

Remarks

1.

Enter system view.

system-view

N/A

2.

Enter voice view.

voice-setup

N/A

3.

Enter SIP view.

sip

N/A

4.

Configure the registrar


information for the SIP
UA.

registrar registrar-index ip ip-address


[ port port-number ] [ expires seconds ]
[ refresh-ratio ratio-percentage ]

By default, no registrar information


is configured.

84

Displaying SIP UA registration status


Execute display commands in any view.
Task

Command

Display SIP UA registration status.

display voice sip register-status

Configuring the call destination address for a VoIP


entity
You can configure the call destination address for a VoIP entity in one of the following ways:

Configure the call destination IP address.

Configure the VoIP entity to obtain the call destination address from a proxy server.

Configure the destination domain name and port number. Only DNS A records are supported. For
more information about DNS, see Layer 3IP Services Configuration Guide.

Configuring the call destination IP address for a VoIP entity


Step

Command

Remarks

1.

Enter system view.

system-view

N/A

2.

Enter voice view.

voice-setup

N/A

3.

Enter dial program view.

dial-program

N/A

4.

Enter VoIP entity view.

entity entity-number voip

N/A

5.

Configure the call destination


IP address.

address sip ip ip-address [ port


port-number ]

By default, no call destination


address is configured.

Configuring a VoIP entity to obtain the call destination address


from a proxy server
Step

Command

Remarks

1.

Enter system view.

system-view

N/A

2.

Enter voice view.

voice-setup

N/A

3.

Enter SIP view.

sip

N/A

4.

Specify the proxy server.

proxy { dns domain-name port


port-number | ip ip-address [ port
port-number ] }

5.

Return to voice view.

quit

By default, no proxy server is


specified.
The port number must be 5060 for
the domain name.
N/A

85

Step

Command

Remarks

6.

Enter dial program view.

dial-program

N/A

7.

Enter VoIP entity view.

entity entity-number voip

N/A

8.

Enable the VoIP entity to


obtain the call destination
address from the proxy server.

address sip proxy

By default, a VoIP entity does not


obtain the call destination address
from a proxy server.

Configuring the destination domain name and port number for


a VoIP entity
Step

Command

Remarks

1.

Enter system view.

system-view

N/A

2.

Enter voice view.

voice-setup

N/A

3.

Enter dial program view.

dial-program

N/A

4.

Enter VoIP entity view.

entity entity-number voip

N/A

5.

Configure the destination


domain name and port
number.

address sip dns domain-name port


port-number

By default, no destination domain


name or port number is
configured.
The port number must be 5060.

Configuring extended SIP functions


This section describes extended SIP configurations.

Configuring out-of-band DTMF


There are two ways to transmit DTMF tones: in-band signaling and out-of-band signaling. In-band
signaling sends DTMF tones in RTP packets, and out-of-band signaling sends DTMF tones in SIP
messages.
To use out-of-band signaling, configure the outband sip command on both the calling and called
devices.
To configure out-of-band DTMF:
Step

Command

Remarks

1.

Enter system view.

system-view

N/A

2.

Enter voice view.

voice-setup

N/A

3.

Enter dial program view.

dial-program

N/A

4.

Enter voice entity view.

entity entity-number { pots | voip }

N/A

5.

Enable out-of-band DTMF.

outband sip

By default, inband DTMF is


enabled.

86

Configuring periodic refresh of SIP sessions


If a proxy server fails to receive a BYE message, it will always retain the state for the session. To solve this
problem, RFC 4082 defines a session refresh mechanism, which periodically sends re-INVITE or UPDATE
requests (referred to as refresh requests) to notify the proxy server of the current session state. The refresh
interval is determined through negotiation between the SIP UA and the SIP proxy server.
Session refresh uses two header fields Session-Expires and Min-SE, and a 422 response:

Session-ExpiresConveys the maximum session expiration time. If no refresh request is received


within this time, the session is considered ended.

Min-SEConveys the minimum session expiration time, which is used to avoid frequent refresh
requests from occupying excessive network bandwidth.

422 responseWhen a UAS or SIP proxy server receives a request in which the Session-Expires
field conveys a value smaller than the local Min-SE value, the UAS or SIP proxy server sends a 422
response that contains the local Min-SE value to notify the requesting party of the minimum session
expiration time.

To configure periodic refresh of SIP sessions:


Step

Command

Remarks

1.

Enter system view.

system-view

N/A

2.

Enter voice view.

voice-setup

N/A

3.

Enter SIP view.

sip

N/A

session refresh

By default, session refresh is


disabled if the device acts as a
UAC, and is enabled if the device
acts as a UAS.

4.

Enable session refresh.

Configure this command on the


UAC.
5.

Set the maximum session


expiration time and minimum
session expiration time.

By default, both the maximum


session expiration time and
minimum session expiration time
are 1800 seconds.

min-se time [ session-expires


interval ]

Configuring PSTN cause-to-SIP status mappings


The default PSTN cause-to-SIP status mappings are used for communication between a SIP network and
a PSTN. For information about these default mappings, see Voice Command Reference. You can also
change the default mappings to meet specific needs.
To configure PSTN cause-to-SIP status mappings:
Step

Command

Remarks

1.

Enter system view.

system-view

N/A

2.

Enter voice view.

voice-setup

N/A

3.

Enter SIP view.

sip

N/A

87

Step

Command

Remarks

4.

Configure a PSTN cause


code-to-SIP status
mapping.

set pstn-cause pstn-cause


sip-status sip-status

For information about default PSTN cause


code-to-SIP status mappings, see Voice
Command Reference.

5.

Configure a SIP
status-to-PSTN cause
mapping.

set sip-status sip-status


pstn-cause pstn-cause

For information about default SIP


status-to-PSTN cause mappings, see
Voice Command Reference.

6.

Display PSTN cause-to-SIP


status mappings.

display voice sip map { pstn-sip


| sip-pstn }

N/A

Configuring caller privacy


SIP uses the following header fields to provide caller privacy:

PrivacyIf the Privacy header field carries "Privacy: none", the caller ID is displayed. If the Privacy
header field carries "Privacy: id", the caller ID is hidden.

Remote-Party-IDIf the Remote-Party-ID header field carries "privacy=off", the caller ID is


displayed. If the Remote-Party-ID header field carries "privacy=full", the caller ID is hidden. If the
Remote-Party-ID header field is set, the device adds this field to an INVITE request. A device that
receives the INVITE request preferably obtains caller information from this field regardless of
whether the local Remote-Party-ID header field is set.

NOTE:
The Remote-Party-ID header field cannot coexist with the P-Preferred-Identity or P-Asserted-Identity
header field.
To configure caller privacy:
Step

Command

Remarks

1.

Enter system view.

system-view

N/A

2.

Enter voice view.

voice-setup

N/A

3.

Enter SIP view.

sip

N/A

4.

Add the Privacy header field


into INVITE requests.

privacy

By default, INVITE requests do not


carry the Privacy header field.

5.

Add the Remote-Party-ID


header field into INVITE
requests.

remote-party-id

By default, INVITE requests do not


carry the Remote-Party-ID header
field.

Setting the P-Asserted-Identity or P-Preferred-Identity header


field
Any two of the P-Asserted-Identity, P-Preferred-Identity, and Remote-Party-ID header fields cannot coexist.
To set the P-Asserted-Identity or P-Preferred-Identity header field:

88

Step

Command

Remarks

1.

Enter system view.

system-view

N/A

2.

Enter voice view.

voice-setup

N/A

3.

Enter SIP view.

sip

N/A

4.

Add the P-Asserted-Identity or


P-Preferred-Identity header
field into SIP messages.

asserted-id { pai | ppi }

By default, SIP messages do not


carry the P-Asserted-Identity or
P-Preferred-Identity header field.

Displaying and maintaining SIP


Use display commands in any view.
Task

Command

Display SIP UA registration status information.

display voice sip register-status

Display PSTN cause-to-SIP status mappings .

display voice sip map { pstn-sip | sip-pstn }

Display SIP calling information.

display voice sip call

SIP UA configuration examples


Configuring direct SIP calling
Network requirements
As shown in Figure 34, configure direct SIP calling on Router A and Router B so the phones 1111 and
2222 can call each other.
Figure 34 Network diagram

Configuration procedure
1.

Configure Router A:
# Configure an IP address for Ethernet 2/1.
<RouterA> system-view
[RouterA] interface ethernet 2/1
[RouterA-Ethernet2/1] ip address 192.168.2.1 255.255.255.0
[RouterA-Ethernet2/1] quit

# Configure call destination address 192.168.2.2 and number 2222 for VoIP entity 2222.
[RouterA] voice-setup
[RouterA-voice] dial-program
[RouterA-voice-dial] entity 2222 voip

89

[RouterA-voice-dial-entity2222] address sip ip 192.168.2.2


[RouterA-voice-dial-entity2222] match-template 2222
[RouterA-voice-dial-entity2222] quit

# Configure local number 1111 for POTS entity 1111 and bind FXS voice subscriber line 1/0 to
the POTS entity.
[RouterA-voice-dial] entity 1111 pots
[RouterA-voice-dial-entity1111] line 1/0
[RouterA-voice-dial-entity1111] match-template 1111

2.

Configure Router B:
# Configure an IP address for Ethernet 2/1.
<RouterB> system-view
[RouterB] interface ethernet 2/1
[RouterB-Ethernet2/1] ip address 192.168.2.2 255.255.255.0
[RouterB-Ethernet2/1] quit

# Configure local number 2222 for POTS entity 1111 and bind FXS voice subscriber line 1/0 to
the POTS entity.
<RouterB> system-view
[RouterB] voice-setup
[RouterB-voice] dial-program
[RouterB-voice-dial] entity 2222 pots
[RouterB-voice-dial-entity2222] line 1/0
[RouterB-voice-dial-entity2222] match-template 2222
[RouterB-voice-dial-entity2222] quit

# Configure call destination address 192.168.2.1 and number 1111 for VoIP entity 1111.
[RouterB-voice-dial]entity 1111 voip
[RouterB-voice-dial-entity1111] address sip ip 192.168.2.1
[RouterB-voice-dial-entity1111] match-template 1111

Verifying the configuration


# Phone 1111 and phone 2222 can call each other.
# Executing the display voice sip call command can display the SIP call information.

Configuring SIP calling through a SIP server


Network requirements
As shown in Figure 35, configure SIP calling through the SIP server on Router A and Router B so the
phones 1111 and 2222 can call each other.
On Router A, all phone numbers use the same username routerA and password 1234.
On Router B, phone number 2222 uses the username routerb, password 7890, and domain name
server1.

90

Figure 35 Network diagram

Configuration procedure
1.

Configure Router A:
# Configure an IP address for Ethernet 2/1.
<RouterA> system-view
[RouterA] interface ethernet 2/1
[RouterA-Ethernet2/1] ip address 192.168.2.1 255.255.255.0
[RouterA-Ethernet2/1] quit

# Specify the SIP registrar and proxy server.


[RouterA] voice-setup
[RouterA-voice] sip
[RouterA-voice-sip] registrar 1 ip 192.168.2.3
[RouterA-voice-sip] proxy ip 192.168.2.3

# Configure user name routerA and plaintext password 1234.


[RouterA-voice-sip] user routerA password simple 1234
[RouterA-voice-sip] quit

# Configure local number 1111 for POTS entity 1111 and bind FXS voice subscriber line 1/0 to
the POTS entity.
[RouterA-voice] dial-program
[RouterA-voice-dial] entity 1111 pots
[RouterA-voice-dial-entity1111] line 1/0
[RouterA-voice-dial-entity1111] match-template 1111
[RouterA-voice-dial-entity1111] quit

# Configure VoIP entity 2222 to get the call destination address from the proxy server and to
match number 2222.
[RouterA-voice-dial] entity 2222 voip
[RouterA-voice-dial-entity2222] address sip proxy
[RouterA-voice-dial-entity2222] match-template 2222
[RouterA-voice-dial-entity2222] quit

2.

Configure Router B:
# Configure an IP address for Ethernet 2/1.
<RouterB> system-view
[RouterB] interface ethernet 2/1
[RouterB-Ethernet2/1] ip address 192.168.2.2 255.255.255.0
[RouterB-Ethernet2/1] quit

# Specify the SIP registrar and proxy server.


[RouterB] voice-setup

91

[RouterB-voice] sip
[RouterB-voice-sip] registrar 1 ip 192.168.2.3
[RouterB-voice-sip] proxy ip 192.168.2.3
[RouterB-voice-sip] quit

# Configure local number 2222 for POTS entity 2222 and bind FXS voice subscriber line 1/0 to
the POTS entity.
[RouterB-voice] dial-program
[RouterB-voice-dial] entity 2222 pots
[RouterB-voice-dial-entity2222] line 1/0
[RouterB-voice-dial-entity2222] match-template 2222

# Configure user name routerb, plaintext password 7890, and domain name server1.
[RouterB-voice-dial-entity2222] user routerB password simple 7890 realm server1

# Configure VoIP entity 2222 to get the call destination address from the proxy server and to
match number 1111.
[RouterB-voice-dial-entity2222] quit
[RouterB-voice-dial] entity 1111 voip
[RouterB-voice-dial-entity1111] address sip proxy
[RouterB-voice-dial-entity1111] match-template 1111
[RouterB-voice-dial-entity1111] quit

Verifying the configuration


# After the routers register phone numbers on the registrar, phone 1111 and phone 2222 can call each
other through the SIP proxy server.
# Executing the display voice sip register-status command can display the registration state for phones
1111 and 2222.
# Executing the display voice sip call command can display the SIP call information.

Configuring SIP calling through DNS


Network requirements
As shown in Figure 36, configure Router A to get the call destination address through DNS and configure
Router B to use a static call destination address so the phones 1111 and 2222 can call each other.
Figure 36 Network diagram

Configuration procedure
1.

Configure Router A:
# Configure an IP address for Ethernet 2/1.
<RouterA> system-view
[RouterA] interface ethernet 2/1
[RouterA-Ethernet2/1] ip address 192.168.2.1 255.255.255.0
[RouterA-Ethernet2/1] quit

92

# Map the IP address 192.168.2.2 to the host name cc.news.com.


<Sysname> system-view
[Sysname] ip host cc.news.com 192.168.2.2

# Configure the VoIP entity 2222 to call the destination through domain name cc.news.com and
to match number 2222.
[RouterA] voice-setup
[RouterA-voice] dial-program
[RouterA-voice-dial] entity 2222 voip
[RouterA-voice-dial-entity2222] address sip dns cc.news.com port 5060
[RouterA-voice-dial-entity2222] match-template 2222
[RouterA-voice-dial-entity2222] quit

# Configure local number 1111 for POTS entity 1111 and bind FXS voice subscriber line 1/0 to
the POTS entity.
[RouterA-voice-dial] entity 1111 pots
[RouterA-voice-dial-entity1111] line 1/0
[RouterA-voice-dial-entity1111] match-template 1111

2.

Configure Router B:
# Configure an IP address for Ethernet 2/1.
<RouterB> system-view
[RouterB] interface ethernet 2/1
[RouterB-Ethernet2/1] ip address 192.168.2.2 255.255.255.0

# Configure local number 2222 for POTS entity 2222 and bind FXS voice subscriber line 1/0 to
the POTS entity.
<RouterB> system-view
[RouterB] voice-setup
[RouterB-voice] dial-program
[RouterB-voice-dial] entity 2222 pots
[RouterB-voice-dial-entity2222] line 1/0
[RouterB-voice-dial-entity2222] match-template 2222
[RouterB-voice-dial-entity2222] quit

# Configure the destination address 192.168.2.1 and number 1111 for the VoIP entity 1111.
[RouterB-voice-dial]entity 1111 voip
[RouterB-voice-dial-entity1111] address sip ip 192.168.2.1
[RouterB-voice-dial-entity1111] match-template 1111

Verifying the configuration


# Phone 1111 and phone 2222 can call each other.
# Executing the display voice sip call command can display the SIP call information.

Configuring out-of-band DTMF


Network requirements
As shown in Figure 37, configure Router A and Router B to use out-of-band signaling to transmit DTMF
tones so the phones 1111 and 2222 can call each other.

93

Figure 37 Network diagram

Configuration procedure
1.

Configure Router A:
# Configure an IP address for Ethernet 2/1.
<RouterA> system-view
[RouterA] interface ethernet 2/1
[RouterA-Ethernet2/1] ip address 192.168.2.1 255.255.255.0
[RouterA-Ethernet2/1] quit

# Configure call destination address 192.168.2.2 and number 2222 for VoIP entity 2222.
[RouterA] voice-setup
[RouterA-voice] dial-program
[RouterA-voice-dial] entity 2222 voip
[RouterA-voice-dial-entity2222] address sip ip 192.168.2.2
[RouterA-voice-dial-entity2222] match-template 2222

# Configure out-of-band DTMF for VoIP entity 2222.


[RouterA-voice-dial-entity2222] outband sip
[RouterA-voice-dial-entity2222] quit

# Configure local number 1111 for POTS entity 1111 and bind FXS voice subscriber line 1/0 to
the POTS entity.
[RouterA-voice-dial] entity 1111 pots
[RouterA-voice-dial-entity1111] line 1/0
[RouterA-voice-dial-entity1111] match-template 1111

# Configure out-of-band DTMF for POTS entity 1111.


[RouterA-voice-dial-entity1111] outband sip

2.

Configure Router B:
# Configure an IP address for Ethernet 2/1.
<RouterB> system-view
[RouterB] interface ethernet 2/1
[RouterB-Ethernet2/1] ip address 192.168.2.2 255.255.255.0
[RouterB-Ethernet2/1] quit

# Configure call destination address 192.168.2.1 and number 1111 for VoIP entity 1111.
[RouterB] voice-setup
[RouterB-voice] dial-program
[RouterB-voice-dial] entity 1111 voip
[RouterB-voice-dial-entity1111] address sip ip 192.168.2.1
[RouterB-voice-dial-entity1111] match-template 1111

# Configure out-of-band DTMF for VoIP entity 1111.


[RouterB-voice-dial-entity1111] outband sip
[RouterB-voice-dial-entity1111] quit

# Configure local number 2222 for POTS entity 2222 and bind FXS voice subscriber line 1/0 to
the POTS entity.
94

[RouterB-voice-dial] entity 2222 pots


[RouterB-voice-dial-entity2222] line 1/0
[RouterB-voice-dial-entity2222] match-template 2222

# Configure out-of-band DTMF for POTS entity 2222.


[RouterB-voice-dial-entity2222] outband sip

3.

Verify the configuration.


Phones 1111 and 2222 can call each other and the routers use out-of-band signaling to transmit
DTMF tones.

95

Configuring SIP trunk


This chapter describes how to configure SIP trunk.

Background
As shown in Figure 38, in a typical telephone network, a PBX forwards internal calls among enterprise
phones and forwards outbound calls over a PSTN trunk.
Figure 38 Typical telephone network

With the development of IP technology, many enterprises deploy SIP-based IP-PBX networks as shown
in Figure 39. All internal calls are placed using SIP, and external calls are still placed over a PSTN trunk.
The problem is that the enterprises have to maintain both the SIP network and PSTN trunk, which
increases the difficulty of network management.
Figure 39 SIP+PSTN network

As more enterprise IP-PBX networks run SIP and more Internet Telephone Service Providers (ITSPs) use SIP
to provide basic voice communication structures, enterprises urgently need a technology that can connect
the enterprise IP-PBX network to the ITSP over SIP. This technology is called SIP trunk. A typical network
diagram of SIP trunk is shown in Figure 40.
The SIP trunk function can be embedded into the voice gateway or the firewall deployed at the edge of
an enterprise private network. The device providing the SIP trunk function is called the SIP trunk device,
or the SIP trunk gateway.

96

Figure 40 All IP-based network

Features
SIP trunk has the following features:

The SIP trunk device and the ITSP only establish one secure and QoS guaranteed SIP trunk link. The
SIP trunk link can carry multiple concurrent calls, and the ITSP only authenticates the link instead of
each SIP call carried on this link.

The enterprise IP-PBX forwards internal calls. The SIP trunk device forwards outbound calls to the
ITSP, and then the devices in the ITSP forward the calls to the PSTN. Enterprises do not need to
maintain the PSTN trunk, which reduces the costs of hardware and maintenance.

The enterprise can connect to multiple ITSP by setting destination addresses.

With the SIP trunk device deployed, the entire network can use SIP to better support IP
communication services, such as voice, video conferencing, and instant messaging.

The SIP trunk device initiates a new call request to the ITSP on behalf of the user after receiving a call
request from the user, and both the user and the ITSP communicate only with the SIP trunk device.
The SIP trunk device forwards both SIP signaling messages and RTP media messages.

Typical applications
The SIP trunk device is deployed between the enterprise IP-PBX and the ITSP. All internal calls are placed
by the enterprise IP-PBX. All outbound calls are forwarded by the SIP trunk device to the ITSP through the
SIP trunk link. Figure 41 shows a typical SIP trunk technology.

97

Figure 41 SIP trunk network diagram

Protocols and standards

RFC 3261

RFC 3515

SIP connect Technical Recommendation v1.1

SIP trunk configuration task list


Tasks at a glance
(Required.) Enabling SIP-to-SIP calling
(Required.) Configuring a SIP trunk account
(Optional.) Enabling codec transparent transmission
(Optional.) Enabling media flow-around
(Optional.) Enabling DO-EO conversion

Enabling SIP-to-SIP calling


After you enable SIP-to-SIP calling, the device works as a SIP trunk device. HP does not recommend using
a SIP trunk device as a SIP UA.
To enable SIP-to-SIP calling:
Step

Command

Remarks

1.

Enter system view.

system-view

N/A

2.

Enter voice view.

voice-setup

N/A

3.

Enable SIP-to-SIP
calling.

allow-connections sip to sip

By default, SIP-to-SIP calling is disabled.

98

Configuring a SIP trunk account


A SIP trunk account contains a phone number, credentials, and realms assigned by the service provider.
SIP can send a REGISTER request for the phone number to up to six registrars specified with the registrar
command, and it uses the realm value in 401/407 responses from the registrars to identify the matching
credentials. You can configure up to 12 realm values for a phone number, and up to 128 SIP trunk
accounts on the device.
To configure a SIP trunk account:
Step

Command

Remarks

1.

Enter system view.

system-view

N/A

2.

Enter voice view.

voice-setup

N/A

3.

Enter SIP view.

sip

N/A

4.

Create an SIP trunk


account.

credentials number number


username username password
{ cipher | simple } password realm
realm

By default, no SIP trunk account is


created.

Specify a registrar.

registrar registrar-index { ip
ip-address | dns domain-name }
[ port port-number ] [ expires
seconds ] [ refresh-ratio
ratio-percentage ]

By default, no registrar is specified.

5.

Enabling codec transparent transmission


If the SIP trunk device does not support any codecs on the calling and called parties, you can enable
codec transparent transmission. The SIP trunk device transparently forwards codec capability sets
between the two parties without intervening codec negotiation.
To enable codec transparent transmission:
Step

Command

Remarks

1.

Enter system view.

system-view

N/A

2.

Enter voice view.

voice-setup

N/A

3.

Enter dial program view.

dial-program

N/A

4.

Enter VoIP entity view.

entity entity-number voip

N/A

5.

Enable codec transparent


transmission.

codec transparent

By default, codec
transparent transmission is
disabled.

Enabling media flow-around


This feature enables the SIP trunk device to directly forward media packets between SIP endpoints,
without changing the media address for the media packets.
99

To enable media flow-around:


Step

Command

Remarks

1.

Enter system view.

system-view

N/A

2.

Enter voice view.

voice-setup

N/A

3.

Enter dial program view.

dial-program

N/A

4.

Enter VoIP entity view.

entity entity-number voip

N/A

media flow-around

By default, the SIP trunk


device changes the media
address of a media packet
to its own address before
forwarding the media
packet.

5.

Enable media flow-around.

Enabling DO-EO conversion


An INVITE request with SDP Offer is an early offer, and an INVITE request without SDP Offer is a delayed
offer. Some ITSPs mandate early offer calls for charge security. To meet this requirement, enable delayed
offer to early offer (DO-EO) conversion on the SIP trunk device.
To enable DO-EO conversion:
Step

Command

Remarks

1.

Enter system view.

system-view

N/A

2.

Enter voice view.

voice-setup

N/A

3.

Enter dial program view.

dial-program

N/A

4.

Enter VoIP entity view.

entity entity-number voip

N/A
By default, DO-EO
conversion is disabled.

5.

Enable DO-EO conversion.

voice-class sip early-offer forced

Displaying and maintaining SIP trunk


Execute display commands in any view.
Task

Command

Display SIP trunk account


registration status information.

display voice sip register-status

100

This command does not


takes effect if codec
transparent transmission or
media flow-around is
enabled.

SIP trunk configuration examples


Network requirements
As shown in Figure 42, configure the SIP trunk device to forward calls between the private network and
public network.
Figure 42 Network diagram

Configuration procedure
1.

Configure Router A:
# Specify local number 2000 on POTS entity 2000.
<RouterA> system-view
[RouterA] voice-setup
[RouterA-voice] dial-program
[RouterA-voice-dial] entity 2000 pots
[RouterA-voice-dial-entity2000] line 1/0
[RouterA-voice-dial-entity2000] match-template 2000
[RouterA-voice-dial-entity2000] quit

# Configure the called number as 1000, and the destination IP address as 1.1.1.2 (the address of
the interface on the SIP trunk device) on VoIP entity 1000.
[RouterA-voice-dial] entity 1000 voip
[RouterA-voice-dial-entity1000] address sip ip 1.1.1.2
[RouterA-voice-dial-entity1000] match-template 1000

2.

Configure the SIP trunk device:


# Enable SIP-to-SIP calling.
<TG> system-view
[TG] voice-setup
[TG-voice] allow-connections sip to sip
[TG-voice] sip

# Create a SIP trunk account that contains number 2000, username 2000, password 2000, and
realm abc.
[TG-voice-sip] credentials number 2000 username 2000 password simple 2000 realm abc

# Specify the registrar 10.1.1.2 for the SIP trunk account.


101

[TG-voice-sip] registrar 1 ip 10.1.1.2


[TG-voice-sip] quit

# Configure the destination address as 2.1.1.2 for outbound calls from private phone 2000 to
public phone 1000.
[TG-voice] dial-program
[TG-voice-dial] entity 1 voip
[TG-voice-dial-entity1] address sip ip 2.1.1.2
[TG-voice-dial-entity1] match-template 1000
[TG-voice-dial-entity1] quit

# Configure the destination address as 1.1.1.1 for inbound calls from public phone 1000 to
private phone 2000.
[TG-voice-dial] entity 2 voip
[TG-voice-dial-entity2] address sip ip 1.1.1.1
[TG-voice-dial-entity2] match-template 2000

3.

Configure Router B:
# Specify local number 1000 on POTS entity 1000.
<RouterB> system-view
[RouterB] voice-setup
[RouterB-voice] dial-program
[RouterB-voice-dial] entity 1000 pots
[RouterB-voice-dial-entity1000] line 1/0
[RouterB-voice-dial-entity1000] match-template 1000
[RouterB-voice-dial-entity1000] quit

# Configure the called number as 2000, and the destination IP address as 2.1.1.1 (the address of
the interface on the SIP trunk device) on VoIP entity 2000.
[RouterB-voice-dial] entity 2000 voip
[RouterB-voice-dial-entity2000] address sip ip 2.1.1.1
[RouterB-voice-dial-entity2000] match-template 2000

4.

Verify the configuration:


a. Display SIP trunk account information on the SIP trunk device.
[TG-voice-dial-entity2] display voice sip register-status
Number

Entity

Registrar Server

Expires Status

------------------------------------------------------------------------------2000

10.1.1.2:5060

1802

Online

The output shows that the private phone number 2000 has registered with the server at
10.1.1.2.
b. Execute the display voice statistics call-active command to verify that all calls between the
private network and public network pass through the SIP trunk device.
c. On the SIP server of the ITSP, you can view only the interface address of the SIP trunk device,
which means that the SIP trunk device can hide the information of private users.

102

Configuring call services


Call services include call waiting, call hold, call forwarding, call transfer, and call backup.

Call waiting
When subscriber C calls subscriber A who is in a conversation with subscriber B, the call is not rejected.
Like a normal call, subscriber C hears ringback tones, and subscriber A hears call waiting tones. This is
call waiting.
Subscriber A can answer the new call by pressing the flash hook or hanging up to end the call with
subscriber B. In the former case, subscriber B is held. In the latter case, subscriber A is immediately
alerted and can pick up the phone to answer the call originated by subscriber C.

Call hold
When subscriber A in a conversation with subscriber B presses the flash hook, subscriber B is held (in
silent state or listening to waiting tones). The system plays dial tones to subscriber A, waiting for
subscriber A to initiate a new call. If subscriber A fails to dial within a period of time, the system stops
playing dial tones and subscriber A cannot initiate a new call. Subscriber A can resume the call with
subscriber B by pressing the flash hook again. This is call hold

Call forwarding
When the called party cannot answer a call, the called party notifies the calling party of the
forwarded-to number. The calling party re-initiates a call request to the new destination. This is call
forwarding. For example, subscriber A calls subscriber B who is busy, and subscriber A forwards the call
to subscriber C. Then, subscriber A and subscriber C establishes a call. Subscriber A is the initiator of call
forwarding, subscriber B is the recipient, and subscriber C is the final recipient.
The system supports the following types of call forwarding:

Call forwarding unconditionalForwards an incoming call to the predetermined destination,


regardless of the state of the called party.

Call forwarding busyForwards an incoming call to the predetermined destination when the
called party is busy.

Call forwarding no replyForwards an incoming call to the predetermined destination when the
called party provides no answer within a configurable period of time.

Call forwarding unavailableForwards an incoming call to the predetermined destination when


the voice interface of the called party is shut down by executing the shutdown command.

Call transfer
Subscriber A (the originator) and subscriber B (the recipient) are in a conversation. Subscriber A presses
the flash hook to place the call on hold. Subscriber A dials another number to originate a call to

103

subscriber C (the final recipient). After Subscriber A hangs up, the call between subscriber B and
subscriber C is established. This is call transfer.
There are three types of call transfer:

Call transfer without notificationThe originator hangs up before receiving ringback tones from
the final recipient.

Call transfer with early notificationThe originator hangs up after receiving ringback tones from
the final recipient and before speaking with the final recipient.

Call transfer with notificationThe originator hangs up after speaking with the final recipient.

During the call transfer process, if the recipient does not support call transfer or the final recipient is busy
or provides no reply, the initiator can re-establish the original call.

Call backup
The calling party might fail to receive a response after initiating a call to the called party through the IP
or PSTN network. In this case, if there is a backup link (PSTN link or VoIP link) to the called party, the
calling party can re-initiate a call to the called party over the backup link. This is call backup.

Call services configuration task list


Call waiting, call backup, call transfer are enabled on the device by default. No configurations are
required for them.
To configure call services, perform the following tasks:
Tasks at a glance
(Optional.) Configuring the call hold mode
(Optional.) Configuring call forwarding

Configuring the call hold mode


There are two call hold modes:

Silent mode (inactive)During call hold, the held party hears silence. This mode is configured on
the holding party (the initiator of call hold).

Unidirectional playing mode (sendonly)During call hold, the held party hears tones or music
played by a third-party music server. To play tones, you need to configure the sendonly keyword on
the holding party. To play music on hold by the third-party music server, you must configure the
sendonly moh-number string option on the SIP trunk device and configure the inactive keyword on
the holding party. For information about configuring a SIP trunk device, see "Configuring SIP trunk."

To configure the call hold mode:


Step

Command

Remarks

1.

Enter system view.

system-view

N/A

2.

Enter voice view.

voice-setup

N/A

104

Step
3.

Configure the call hold mode.

Command

Remarks

call-hold-format { inactive |
sendonly [ moh-number string ] }

The default is inactive.

Configuring call forwarding


Before configuring call forwarding, make sure there is a route from the initiator to the final recipient.
You need to correctly plan forwarded-to numbers to avoid incorrect numbers and circular calls.
A call can be forwarded five times at most.
To configure call forwarding:
Step

Command

Remarks

1.

Enter system view.

system-view

N/A

2.

Enter voice dial program view.

dial-program

N/A

3.

Create a POTS entity and


enter POTS entity view.

entity entity-number pots

N/A
By default, call forwarding is
disabled.

4.

Configure call forwarding.

call-forwarding { no-reply |
on-busy | unavailable |
unconditional } number number

The unconditional, unavailable,


on-busy, and no-reply call
forwarding types can be
configured at the same time and
have a descending order of
priority.

Call services configuration examples


This section provides call services configuration examples.

Call waiting configuration example


Network requirements
As shown in Figure 43, configure call waiting so when a user places a call from Telephone C to
Telephone A that is in a conversation with Telephone B, the subscriber at Telephone C hears ringback
tones, and the subscriber at Telephone A hears call waiting tones.

105

Figure 43 Network diagram


Router A

Router B

Eth1/1
10.1.1.1/24

1000
Telephone A

Eth1/2
10.1.1.2/24

Eth1/1
20.1.1.2/24

Router C

Eth1/1
20.1.1.1/24

3000
Telephone C

2000
Telephone B

Configuration procedure
Before performing the following configuration, make sure Router A, Router B and Router C can reach
each other.
1.

Configure Router A:
# Create VoIP entity 2000, configure the destination IP address as 10.1.1.2, and configure the
called number as 2000.
<RouterA> system-view
[RouterA] voice-setup
[RouterA-voice] dial-program
[RouterA-voice-dial] entity 2000 voip
[RouterA-voice-dial-entity2000] address sip ip 10.1.1.2
[RouterA-voice-dial-entity2000] match-template 2000
[RouterA-voice-dial-entity2000] quit

# Create VoIP entity 3000, configure the destination IP address as 20.1.1.2, and configure the
called number as 3000.
[RouterA-voice-dial] entity 3000 voip
[RouterA-voice-dial-entity3000] address sip ip 20.1.1.2
[RouterA-voice-dial-entity3000] match-template 3000
[RouterA-voice-dial-entity3000] quit

# Configure the local number as 1000 for POTS entity 1000, and bind FXS interface line 1/0 to
the POTS entity.
[RouterA-voice-dial] entity 1000 pots
[RouterA-voice-dial-entity1000] line 1/0
[RouterA-voice-dial-entity1000] match-template 1000

2.

Configure Router B:
# Create VoIP entity 1000, configure the destination IP address as 10.1.1.1, and configure the
called number as 1000.
<RouterB> system-view
[RouterB] voice-setup
[RouterB-voice] dial-program
[RouterB-voice-dial] entity 1000 voip
[RouterB-voice-dial-entity1000] address sip ip 10.1.1.1
[RouterB-voice-dial-entity1000] match-template 1000
[RouterB-voice-dial-entity1000] quit

106

# Configure the local number as 2000 for POTS entity 2000, and bind FXS interface line 1/0 to
the POTS entity.
[RouterB-voice-dial] entity 2000 pots
[RouterB-voice-dial-entity2000] line 1/0
[RouterB-voice-dial-entity2000] match-template 2000

3.

Configure Router C:
# Configure the local number as 3000 for POTS entity 3000, and bind FXS interface line 1/0 to
the POTS entity.
<RouterC> system-view
[RouterC] voice-setup
[RouterC-voice] dial-program
[RouterC-voice-dial] entity 3000 pots
[RouterC-voice-dial-entity3000] line 1/0
[RouterC-voice-dial-entity3000] match-template 3000
[RouterC-voice-dial-entity3000] quit

# Create VoIP entity 1000, configure the destination IP address as 10.1.1.1, and configure the
called number as 1000.
[RouterB-voice-dial] entity 1000 voip
[RouterB-voice-dial-entity1000] address sip ip 10.1.1.1
[RouterB-voice-dial-entity1000] match-template 1000

Verifying the configuration


Operation 1: When the subscriber at Telephone C dials 1000 to call Telephone A that is in a
conversation with Telephone B, the subscriber at Telephone C hears ringback tones, and the subscriber
at Telephone A hears call waiting tones. If then the subscriber at Telephone A hangs up, Telephone A
rings, and the subscriber at Telephone A can pick up the phone to start a conversation with Telephone
C.
Operation 2: When the subscriber at Telephone C dials 1000 to call Telephone A that is in a
conversation with Telephone B, the subscriber at Telephone A can press the flash hook to start a
conversation with Telephone C, and Telephone B is held. The subscriber at Telephone A can press the
flash hook again to continue the talk with Telephone B, and then Telephone C is held.

Call forwarding configuration example


Network requirements
As shown in Figure 44, configure call forwarding on Router B so when a user places a call from
Telephone A to Telephone B, Router B forwards the call to Telephone C when Telephone B is busy, and
Telephone A and Telephone C start a conversation.

107

Figure 44 Network diagram


Router A

Router B

Eth1/1
10.1.1.1/24

1000
Telephone A

Eth1/2
10.1.1.2/24

Eth1/1
20.1.1.2/24

Router C

Eth1/1
20.1.1.1/24

3000
Telephone C

2000
Telephone B

Configuration procedure
Before performing the following configuration, make sure Router A, Router B and Router C can reach
each other.
1.

Configure Router A:
# Create VoIP entity 2000, configure the destination IP address as 10.1.1.2, and configure the
called number as 2000.
<RouterA> system-view
[RouterA] voice-setup
[RouterA-voice] dial-program
[RouterA-voice-dial] entity 2000 voip
[RouterA-voice-dial-entity2000] address sip ip 10.1.1.2
[RouterA-voice-dial-entity2000] match-template 2000
[RouterA-voice-dial-entity2000] quit

# Configure the local number as 1000 for POTS entity 1000, and bind FXS interface line 1/0 to
the POTS entity.
[RouterA-voice-dial] entity 1000 pots
[RouterA-voice-dial-entity1000] line 1/0
[RouterA-voice-dial-entity1000] match-template 1000

2.

Configure Router B:
# Create VoIP entity 3000, configure the destination IP address as 20.1.1.2, and configure the
number template as 3000.
<RouterB> system-view
[RouterB] voice-setup
[RouterB-voice] dial-program
[RouterB-voice-dial] entity 3000 voip
[RouterB-voice-dial-entity3000] address sip ip 20.1.1.2
[RouterB-voice-dial-entity3000] match-template 3000
[RouterB-voice-dial-entity3000] quit

# Configure the local number as 2000 for POTS entity 2000, and bind FXS interface line 1/0 to
the POTS entity.
[RouterB-voice-dial] entity 2000 pots
[RouterB-voice-dial-entity2000] line 1/0
[RouterB-voice-dial-entity2000] match-template 2000

# Configure call forwarding.


<RouterB> system-view

108

[RouterB] subscriber-line 1/0


[RouterB-subscriber-line1/0] call-forwarding on-busy number 3000

3.

On Router C, configure the local number as 3000 for POTS entity 3000, and bind FXS interface
line 1/0 to the POTS entity.
<RouterC> system-view
[RouterC] voice-setup
[RouterC-voice] dial-program
[RouterC-voice-dial] entity 3000 pots
[RouterC-voice-dial-entity3000] line 1/0
[RouterC-voice-dial-entity3000] match-template 3000

Call transfer configuration example


Network requirements
As shown in Figure 45, configure call transfer to achieve the following purpose:
When Telephone A and Telephone B are in a conversation, the subscriber at Telephone A can press the
flash hook to put the call on hold, and then dials 3000 to call Telephone C. After the subscriber at
Telephone A hangs up, Telephone B and Telephone C start a conversation.
Figure 45 Network diagram
Router A

Router B

Eth1/1
10.1.1.1/24

1000
Telephone A

Eth1/2
10.1.1.2/24

Eth1/1
20.1.1.2/24

Router C

Eth1/1
20.1.1.1/24

3000
Telephone C

2000
Telephone B

Configuration procedure
Before performing the following configuration, make sure Router A, Router B and Router C can reach
each other.
1.

Configure Router A:
# Create VoIP entity 2000, configure the destination IP address as 10.1.1.2, and configure the
called number as 2000.
<RouterA> system-view
[RouterA] voice-setup
[RouterA-voice] dial-program
[RouterA-voice-dial] entity 2000 voip
[RouterA-voice-dial-entity2000] address sip ip 10.1.1.2
[RouterA-voice-dial-entity2000] match-template 2000
[RouterA-voice-dial-entity2000] quit

# Create VoIP entity 3000, configure the destination IP address as 20.1.1.2, and configure the
called number as 3000.
[RouterA-voice-dial] entity 3000 voip

109

[RouterA-voice-dial-entity3000] address sip ip 20.1.1.2


[RouterA-voice-dial-entity3000] match-template 3000
[RouterA-voice-dial-entity3000] quit

# Configure the local number as 1000 for POTS entity 1000, and bind FXS interface line 1/0 to
the POTS entity.
[RouterA-voice-dial] entity 1000 pots
[RouterA-voice-dial-entity1000] line 1/0
[RouterA-voice-dial-entity1000] match-template 1000

2.

On Router B, configure the local number as 2000 for POTS entity 2000, and bind FXS interface
line 1/0 to the POTS entity.
<RouterB> system-view
[RouterB] voice-setup
[RouterB-voice] dial-program
[RouterB-voice-dial] entity 2000 pots
[RouterB-voice-dial-entity2000] line 1/0
[RouterB-voice-dial-entity2000] match-template 2000

3.

On Router C, configure the local number as 3000 for POTS entity 3000, and bind FXS interface
line 1/0 to the POTS entity.
<RouterC> system-view
[RouterC] voice-setup
[RouterC-voice] dial-program
[RouterC-voice-dial] entity 3000 pots
[RouterC-voice-dial-entity3000] line 1/0
[RouterC-voice-dial-entity3000] match-template 3000

Call backup configuration example


Network requirements
As shown in Figure 46, Router A and Router B are connected through two IP links. One of the two links
has a higher priority and serves as the primary link. Configure call backup so when the primary link goes
down, the backup link can take over.
Figure 46 Network diagram

Configuration procedure
1.

Configure Router A:
# Create VoIP entity 2000 with a priority of 1, configure the destination IP address as 10.1.1.2,
and configure the called number as 2000.
<RouterA> system-view
[RouterA] voice-setup
[RouterA-voice] dial-program
[RouterA-voice-dial] entity 2000 voip

110

[RouterA-voice-dial-entity2000] address sip ip 10.1.1.2


[RouterA-voice-dial-entity2000] match-template 2000
[RouterA-voice-dial-entity2000] priority 1
[RouterA-voice-dial-entity2000] quit

# Create VoIP entity 3000 with a priority of 2, configure the destination IP address as 20.1.1.2,
and configure the called number as 2000.
[RouterA-voice-dial] entity 3000 voip
[RouterA-voice-dial-entity3000] address sip ip 20.1.1.2
[RouterA-voice-dial-entity3000] match-template 2000
[RouterA-voice-dial-entity2000] priority 2
[RouterA-voice-dial-entity3000] quit

# Configure the local number as 1000 for POTS entity 1000, and bind FXS interface line 1/0 to
the POTS entity.
[RouterA-voice-dial] entity 1000 pots
[RouterA-voice-dial-entity1000] line 1/0
[RouterA-voice-dial-entity1000] match-template 1000

2.

On Router B, configure the local number as 2000 for POTS entity 2000, and bind FXS interface
line 1/0 to the POTS entity.
<RouterB> system-view
[RouterB] voice-setup
[RouterB-voice] dial-program
[RouterB-voice-dial] entity 2000 pots
[RouterB-voice-dial-entity2000] line 1/0
[RouterB-voice-dial-entity2000] match-template 2000

111

Index
ABCDEFOPST
Configuring SIP UA registration,81

Configuring the call destination address for a VoIP


entity,85

Adjusting parameters for voice interfaces,18


Analog voice interface configuration examples,21

Configuring the call hold mode,104

Configuring the ISDN protocol,44

Background,96
Binding a digital voice interface to a POTS entity,45

Configuring the maximum number of total calls


allowed by a voice entity,66

Binding an FXS interface to an FXO interface,11

BSV interfaces,29

Dial program configuration examples,73

Digital voice interface configuration examples,45

Call services configuration examples,105

Displaying and maintaining analog voice


interfaces,21

Call services configuration task list,104

Displaying and maintaining digital voice interfaces,45

Configuration task list,61

Displaying and maintaining SIP,89

Configuration task list,1

Displaying and maintaining SIP trunk,100

Configuration task list,29

Displaying and maintaining voice entities,60

Configuring a BSV interface,32


Configuring a dial prefix,73

Configuring a number match mode,64

E&M interface,1

Configuring a number sending mode,71

E1 and T1 interfaces,29

Configuring a POTS entity,52

Enabling codec transparent transmission,99

Configuring a priority for a voice entity,71

Enabling DO-EO conversion,100

Configuring a SIP trunk account,99

Enabling media flow-around,99

Configuring a timeslot set,33

Enabling private line auto ring-down,64

Configuring a VoIP entity,56

Enabling SIP-to-SIP calling,98

Configuring an E&M interface,12

Configuring an FXO interface,6

Features,97

Configuring an FXS interface,3

FXO interface,1

Configuring basic functions,2

FXS interface,1

Configuring basic parameters for a T1 interface,31


Configuring basic parameters for an E1 interface,30

Configuring call forwarding,105

Overview,79

Configuring call progress tones,2

Overview,52

Configuring caller control,61

Configuring caller group control,63

Protocols and standards,98

Configuring DTMF,16
Configuring extended SIP functions,86

Configuring number substitution,66

SIP configuration task list,80

Configuring R2 signaling,34
112

SIP trunk configuration examples,101

SIP trunk configuration task list,98

Typical applications,97

SIP UA configuration examples,89

113

Das könnte Ihnen auch gefallen