Example for Configuring PBX Sharing for Different Enterprises
Networking Requirements
Users A and B belong to enterprise 1. Users C and D belong to enterprise 2. Enterprises 1 and 2 are in the same industrial campus. By configuring different enterprises on the device, you can logically isolate multiple enterprises' voice services, implementing PBX sharing. Enterprises 1 and 2 can use virtual PBXs to implement voice services for intra-office users and use a unified egress to implement voice services between intra-office and outer-office users. This reduces enterprise costs as well as the carrier's access points. Figure 2-84 shows the PBX sharing network.
This topic assumes that you want to implement the following requirements:
- The external number allocated by the carrier to enterprise 1 is 56623000. When an outer-office user dials 56623000, user B's phone rings. If the outer-office user wants to make a call to an intra-office user other than user B, the call can be transferred by user B to the target user.
- The external number allocated by the carrier to enterprise 2 is 56623001. When an outer-office user dials 56623001, user C's phone rings. If the outer-office user wants to make a call to an intra-office user other than user C, the call can be transferred by user C to the target user.
- The country code is 86, and the area code is 571.
- The internal numbers of users A, B, C, and D are 7100, 7000, 6000, and 6100 respectively.
- Both the signaling IP address and media IP address are 192.168.1.2.
- Users A and B belong to enterprise hw. The DN set is local. The intra-office call prefix is 7. The outgoing call prefix is 8. Users C and D belong to enterprise hw1. The DN set is local1. The intra-office call prefix is 6. The outgoing call prefix is 9.
- A SIP AT0 trunk is used to route outgoing calls. The IP address of the IMS is 192.168.10.10, and the port number is 5060.
- Post-routing number change scheme 8 is configured to retain calling numbers and delete the first digit of called numbers when users of enterprise 1 make outgoing calls through the SIP AT0 trunk. Post-routing number change scheme 9 is configured to retain calling numbers and delete the first digit of called numbers when users of enterprise 2 make outgoing calls through the SIP AT0 trunk.
Configuration Roadmap
- Set the service mode of the router to PBX, and set public parameters. Configure enterprises 1 and 2, and connect the enterprises to the router.
- Configure the users, call prefixes, trunk group, call route, and post-routing number change for enterprise 1 so that intra-office users of enterprise 1 can make intra-office and outgoing calls.
- Configure the users, call prefixes, trunk group, call route, and post-routing number change for enterprise 2 so that intra-office users of enterprise 2 can make intra-office and outgoing calls.
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 |
Remarks |
---|---|---|
7000–7004 |
N/A |
Enterprise 1 |
7100–7104 |
N/A |
|
N/A |
56623000 |
|
6000–6004 |
N/A |
Enterprise 2 |
6100–6104 |
N/A |
|
N/A |
56623001 |
Signaling IP Address |
Port Number |
Media IP Address |
Peer IP Address |
Peer Port Number |
Route |
Remarks |
Registration ID |
Registration Password |
---|---|---|---|---|---|---|---|---|
192.168.1.2 |
5061 |
192.168.1.2 |
192.168.1.10 |
5060 |
0 |
Enterprise 1 |
56623000 |
12345678 |
192.168.1.2 |
5062 |
192.168.1.2 |
192.168.1.10 |
5060 |
0 |
Enterprise 2 |
56623001 |
12345678 |
Prefix |
Type |
Route |
Remarks |
---|---|---|---|
7 |
Intra-office |
N/A |
Enterprise 1 |
8 |
Outgoing |
0 |
|
6 |
Intra-office |
N/A |
Enterprise 2 |
9 |
Outgoing |
0 |
Prefix |
Outgoing Trunk |
Called Number Change |
Remarks |
---|---|---|---|
8 |
SIP AT0 |
Deleting the first digit |
Enterprise 1 |
9 |
SIP AT0 |
Deleting the first digit |
Enterprise 2 |
Procedure
- Set the service mode to PBX.
<Huawei> system-view [Huawei] voice [huawei-voice] service-mode pbx [huawei-voice] quit [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 0/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 [Huawei-voice] 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 [Huawei-voice] pbx default-country-code 86 default-area-code 571 [Huawei-voice] pbx enable-country-area-transform enable
- 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
- Configure the enterprise and DN set for numbers.
[Huawei-voice] enterprise hw [Huawei-voice-enterprise-hw] dn-set local [Huawei-voice-enterprise-hw] quit [Huawei-voice] enterprise hw1 [Huawei-voice-enterprise-hw1] dn-set local1 [Huawei-voice-enterprise-hw1] quit
- Set the enterprise of users A and B to hw, the DN set to local, the intra-office call prefix to 7, and the outgoing call prefix to 8.
Set the enterprise of users C and D to hw1, the DN set to local1, the intra-office call prefix to 6, and the outgoing call prefix to 9.
[Huawei-voice] callprefix 7 [Huawei-voice-callprefix-7] enterprise hw dn-set local [Huawei-voice-callprefix-7] prefix 7 [Huawei-voice-callprefix-7] call-type category basic-service attribute 0 [Huawei-voice-callprefix-7] digit-length 4 32 [Huawei-voice-callprefix-7] quit [Huawei-voice] callprefix 8 [Huawei-voice-callprefix-8] enterprise hw dn-set local [Huawei-voice-callprefix-8] prefix 8 [Huawei-voice-callprefix-8] call-type category basic-service attribute 1 [Huawei-voice-callprefix-8] digit-length 1 32 [Huawei-voice-callprefix-8] quit [Huawei-voice] callroute 8 [Huawei-voice-callroute-8] quit [Huawei-voice] callprefix 8 [Huawei-voice-callprefix-8] callroute 8 [Huawei-voice-callprefix-8] quit
- Configure SIP user A whose user number is 7100 and authentication password is a123456.
Configure users D whose enterprise is hw1 and user number is 6100. For details, see the configuration of user 7100.
[Huawei-voice] pbxuser 7100 sipue enterprise hw [Huawei-voice-pbxuser-7100] dn-set local [Huawei-voice-pbxuser-7100] sipue 7100 [Huawei-voice-pbxuser-7100] telno 7100 [huawei-voice-pbxuser-7100] eid-para password cipher Please input user password(6-64 chars): ******* [Huawei-voice-pbxuser-7100] quit
- Configure user B 7000.
Configure users C whose enterprise is hw1 and user number is 6000. For details, see the configuration of user 7000.
[Huawei-voice] pbxuser 7000 pots enterprise hw [Huawei-voice-pbxuser-7000] dn-set local [Huawei-voice-pbxuser-7000] port 2/0/0 [Huawei-voice-pbxuser-7000] telno 7000 [Huawei-voice-pbxuser-7000] call-right in idd enable [Huawei-voice-pbxuser-7000] call-right out idd enable [Huawei-voice-pbxuser-7000] quit
- Configure a SIP AT0 trunk group.
[Huawei-voice] trunk-group sipat0 sip trunk-circuit [Huawei-voice-trunkgroup-sipat0] signalling-address ip 192.168.1.2 port 5061 [Huawei-voice-trunkgroup-sipat0] enterprise hw dn-set local [Huawei-voice-trunkgroup-sipat0] media-ip 192.168.1.2 [Huawei-voice-trunkgroup-sipat0] peer-address static 192.168.10.10 5060 [Huawei-voice-trunkgroup-sipat0] register-uri abcd.com [Huawei-voice-trunkgroup-sipat0] home-domain abcd.com [Huawei-voice-trunkgroup-sipat0] trunk-sipat0 56623000 default-called-telno 7000 password cipher Please input user password(1-32 chars):******** [Huawei-voice-trunkgroup-sipat0] number-parameter 19 0 [Huawei-voice-trunkgroup-sipat0] reset Note: Trunkgroup reset succeeds. [Huawei-voice-trunkgroup-sipat0] quit [Huawei-voice] trunk-group sipat01 sip trunk-circuit [Huawei-voice-trunkgroup-sipat01] signalling-address ip 192.168.1.2 port 5062 [Huawei-voice-trunkgroup-sipat01] enterprise hw1 dn-set local1 [Huawei-voice-trunkgroup-sipat01] media-ip 192.168.1.2 [Huawei-voice-trunkgroup-sipat01] peer-address static 192.168.10.10 5060 [Huawei-voice-trunkgroup-sipat01] register-uri abcd.com [Huawei-voice-trunkgroup-sipat01] home-domain abcd.com [Huawei-voice-trunkgroup-sipat01] trunk-sipat0 56623001 default-called-telno 6000 password cipher Please input user password(1-32 chars):******** [Huawei-voice-trunkgroup-sipat0] number-parameter 19 0 [Huawei-voice-trunkgroup-sipat01] reset Note: Trunkgroup reset succeeds. [Huawei-voice-trunkgroup-sipat0] quit
- Configure a call route and post-routing number change.
Configure post-routing number change scheme 8 to retain calling numbers and delete the first digit of called numbers when users of enterprise 1 make outgoing calls through the SIP AT0 trunk.
Configure post-routing number change scheme 9 to retain calling numbers and delete the first digit of called numbers when users of enterprise 2 make outgoing calls through the SIP AT0 trunk.
[Huawei-voice] callprefix 8 [Huawei-voice-callprefix-8] callroute 8 [Huawei-voice-callprefix-8] quit [Huawei-voice] trunk-group sipat0 [Huawei-voice-trunkgroup-sipat0] callroute 8 [Huawei-voice-trunkgroup-sipat0] quit [Huawei-voice] afterroute-change 8 [Huawei-voice-afterroute-change-8] callprefix 8 [Huawei-voice-afterroute-change-8] trunk-group sipat0 [Huawei-voice-afterroute-change-8] caller no-change [Huawei-voice-afterroute-change-8] called del 1 1 [Huawei-voice-afterroute-change-8] save
- 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
Calls can be made properly, and the calling number is correctly displayed. For example, user 7000 can make an outgoing call through the SIP AT0 trunk, and the calling number displayed to the called party is 56623000.
- The outgoing call prefix is incorrectly configured.
- The outgoing trunk is incorrectly configured.
Incoming call
Calls can be made properly. For example, an outer-office user can dial 56623000 and be transferred to the target user through user 7000.
N/A
Configuration Files
- Router configuration
# 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 # callroute 8 # enterprise hw dn-set local # enterprise hw1 dn-set local1 # 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 sipat0 sip trunk-circuit enterprise hw dn-set local callroute 8 signalling-address ip 192.168.1.2 port 5061 media-ip 192.168.1.2 peer-address static 192.168.10.10 5060 register-uri abcd.com home-domain abcd.com trunk-sipat0 56623000 default-called-telno 7000 trunk-sipat0 56623000 password cipher %^%#wlyf~LstT9[[t|HjP*N3>t{Q3!f8>2e#PDM@Ga-:%^%# # trunk-group sipat1 sip trunk-circuit enterprise hw1 dn-set local1 signalling-address ip 192.168.1.2 port 5062 media-ip 192.168.1.2 peer-address static 192.168.10.10 5060 register-uri abcd.com home-domain abcd.com trunk-sipat0 56623001 default-called-telno 6000 trunk-sipat0 56623001 password cipher %^%##;d~MTyB}'|b2:@A=Rg25*=-5s^[<12[K8-M9pm5%^%# # callprefix 7 enterprise hw dn-set local prefix 7 call-type category basic-service attribute 0 digit-length 4 32 # callprefix 8 enterprise hw dn-set local prefix 8 call-type category basic-service attribute 1 digit-length 1 32 callroute 8 # pbxuser 7000 pots enterprise hw telno 7000 port 2/0/0 dn-set local call-right out idd enable # pbxuser 7100 sipue enterprise hw sipue 7100 telno 7100 dn-set local eid-para password cipher %^%#Y;QQB*rk9,$7=K5av']G_[YWC~knl!4X[%Dvz%Q<%^%# # afterroute-change 8 callprefix 8 trunk-group sipat0 caller no-change called del 1 1 #