Blocking Inbound Calls using Cisco ISR Voice Gateway is a simple 3 step process. First step is to create or append to a Voice Translation Rule, next is to map the Voice Translation Rule to a Voice Translation Profile. Then finally attached the Voice Translation Profile to either a Voice-Port or Inbound Dial-Peer.
Lets looks at this more closely.
Step 1. Create a Voice Translation Rule.
From the Global Configuration Mode enter in to the Voice Translation Rule Sub Menu, be sure to select a unique Rule Set ID. Now enter the new Translation Rule identifying the Calling Number ( Caller-ID) of the caller you would like to block.
(config)# voice translation-rule 200
(cfg-translation-rule)# rule 1 reject /06408343425/
Step 2. Create a Voice Translation Profile and apply the Voice Translation Rule
Next step is to create a Voice Translation Profile. Within the Voice Translation Profile we need to translate the Calling party referencing the Rules Set we created above.
(config)# voice transalation-profile ISDN-INBOUND
(cfg-translation-profile)# translate calling 200
Step 3. Attach the Voice Translation Profile to either the Voice Port or Inbound Dial-Peer
I prefer to attached Voice Translation Profiles on the Voice-Port, however attaching to the Dial-Peer is also very acceptable and correct. In either instance the commands for attaching Voice Translation Profiles is the same.
Voice Port Configuration
(config)# voice-port 0/0/0:15
(cfg-voice-port)# translation-profile inbound ISDN-INBOUND
Dial-Peer Configuration
(config)# dial-peer voice 1 pots
(cfg-dial-peer)# translation-profile inbound ISDN-INBOUND
Troubleshooting
Debug isdn q931 – Displays the Calling Party Number format
Debug voice translation – Displays realtime verbose output of matching of Voice Translation Rules for incoming calls.
Show run | s voice – Provides a Running Configuration output focusing on the Voice configuration section.
Show voice translation-rule – Displays all configured Voice Translation Rules
Show voice translation-profile – Displays all configured Voice Translation Profiles.
Test voice translation-rule RULE-ID Phone-Number – Tests Voice Translation Rules, will display translated number.