Example for Configuring Distributed Networking
Networking Requirements
To reduce toll call costs, an enterprise connects two branches in different cities through a SIP trunk. Each branch connects to the IMS through a SIP AT0 trunk or connects to the PSTN through a PRA trunk.
When an intra-office user in city A dials a PSTN number in city B, the call is routed by the PBX to the IP PBX through the SIP IP trunk, routed by the IP PBX to the PSTN through the PRA trunk, and finally connected to the outer-office user in city B. When an intra-office user in city B dials a local number in city A, the call process is similar, in which the call is first routed to the PBX.
This scenario reduces toll call costs. Figure 2-82 shows the distributed networking.
This topic assumes that you want to implement the following requirements:
- The country code is 86, the area code of city A is 571, and the area code of city B is 577.
- The IP address of the IMS is 192.168.1.4, and the port number is 5060.
- The automatic switchboard number of the PBX is 83787005, and the automatic switchboard number of the IP PBX is 83786005.
- PBX users and IP PBX users make calls to each other by dialing short numbers.
- When a PBX user or an IP PBX user dials a local number in city B, the call is routed through the IP PBX. If the calling user has a long number, the long number is displayed as the calling number. If the calling user does not have a long number, 83786005 is displayed as the calling number.
- When an IP PBX user or a PBX user dials a local number in city A, the call is routed through the PBX. If the calling user has a long number, the long number is displayed as the calling number. If the calling user does not have a long number, 83787005 is displayed as the calling number.
Prerequisites
The IVR configuration has been completed. For details, see IVR. The value of vu-service-name configured for the automatic switchboard is the value of service for the IVR.
Data Plan
The data plan provided in this example is for reference only. Plan data by negotiating with users and the carrier.
Short Number Segment |
Long Number Segment |
Local Device |
---|---|---|
7000–7004 |
83787000–83787004 |
PBX |
7100–7104 |
N/A |
|
N/A |
83786005 |
Automatic switchboard of the PBX |
6000–6004 |
83786000–83786004 |
IP PBX |
6100–6104 |
N/A |
|
N/A |
83787005 |
Automatic switchboard of the IP PBX |
NE |
IP Address |
Subnet Mask |
---|---|---|
PBX |
192.168.1.2 |
255.255.255.0 |
IP PBX |
192.168.1.3 |
255.255.255.0 |
Slot ID/Subcard ID/Port ID |
Route |
Peer Office |
---|---|---|
3/0/0 |
0 |
PSTN |
Signaling IP Address |
Port Number |
Media IP Address |
Peer IP Address |
Peer Port Number |
Route |
---|---|---|---|---|---|
192.168.1.2 |
5062 |
192.168.1.2 |
192.168.1.3 |
5062 |
1 |
Signaling IP Address |
Port Number |
Media IP Address |
Peer IP Address |
Peer Port Number |
Route |
Registration ID |
Registration Password |
---|---|---|---|---|---|---|---|
192.168.1.2 |
5061 |
192.168.1.2 |
192.168.1.4 |
5060 |
3 |
+862083787005@abcd.com |
12345678 |
Prefix |
Type |
Route |
Calling Number Change |
Called Number Change |
Local Device |
---|---|---|---|---|---|
7 |
Intra-office |
N/A |
N/A |
N/A |
PBX |
83787 |
Intra-office |
N/A |
N/A |
N/A |
|
9 |
Outgoing |
3 |
Changing the number to 83786005 |
Deleting the first digit |
|
6 |
Outgoing |
1 |
N/A |
N/A |
|
90577 |
Outgoing |
1 |
N/A |
N/A |
|
6 |
Intra-office |
N/A |
N/A |
N/A |
IP PBX |
83786 |
Intra-office |
N/A |
N/A |
N/A |
|
9 |
Outgoing |
0 |
Changing the number to 83787005 |
Deleting the first digit |
|
7 |
Outgoing |
2 |
N/A |
N/A |
|
90571 |
Outgoing |
2 |
N/A |
N/A |
Prefix |
Outgoing Trunk |
Calling Number Change |
Called Number Change |
---|---|---|---|
9 |
PRA |
83786005 |
Deleting the first digit |
SIP AT0 |
83787005 |
Deleting the first digit |
Procedure
- Set the service mode to PBX.
<Huawei> system-view [Huawei] voice [Huawei-voice] service-mode pbx [Huawei-voice] return [Huawei] save The current configuration will be written to the device. Are you sure to continue? (y/n)[n]:yIt will take several minutes to save configuration file, please wait.......... Configuration file had been saved successfully Note: The configuration file will take effect after being activated <Huawei>reboot Info: The system is comparing the configuration, please wait. System will reboot! Continue ? [y/n]:yInfo: system is rebooting, please wait...
- Set the Ethernet IP address of interface GE0/0/0 to 192.168.1.2, and add 192.168.1.2 to the media IP address pool and signaling IP address pool of the interface.
<Huawei> system-view [Huawei] interface gigabitethernet 0/0/0 [Huawei-GigabitEthernet0/0/0] ip address 192.168.1.2 24 [Huawei-GigabitEthernet0/0/0] quit [Huawei] voice [Huawei-voice] voip-address media interface gigabitethernet 0/0/0 192.168.1.2 [Huawei-voice] voip-address signalling interface gigabitethernet 0/0/0 192.168.1.2
- Configure the SIP server.
[Huawei-voice] sipserver [Huawei-voice-sipserver] signalling-address ip 192.168.1.2 port 5060 [Huawei-voice-sipserver] media-ip 192.168.1.2 [Huawei-voice-sipserver] register-uri abcd.com [Huawei-voice-sipserver] home-domain abcd.com [Huawei-voice-sipserver] reset [Huawei-voice-sipserver] quit
- Set the default country code to 86 and default area code to 571, and enable country code change and area code change.
[Huawei-voice] pbx default-country-code 86 default-area-code 571 [Huawei-voice] pbx enable-country-area-transform enable
- Configure the enterprise and DN set for numbers.
[Huawei-voice] enterprise hw [Huawei-voice-enterprise-hw] dn-set hwdnset [Huawei-voice-enterprise-hw] save [Huawei-voice-enterprise-hw] quit
- Configure prefixes.
- Configure user numbers.
- Configure trunk groups.
- Configure post-routing number change for the PBX.
The procedure for configuring post-routing number change for the IP PBX is similar. You only need to change the trunk to PRA and calling number to 83786005.
[Huawei-voice] afterroute-change 9_6xxx_sipat0 [Huawei-voice-afterroute-change-9_6xxx_sipat0] callprefix 9 [Huawei-voice-afterroute-change-9_6xxx_sipat0] trunk-group sipat0 [Huawei-voice-afterroute-change-9_6xxx_sipat0] condition caller-telno 6xxx [Huawei-voice-afterroute-change-9_6xxx_sipat0] caller del-then-insert 1 32 83786005 [Huawei-voice-afterroute-change-9_6xxx_sipat0] called del 1 1 [Huawei-voice-afterroute-change-9_6xxx_sipat0] quit [Huawei-voice] afterroute-change 9_7xxx_sipat0 [Huawei-voice-afterroute-change-9_7xxx_sipat0] callprefix 9 [Huawei-voice-afterroute-change-9_7xxx_sipat0] trunk-group sipat0 [Huawei-voice-afterroute-change-9_7xxx_sipat0] condition caller-telno 7xxx [Huawei-voice-afterroute-change-9_7xxx_sipat0] caller del-then-insert 1 32 83787005 [Huawei-voice-afterroute-change-9_7xxx_sipat0] called del 1 1 [Huawei-voice-afterroute-change-9_7xxx_sipat0] quit
- Verify the configuration.
Item
Expected Result
Possible Fault Cause
Intra-office call
Calls can be made properly, and the calling number is correctly displayed. For example, user 7000 can dial 7100 to make a call to user 7100, and the calling number displayed to user 7100 is 7000.
The intra-office call prefix is incorrectly configured.
Outgoing call made by an intra-office user with a long number
Calls can be made properly, and the calling number is correctly displayed. For example:- User 7000 can dial 6000 to make a call to user 6000, and the calling number displayed to user 6000 is 7000.
- User 7000 can make an outgoing call through the SIP AT0 trunk, and the calling number displayed to the called party is 83787000.
- User 7000 can make an outgoing call through the PRA trunk, and the calling number displayed to the called party is 83787000.
- The outgoing call prefix is incorrectly configured.
- The outgoing trunk is incorrectly configured, or the reset command is not executed after the configuration.
Outgoing call made by an intra-office user without a long number
Calls can be made properly, and the calling number is correctly displayed. For example:- User 7100 can dial 6000 to make a call to user 6000, and the calling number displayed to user 6000 is 7100.
- User 7100 can make an outgoing call through the SIP AT0 trunk, and the calling number displayed to the called party is 83787005.
- User 7100 can make an outgoing call through the PRA trunk, and the calling number displayed to the called party is 83786005.
-
Incoming call
Calls can be made properly. For example, an outer-office user can dial 83787005 and then dial 7000 as prompted to connect to user 7000.
N/A
Configuration Files
- Router configuration
# clock source 0 3/0/0 priority 9 # set workmode slot 3 e1t1 e1-voice # interface GigabitEthernet0/0/0 ip address 192.168.1.2 255.255.255.0 # voice voip-address media interface GigabitEthernet 0/0/0 192.168.1.2 voip-address signalling interface GigabitEthernet 0/0/0 192.168.1.2 pbx default-area-code 571 pbx enable-country-area-transform enable # port ve1 3/0/0 signal CCS # callroute 0 # callroute 1 # callroute 3 # enterprise hw dn-set hwdnset # sipserver signalling-address ip 192.168.1.2 port 5060 media-ip 192.168.1.2 register-uri abcd.com home-domain abcd.com # trunk-group pra dss1-user callroute 0 trunk-pra 3/0/0 # trunk-group sipat0 sip trunk-circuit callroute 3 signalling-address ip 192.168.1.2 port 5061 media-ip 192.168.1.2 peer-address static 192.168.1.4 5060 register-uri abcd.com home-domain abcd.com number-parameter 19 1 trunk-sipat0 +862083787005@abcd.com password cipher %^%#sh1hK7Y[vIDIo]@%y)"(^`xyQQLvuFT&:]Fob_b5%^%# # trunk-group sipip01 sip no-register callroute 1 signalling-address ip 192.168.1.2 port 5062 media-ip 192.168.1.2 peer-address static 192.168.1.3 5062 register-uri abcd.com home-domain abcd.com # callprefix 6 prefix 6 call-type category basic-service attribute 1 digit-length 4 32 callroute 1 # callprefix 7 prefix 7 call-type category basic-service attribute 0 digit-length 4 32 # callprefix 9 prefix 9 call-type category basic-service attribute 1 digit-length 1 32 callroute 3 # callprefix ivr enterprise hw dn-set local prefix 83786005 call-type category vu-service vu-service-name vudefault digit-length 8 32 # pbxuser 7000 sipue sipue 7000 telno 7000 long-telno 83787000 call-right out all eid-para password cipher %^%#%')'%i~C[2>B0.~$l6E@D)H|+:L0I!`Dg@,2>qjJ%^%# # pbxuser 7100 pots port 2/0/0 telno 7100 long-telno 83787100 call-right out all # afterroute-change 9_6xxx_sipat0 callprefix 9 trunk-group sipat0 condition caller-telno 6xxx caller del-then-Insert 1 32 83786005 called del 1 1 # afterroute-change 9_7xxx_sipat0 callprefix 9 trunk-group sipat0 condition caller-telno 7xxx caller del-then-Insert 1 32 83787005 called del 1 1 #