R0106-HP MSR Router Series Voice Configuration Guide(V7)
77
# 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
# Apply the number substitution rule list 21101 to called numbers on VoIP entity 10. This 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. This 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. This will
change the called numbers 0001, 0002, and 0003 into 1234, 6788, and 6565, respectively.