Configuration example of the voice entity search function
Figure 31 and the following describe the configurations for the voice entity search function on Router A and Router B.
Figure 31: Network diagram
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 entities 2000, 2001, and 2002.
[RouterA-voice-dial] entity 2000 voip [RouterA-voice-dial-entity2000] match-template 20001234$ [RouterA-voice-dial-entity2000] address sip ip 1.1.1.2 [RouterA-voice-dial-entity2000] quit [RouterA-voice-dial] entity2001 voip [RouterA-voice-dial-entity2001] match-template 2000123.$ [RouterA-voice-dial-entity2001] address sip ip 1.1.1.2 [RouterA-voice-dial-entity2001] quit [RouterA-voice-dial] entity 2002 voip [RouterA-voice-dial-entity2002] match-template T [RouterA-voice-dial-entity2002] address sip ip 1.1.1.2 [RouterA-voice-dial-entity2002] quit
Configure Router B:
<RouterB> system-view [RouterB] voice-setup [RouterB-voice] dial-program
# Configure POTS entity 2000.
[RouterB-voice-dial] entity 2000 pots [RouterB-voice-dial-entity2000] match-template 20001234$ [RouterB-voice-dial-entity2000] line 1/0
Set the maximum number of voice entities found before a search process stops to 2.
<RouterA> system-view [RouterA] voice-setup [RouterA-voice] dial-program [RouterA-voice-dial] select-rule search-stop 2
After Telephone dials 20001234, the number will match VoIP entity 2000 by default. You can use the display voice call-info verbose command to view the other voice entities that meet the matching conditions.
[RouterA-voice-dial] display voice call-info verbose The information table for current calls in detail # **************** CALL 0 *************** Call direction : From CS ViIfIndex : 0x002C0060 Related module ==> Module ID : LGS Reference Numbers : 1 Module ID : CMC Reference Numbers : 1 Current used voice entity : 2000 Voice entities are offered : 2000 2001 # End
Restore the maximum number of voice entities found before a search process stops to the default.
<RouterA> system-view [RouterA] voice-setup [RouterA-voice] dial-program [RouterA-voice-dial] undo select-rule search-stop [RouterA-voice-dial] display voice call-info verbose The information table for current calls in detail # **************** CALL 0 *************** Call direction : From CS ViIfIndex : 0x002C0060 Related module ==> Module ID : LGS Reference Numbers : 1 Module ID : CMC Reference Numbers : 1 Current used voice entity : 2000 Voice entities are offered : 2000 2001 2002 # End
Disable the voice entity search function.
<RouterA> system-view [RouterA] voice-setup [RouterA-voice] dial-program [RouterA-voice-dial] entity 2000 voip [RouterA-voice-dial-entity2000] select-stop [RouterA-voice-dial-entity2000] display voice call-info verbose The information table for current calls in detail # **************** CALL 0 *************** Call direction : From CS ViIfIndex : 0x002C0060 Related module ==> Module ID : LGS Reference Numbers : 1 Module ID : CMC Reference Numbers : 1 Current used voice entity : 2000 Voice entities are offered : 2000 # End