03-25-2019 08:49 AM
We've been receiving a lot of spam calls from 3-digit caller ID numbers. In an effort to cut down these calls, I added the following rule. It seems to have helped, but I'm still seeing occasional calls log with caller ID 009. Should't the following reject those calls?
voice translation-rule 3
rule 1 reject /^0[0-9][0-9]$/
dial-peer voice 10 voip
description INBOUND - TO CUBE
translation-profile incoming E164
call-block translation-profile incoming CallBlock
call-block disconnect-cause incoming call-reject
session protocol sipv2
session target sip-server
incoming called-number [2-9].........$
voice-class codec 1
voice-class sip early-offer forced
voice-class sip profiles 10
voice-class sip bind control source-interface GigabitEthernet0/0
voice-class sip bind media source-interface GigabitEthernet0/0
dtmf-relay rtp-nte sip-notify
no vad
Solved! Go to Solution.
03-29-2019 01:31 PM
Found the reason why the translation-rule 3 wasn't working. Rule number 2 under voice translation-rule 2 replaces the first digit of the incoming number with a + for E164. So the actual inbound caller ID is a 4-digit number (0009). I made it a 4-digit match and that got it working.
03-25-2019 12:42 PM
Is there another dial peer for the 009?
Calls to 009 will not hit this dial peer only calls beginning 2-9 as per the statement incoming called-number [2-9].........$
03-26-2019 12:24 PM
I though that incoming called-number is for matching the destination (my inside numbers) and not the source number.
03-27-2019 02:47 AM
03-28-2019 02:30 PM
Yeah, that doc matches up to what I'm looking at. On the inbound dial-peer, I'm matching my inside numbers with "incoming called-number [2-9].........$", and rejecting calling numbers based on voice-translation rules. In my initial example, I only showed the the one rule I had a question on. I have about 30 other rules that are working.
Here's how I have it configured (cutting out extra reject rules lines):
voice translation-rule 1
rule 1 /^[2-9].....\(....\)$/ /\1/
!
voice translation-rule 2
rule 1 /^[2-9].........$/ /+1\0/
rule 2 /^./ /+/
!
voice translation-rule 3
rule 17 reject /^0[0-9][0-9]$/
!
!
voice translation-profile 4DIGITS
translate called 1
!
voice translation-profile CallBlock
translate calling 3
!
voice translation-profile E164
translate calling 2
!
dial-peer voice 10 voip
description INBOUND - CARRIER TO CUBE
translation-profile incoming E164
call-block translation-profile incoming CallBlock
call-block disconnect-cause incoming call-reject
session protocol sipv2
session target sip-server
incoming called-number [2-9].........$
voice-class codec 1
voice-class sip early-offer forced
voice-class sip profiles 10
voice-class sip bind control source-interface GigabitEthernet0/0
voice-class sip bind media source-interface GigabitEthernet0/0
dtmf-relay rtp-nte sip-notify
no vad
!
dial-peer voice 20 voip
description SIP TRUNK - CUCM PUB
translation-profile outgoing 4DIGITS
destination-pattern [2-9].........$
session protocol sipv2
session target ipv4:111.222.34.56:5060
incoming called-number .
voice-class codec 1
voice-class sip options-keepalive
voice-class sip bind control source-interface GigabitEthernet0/1
voice-class sip bind media source-interface GigabitEthernet0/1
dtmf-relay rtp-nte sip-notify
no vad
!
dial-peer voice 21 voip
description SIP TRUNK - CUCM SUB
translation-profile outgoing 4DIGITS
destination-pattern [2-9].........$
session protocol sipv2
session target ipv4:111.222.34.57:5060
incoming called-number .
voice-class codec 1
voice-class sip options-keepalive
voice-class sip bind control source-interface GigabitEthernet0/1
voice-class sip bind media source-interface GigabitEthernet0/1
dtmf-relay rtp-nte sip-notify
no vad
03-29-2019 03:36 AM - edited 03-29-2019 03:59 AM
Hello,
Can you please capture the logs for "debug voip dialpeer inout" and share the log snippet for caller ID - 009.
-Rohan
*** Please rate helpful posts ***
03-29-2019 01:31 PM
Found the reason why the translation-rule 3 wasn't working. Rule number 2 under voice translation-rule 2 replaces the first digit of the incoming number with a + for E164. So the actual inbound caller ID is a 4-digit number (0009). I made it a 4-digit match and that got it working.
04-11-2019 07:59 AM
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide