Number match mode configuration example
Figure 28 and the following describe the configurations for different number match modes on Router A and Router B:
Figure 28: Network diagram
Shortest number match
Configure Router A:
<RouterA> system-view [RouterA] voice-setup [RouterA-voice] dial-program
# Configure POTS entity 1000.
[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
Configure Router B:
<RouterB> system-view [RouterB] voice-setup [RouterB-voice] dial-program
# Configure POTS entity 2000 and POTS entity 2001.
[RouterB-voice-dial] entity 2000 pots [RouterB-voice-dial-entity2000] match-template 20001234$ [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 is alerted because the device adopts the shortest match mode by default.
Longest number match
# Configure the longest match mode on Router A. The other steps are the same as those for the shortest match mode.
[RouterA-voice-dial] number-match longest
After you dial number 20001234 at Telephone A and waits for a period of time (during this period, you can continue dialing), the number matches VoIP entity 2000 and Telephone B is alerted. If you continue to dial 1234 during this period (that is, the dialed number is actually 200012341234), the number matches VoIP entity 2001 and Telephone C is alerted.
Dial terminator
# Configure the longest match mode and the dial terminator # on Router A. The other steps are the same as those for the shortest match mode.
[RouterA-voice-dial] number-match longest [RouterA-voice-dial] terminator #
After you dial 20001234# at Telephone A, the number immediately matches VoIP entity 2000 and Telephone B is alerted.