cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
34177
Views
10
Helpful
13
Comments
Joshua Engels
Level 1
Level 1

The following is an example of how to setup call blocking based off of incoming Caller's ANI.

In this example, my voice environment consist of an 8.6 CUCM Pub with 3 Subscribers.  I have three Cisco 2911 H.323 voice gateways with 1 PRI in each. I put together this simple 3 step process based off of a Cisco configuration guide.  I tested it on my cell phone and a coupe of others and it worked great.  Here are the three steps:

Block Incoming Calls based off of ANI

The following configuration must be applied to each voice gateway.  It is done in basically 3 steps:


1. Create a Translation Rule

Within the translation rule you will use the reject command followed by the pattern you wish to block.  In this case we use the entire phone number.


router#conf t

router(config)#voice translation-rule 1

router(config-xxx)#rule 1 reject /^8055553538$/
router(config-xxx)#rule 2 reject /^4805557904$/


Moving forward, you can continue to add rules to reject numbers as you see fit. 

Example:

router(config-xxx)#rule 3 reject /^4805557905$/ and so on.


2. Apply the Translation rule to a Translation Profile and give it a name

(This will be used to apply to the incoming Dial-peer(s).)

router#conf t

router(config)#voice translation-profile call_block

router(config-xxx)#translate calling 1

In this case we named the Translation Profile "call_block"


3. Apply Translation Profile to incoming Dial-peers (only) on each router

router#conf t

router(config)#dial-peer voice 1 pots

router(config-xxx)#call-block translation-profile incoming call_block

router(config-xxx)#call-block disconnect-cause incoming call-reject


In our case, we apply this to dial-peer 1 on each voice gateway as this is the incoming dial-peer for each location. 

The dial-peer looks like this after configuration:  (At least in our environment)

dial-peer voice 1 pots

call-block translation-profile incoming call_block

call-block disconnect-cause incoming call-reject

incoming called-number .

direct-inward-dial

Hope this helps for anyone out there looking to block based on incoming calling numbers.

Comments
fpavicic
Level 1
Level 1

Nice work there, i made a similar conf, and blocked all numbers begining with 060 and 064:

rule 1 /^060/ /9999/

rule 2 /^064/ /9999/

is possible redirect a call to especific hunt-goup using similar configuration?

wdgarfield1
Level 1
Level 1

We used this method successfully until we quickly reached the maximum number of blocking rules (15). I see we can do this on the CUCM (8x & later) with a couple of CSS & Partitions, then build Xlate patterns to block based on calling party number. That's fine except I'd like to be able to do the blocking on the GW router if I could. How do I get around this limit of 15?  Someone mentioned IOS 15.3(T) expanded this capacity to 100 rules, which again is fine, but where do I go after I hit 100 reject rules?

TIA

Bill

Joshua Engels
Level 1
Level 1

Hi Bill, that is a good question.  Typically we purge out the older rules when and if we reach our maximum if we are blocking specific numbers.  Or you can block out groups of numbers using expressions the way fpavici describes above.

conie saga
Level 1
Level 1

Excellent document !!

Thanks for sharing

Regards

Mitch McGill
Level 1
Level 1

Bill,

 

I found an interesting way to block more if needed. You can create incoming dial-peers matching by answer-address and then apply a translation rule that rejects the call or reroutes the called number to something invalid.

 

You can create as many as you have memory for (Dial-peers consume 6k per peer).

 

Example:

 

voice translation-rule 99
 rule 1 /^..../ /7778/
voice translation-profile FILTER_LIST
 translate called 99

 

dial-peer voice 99 pots
 translation-profile incoming FILTER_LIST
 answer-address 5558675309

 

This will take calls that patch the peer and forward them to 7778, which I have configured in Unity as a call handler that says "goodbye" then hangs up.

 

Keep in mind if you are running CUBE that if you match the inbound calls using a "incoming called number .T" dial-peer it will take precedence over answer address. You will have to convert you peer to "answer-address .T".

 

I hope that is helpful!

Mitch

 

 

pietro colosio
Community Member

Hi all, 

I need to block an incoming call on my CME ver 9.1.

I follow the example but not working. Below my configuration:

voice translation-rule 1
 rule 1 // /0/ type unknown unknown
 rule 2 // /00/ type national national
 rule 3 // /000/ type international international
!
voice translation-rule 2
 rule 1 /^100/ /100/
 rule 2 /^101/ /101/
 rule 3 /^110/ /110/
 rule 4 /^111/ /111/
 rule 5 /^112/ /112/
 rule 6 /^113/ /113/
 rule 7 /^114/ /114/
 rule 8 /^115/ /115/
 rule 9 /^116/ /116/
 rule 10 /^117/ /117/
 rule 11 /^118/ /118/
 rule 12 /^119/ /119/
 rule 13 /^120/ /120/
!
voice translation-rule 3
 rule 1 /101/ /xxxxxxx101/
 rule 2 /.../ /xxxxxxx100/
!
voice translation-rule 4
 rule 1 /^0\([0-9]\)/ /\1/
!
voice translation-rule 6
 rule 1 reject /009715297xxxxx/
 rule 2 reject /^3903072xxxxx/
!
!
voice translation-profile IN-PSTN
 translate calling 1
 translate called 2
!         
voice translation-profile OUT-PSTN
 translate calling 3
 translate called 4
!
voice translation-profile call_block
 translate calling 6
!

dial-peer voice 10 pots
 trunkgroup BRITrunk
 tone ringback alert-no-PI
 translation-profile incoming IN-PSTN
 incoming called-number .T
 no digit-strip
 direct-inward-dial
!
dial-peer voice 20 pots
 trunkgroup BRITrunk
 corlist outgoing Internazionali
 tone ringback alert-no-PI
 description Outgoingdp
 translation-profile outgoing OUT-PSTN
 destination-pattern 000T
 no digit-strip
 direct-inward-dial
!
dial-peer voice 30 pots
 trunkgroup BRITrunk
 corlist outgoing Nazionali
 tone ringback alert-no-PI
 description Outgoingdp
 translation-profile outgoing OUT-PSTN
 destination-pattern 00T
 no digit-strip
 direct-inward-dial
!
dial-peer voice 40 pots
 trunkgroup BRITrunk
 corlist outgoing Cellulari
 tone ringback alert-no-PI
 translation-profile outgoing OUT-PSTN
 preference 1
 destination-pattern 03T
 no digit-strip
 direct-inward-dial
!
dial-peer voice 50 pots
 trunkgroup BRITrunk
 tone ringback alert-no-PI
 translation-profile outgoing OUT-PSTN
 preference 1
 destination-pattern 11.
 no digit-strip
 direct-inward-dial
!
dial-peer voice 60 pots
 trunkgroup BRITrunk
 tone ringback alert-no-PI
 translation-profile outgoing OUT-PSTN
 preference 1
 destination-pattern 011.
 no digit-strip
 direct-inward-dial
!
dial-peer voice 1 pots
 service stcapp
 port 0/2/1
!
dial-peer voice 2 pots
 service stcapp
 port 0/2/2
!
dial-peer voice 70 pots
 trunkgroup BRITrunk
 call-block translation-profile incoming call_block
 call-block disconnect-cause incoming call-reject
 incoming called-number .

 

Can you kindly help me?

Best regards

Pietro

 

pietro colosio
Community Member

Hi Joshua Engels

i have followed your guide but not work.

The number is not blocked by my call manager relesa 9.1 (below my rule)

voice translation-rule 1
 rule 1 // /0/ type unknown unknown
 rule 2 // /00/ type national national
 rule 3 // /000/ type international international
!
voice translation-rule 2
 rule 1 /^100/ /100/
 rule 2 /^101/ /101/
 rule 3 /^110/ /110/
 rule 4 /^111/ /111/
 rule 5 /^112/ /112/
 rule 6 /^113/ /113/
 rule 7 /^114/ /114/
 rule 8 /^115/ /115/
 rule 9 /^116/ /116/
 rule 10 /^117/ /117/
 rule 11 /^118/ /118/
 rule 12 /^119/ /119/
 rule 13 /^120/ /120/
!
voice translation-rule 3
 rule 1 /101/ /xxxxxxx101/
 rule 2 /.../ /xxxxxxx100/
!
voice translation-rule 4
 rule 1 /^0\([0-9]\)/ /\1/
!
voice translation-rule 6
 rule 1 reject /009715297xxxxx/
 rule 2 reject /^3903072xxxxx/
!
!
voice translation-profile IN-PSTN
 translate calling 1
 translate called 2
!         
voice translation-profile OUT-PSTN
 translate calling 3
 translate called 4
!
voice translation-profile call_block
 translate calling 6
!

dial-peer voice 10 pots
 trunkgroup BRITrunk
 tone ringback alert-no-PI
 translation-profile incoming IN-PSTN
 incoming called-number .T
 no digit-strip
 direct-inward-dial
!
dial-peer voice 20 pots
 trunkgroup BRITrunk
 corlist outgoing Internazionali
 tone ringback alert-no-PI
 description Outgoingdp
 translation-profile outgoing OUT-PSTN
 destination-pattern 000T
 no digit-strip
 direct-inward-dial
!
dial-peer voice 30 pots
 trunkgroup BRITrunk
 corlist outgoing Nazionali
 tone ringback alert-no-PI
 description Outgoingdp
 translation-profile outgoing OUT-PSTN
 destination-pattern 00T
 no digit-strip
 direct-inward-dial
!
dial-peer voice 40 pots
 trunkgroup BRITrunk
 corlist outgoing Cellulari
 tone ringback alert-no-PI
 translation-profile outgoing OUT-PSTN
 preference 1
 destination-pattern 03T
 no digit-strip
 direct-inward-dial
!
dial-peer voice 50 pots
 trunkgroup BRITrunk
 tone ringback alert-no-PI
 translation-profile outgoing OUT-PSTN
 preference 1
 destination-pattern 11.
 no digit-strip
 direct-inward-dial
!
dial-peer voice 60 pots
 trunkgroup BRITrunk
 tone ringback alert-no-PI
 translation-profile outgoing OUT-PSTN
 preference 1
 destination-pattern 011.
 no digit-strip
 direct-inward-dial
!
dial-peer voice 1 pots
 service stcapp
 port 0/2/1
!
dial-peer voice 2 pots
 service stcapp
 port 0/2/2
!
dial-peer voice 70 pots
 trunkgroup BRITrunk
 call-block translation-profile incoming call_block
 call-block disconnect-cause incoming call-reject
 incoming called-number .

 

Can you kindly help me?

Best regards

Pietro

Aomar bahloul
Spotlight
Spotlight

you need to add the two lines below too your inbound dial-peer, on your case dial-peer voice 10 pot

 call-block translation-profile incoming call_block
 call-block disconnect-cause incoming call-reject

Aomar bahloul
Spotlight
Spotlight

I agree

My apologies for not starting a new thread but so much of this thread could apply to my version of the question. 

What if you had a certain block of numbers being used by your CER for the ERL masking and you only wanted to allow inbound calls from the PSAP to reach those numbers, not errant calls because the DIDs had been assigned by your provider prior to your assignment.  Basically, there are only maybe 100 numbers I would allow that are part of a block, let's say 321-456-78XX and then to block any other numbers inbound for your set of DIDs.  Imagine you already have a few hundred DIDs for normal calling concerns.  You are trying to avoid your onsite emergency response desk from being overwhelmed with solicitor calls.

Thank you in advance for any reply

kaylap
Level 1
Level 1

Hey,

 

I am having issues with setting up our 2921 Voice Router to block calls from a particular number. This is what I have added to the router:

 

voice translation-rule 200
rule 1 reject /225571****/


voice translation-profile Call_Block
translate calling 200

 

dial-peer voice 10 pots (which is our incoming call dial-peer)
call-block translation-profile incoming Call_Block
call-block disconnect-cause incoming call-reject

 

Do you see anything I am missing or need to change?

 

 

 

 

@Joshua Engels I know this is an old post, but I stumbled upon it as I linked to it for a question in the community. While reading it and the comments made by a few I noticed that you did have an error in step 2. You did not specify the rule to use for blocking the calling number in the profile, you had put in one of the commands that you'd use on the dial peer. As I have edit rights to this part of the community, I guess by being a Designated VIP, I took the liberty to edit that part and also remove the comments from others that pointed this error out to you as it's no longer contains that error. Other than that great post.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: