cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2550
Views
10
Helpful
7
Replies

CUBE voice translation-rule reject question

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

 

1 Accepted Solution

Accepted Solutions

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.

View solution in original post

7 Replies 7

jonathan.salter
Level 3
Level 3

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].........$

Please remember to rate useful posts, click on the stars below.

I though that incoming called-number is for matching the destination (my inside numbers) and not the source number.

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

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 ***

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.

Good to know the issue is resolved.
Please mark this as solved and rate helpful posts.

Cheers,
Rohan