07-28-2014 10:00 AM - edited 03-19-2019 08:26 AM
Hi everyone
I have a number that I want to block on one of our gateways and I wanted to know can someone look over my commands because I used my number as a test to see if it would work and I can still reach the office.
Voice translation rule to block a number
---------------------------------------
voice translation-rule 10
rule 1 reject /7606227654/
Apply the rule to a translation profile for the calling number
--------------------------------------------------------------
voice translation-profile call_block
translate calling 1
Include the translation profile within a dial peer definition
--------------------------------------------------------------
dial-peer voice 9001 pots
call-block translation-profile incoming call_block
Invoke the voice translation profile “call_block
-------------------------------------------------
call-block disconnect-cause incoming call-reject
incoming called-number 7606227654
direct-inward-dial
Match this peer for all inbound POTS calls
--------------------------------------------
port 1/0:23
Solved! Go to Solution.
07-28-2014 03:03 PM
Ok you can check the config posted by William Bell,
http://www.netcraftsmen.net/blogs/unifiedcommunications/entry/cisco-cucm-blocking-calls-by-calling-party-number-id.html
If you have a doubt please let me know.
Please rate useful information.
Regards.
07-28-2014 11:44 AM
The configuration you list looks right to me. Have you run any debugging to verify you're matching dial-peer 9001? You can use "debug ccapi inout" to see what dial-peer is getting matched.
-Jameson
07-28-2014 12:32 PM
Jameson
If you have 2 GW at the site would I have to place the rule on both GW, because I'm matching dial-peer 9001. I looked at what was active when I was on the call my number is the 2066 number I called them on and they are 2000
.Jul 28 19:27:16.693: %ISDN-6-CONNECT: Interface Serial1/0:3 is now connected to 8178412066 N/A
.Jul 28 19:27:17.025: %ISDN-6-CONNECT: Interface Serial1/0:3 is now connected to 8178412066 N/A
.Jul 28 19:27:17.029: %ISDN-6-DISCONNECT: Interface Serial1/0:2 disconnected from 2147161923 , call lasted 1364 seconds
CallID CID ccVdb Port DSP/Ch Called # Codec Dial-peers
0x1E037E 3959 0x659757D4 1/0:23.1 1/7:1 2088 g711ulaw 9001/1001
0x1E0380 395A 0x659757D4 1/0:23.2 1/7:2 2411 g711ulaw 9001/1001
0x1E0384 395C 0x659757D4 1/0:23.4 1/7:4 2000 g711ulaw 9001/1001
07-28-2014 12:41 PM
I see the issue... You're translating the calling number that matches /7606227654/, and your incoming called-number is 7606227654. Unless you're calling from and to 7606227654, the call won't be blocked with this configuration.
If you want to block all calls to 7606227654, change "translate calling 1" to "translate called 1". If you want to block all calls from a specific number, instead change your reject rule to match the caller's number.
-Jameson
07-28-2014 12:53 PM
Jameson
That's what I thought I had done, so would you look at this and tell me if this is correct becuase I want to block a person from calling the office.
Voice translation rule to block a number
---------------------------------------
voice translation-rule 10
rule 1 reject /5137013243/
Apply the rule to a translation profile for the calling number
--------------------------------------------------------------
voice translation-profile call_block
translate calling 1
Include the translation profile within a dial peer definition
--------------------------------------------------------------
dial-peer voice 9001 pots
call-block translation-profile incoming call_block
Invoke the voice translation profile “call_block
-------------------------------------------------
call-block disconnect-cause incoming call-reject
incoming called-number 5137013243
direct-inward-dial
Match this peer for all inbound POTS calls
----------
port 1/0:23
07-28-2014 12:59 PM
You've got everything except the "incoming called-number" correct. I would leave "incoming called-number" as however you had it configured previous to your changes.
Don't confuse "called number" with "calling number". Here's a good example for you... Let's say my phone is 234-567-8910, and I'm calling your gateway at 760-622-7654. From your gateway's perspective, the "called number" would be 760-622-7654 (assuming the telco provides all 10 digits), and the "calling number" would be 234-567-8910.
-Jameson
07-28-2014 01:37 PM
Jameson
My manager just told me that the 9001 dial-peer is pots but it's for outbound calls only and that I should apply the rule to dial-peer 1001 which is voip. so when I do the command there is no port 1/0:23 to match the peer for inbound calls. so now how would I change the command work on a voip dial peer.
Eric
07-28-2014 02:13 PM
Hi scooter817,
What´s your CUCM Version? blocking incoming calls on gateway is a bit stressful, you can block calls by calling party number from CUCM, this is very easy.
Let me know if you need anything else.
Regards.
07-28-2014 02:20 PM
Hi Emmanuel
I have a person who is calling our office 713 547-4000 from 513 701-3242 and I want to block the 513 701-3242 from reaching our office.
Eric
07-28-2014 02:55 PM
Hi scooter817,
What´s your CUCM Version?
This config works from CUCM 8.x and later.
Regards.
07-28-2014 02:56 PM
10.5.1
07-28-2014 03:03 PM
Ok you can check the config posted by William Bell,
http://www.netcraftsmen.net/blogs/unifiedcommunications/entry/cisco-cucm-blocking-calls-by-calling-party-number-id.html
If you have a doubt please let me know.
Please rate useful information.
Regards.
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: