Example for Configuring Voice Services for Small- and Medium-sized Enterprises
Networking Requirements
The PBX configures the external number allocated to an enterprise by the carrier as the automatic switchboard number. An outer-office user dials the external number and then dials an extension number as prompted to connect to an intra-office user. Intra-office users make calls to each other by dialing short numbers. Figure1 shows the voice service network.
This topic assumes that you want to implement the following requirements:
- The country code is 86, and the area code is 571.
- The internal numbers of users A, B, and C are 7000, 7001, and 7100 respectively.
- Users A, B, and C belong to enterprise hw. The DN set is local. The intra-office call prefix is 7. The outgoing call prefix is 9. The incoming and outgoing call rights of all users are all.
- Both the signaling IP address and media IP address are 192.168.1.2.
- The automatic switchboard name is ivr. A number allocated by the PSTN is used as the automatic switchboard number, such as 28980808.
- Post-routing number change scheme 9 is configured to retain calling numbers and delete the first digit of called numbers when PBX users make outgoing calls through the FXO port.
Prerequisites
The IVR configuration has been completed. For details, see IVR. vu-service-name configured for the automatic switchboard is 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.
POTS User |
SIP User |
Remarks |
---|---|---|
7000–7004 |
7100–7104 |
PBX users |
Slot ID/Subcard ID/Port ID |
Default Access Code |
Route ID |
---|---|---|
3/0/4 |
28980808 |
0 |
Prefix |
Type |
Route |
---|---|---|
7 |
Intra-office |
N/A |
9 |
Outgoing |
0 |
Prefix |
Outgoing Trunk |
Called Number Change |
---|---|---|
9 |
AT0 |
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
- Configure the enterprise and DN set for numbers.
[Huawei-voice] enterprise hw [Huawei-voice-enterprise-hw] dn-set local [Huawei-voice-enterprise-hw] quit
- Set the enterprise and DN set of prefixes to hw and local, and configure intra-office call prefix 7 whose call attribute is 0 and local call prefix 9 whose call attribute is 1. Configure national toll call prefix 90 whose call attribute is 2 and international toll call prefix 900 whose call attribute is 3.
[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 3 32 [Huawei-voice-callprefix-7] quit [Huawei-voice] callprefix 9 [Huawei-voice-callprefix-9] enterprise hw dn-set local [Huawei-voice-callprefix-9] prefix 9 [Huawei-voice-callprefix-9] call-type category basic-service attribute 1 [Huawei-voice-callprefix-9] digit-length 1 32 [Huawei-voice-callprefix-9] quit [Huawei-voice] callprefix 90 [Huawei-voice-callprefix-90] enterprise hw dn-set local [Huawei-voice-callprefix-90] prefix 90 [Huawei-voice-callprefix-90] call-type category basic-service attribute 2 [Huawei-voice-callprefix-90] digit-length 2 32 [Huawei-voice-callprefix-90] quit [Huawei-voice] callprefix 900 [Huawei-voice-callprefix-900] enterprise hw dn-set local [Huawei-voice-callprefix-900] prefix 900 [Huawei-voice-callprefix-900] call-type category basic-service attribute 3 [Huawei-voice-callprefix-900] digit-length 3 32 [Huawei-voice-callprefix-900] quit
- Configure the automatic switchboard.
Set the automatic switchboard name to ivr and automatic switchboard number to 28980808.
[Huawei-voice] callprefix ivr [Huawei-voice-callprefix-ivr] prefix 28980808 [Huawei-voice-callprefix-ivr] enterprise hw dn-set local [Huawei-voice-callprefix-ivr] call-type category vu-service vu-service-name vudefault [Huawei-voice-callprefix-ivr] digit-length 8 32 [Huawei-voice-callprefix-ivr] save [Huawei-voice-callprefix-ivr] quit
- Configure a SIP user whose user number is 7100, authentication password is a123456, and incoming and outgoing call rights are all.
[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] call-right in all [Huawei-voice-pbxuser-7100] call-right out all [Huawei-voice-pbxuser-7100] eid-para password cipher Please input user password(6-64 chars): ******* [Huawei-voice-pbxuser-7100] quit
- Configure POTS users whose user numbers are 7000 and 7001 and incoming and outgoing call rights are all.
[Huawei-voice] pbxuser 7000 pots enterprise hw [Huawei-voice-pbxuser-7000] dn-set local [Huawei-voice-pbxuser-7000] port 3/0/0 [Huawei-voice-pbxuser-7000] telno 7000 [Huawei-voice-pbxuser-7000] call-right in all [Huawei-voice-pbxuser-7000] call-right out all [Huawei-voice-pbxuser-7000] quit [Huawei-voice] pbxuser 7001 pots enterprise hw [Huawei-voice-pbxuser-7001] dn-set local [Huawei-voice-pbxuser-7001] port 3/0/1 [Huawei-voice-pbxuser-7001] telno 7001 [Huawei-voice-pbxuser-7001] call-right in all [Huawei-voice-pbxuser-7001] call-right out all [Huawei-voice-pbxuser-7001] quit
- Configure an AT0 trunk group.
[Huawei-voice] trunk-group at0 fxo [Huawei-voice-trunkgroup-at0] enterprise hw dn-set local [Huawei-voice-trunkgroup-at0] trunk-at0 3/0/4 default-called-telno 28980808 [Huawei-voice-trunkgroup-at0] quit
- Configure a call route and post-routing number change.
[Huawei-voice] callroute 9 [Huawei-voice-calldroute-9] quit [Huawei-voice] callprefix 9 [Huawei-voice-callprefix-9] callroute 9 [Huawei-voice-callprefix-9] quit [Huawei-voice] trunk-group at0 [Huawei-voice-trunkgroup-at0] callroute 9 [Huawei-voice-trunkgroup-at0] quit [Huawei-voice] afterroute-change 9 [Huawei-voice-afterroute-change-9] callprefix 9 [Huawei-voice-afterroute-change-9] trunk-group at0 [Huawei-voice-afterroute-change-9] caller no-change [Huawei-voice-afterroute-change-9] called del 1 1 [Huawei-voice-afterroute-change-9] 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 AT0 trunk, and the calling number displayed to the called party is 28980808.
- 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 28980808 and then dial 7000 as prompted to connect to 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 # callroute 9 # enterprise hw dn-set local # 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 at0 fxo enterprise hw dn-set local trunk-at0 3/0/4 default-called-telno 28980808 callroute 9 # callprefix 7 enterprise hw dn-set local prefix 7 call-type category basic-service attribute 0 digit-length 3 32 # callprefix 9 enterprise hw dn-set local prefix 9 call-type category basic-service attribute 1 digit-length 1 32 callroute 9 # callprefix 90 enterprise hw dn-set local prefix 90 call-type category basic-service attribute 2 digit-length 2 32 # callprefix 900 enterprise hw dn-set local prefix 900 call-type category basic-service attribute 3 digit-length 3 32 # callprefix ivr enterprise hw dn-set local prefix 28980808 call-type category vu-service vu-service-name vudefault digit-length 8 32 # pbxuser 7000 pots enterprise hw telno 7000 dn-set local port 3/0/0 call-right out all # pbxuser 7001 pots enterprise hw telno 7001 dn-set local port 3/0/0 call-right out all # pbxuser 7100 sipue enterprise hw sipue 7100 telno 7100 dn-set local call-right out all eid-para password cipher %@%@nGE1Y)%q*~n14{5/1l2@,._1TrX7Eeq(Y>/,=AT'V"\~._4,%@%@ # afterroute-change 9 callprefix 9 trunk-group at0 caller no-change called del 1 1 #