cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1270
Views
0
Helpful
3
Replies

Call Blocking Based on ANI in a CUBE, Not Working.

john.fleming
Enthusiast
Enthusiast

Hello all,

So I have read the Docs I have found regarding blocking incoming numbers at the CUBE level.  I have configured this and my calls are not getting blocked.  I must be doing something wrong or maybe it is that I have more than one Translation rule on the dial peer.  Here is the config, please let me know what you think.

 

voice translation-rule 1
 rule 1 /^\(..........$\)/ /+1\1/

voice translation-rule 400
 rule 1 reject /610XXXXXXX/
 rule 2 reject /215XXXXXXX/

voice translation-profile BLOCK
 translate calling 400
!
voice translation-profile PSTNin
 translate calling 1

dial-peer voice 297 voip
 description Incoming Telephone Numbers
 translation-profile outgoing PSTNin
 call-block translation-profile incoming BLOCK
 call-block disconnect-cause incoming call-reject
 preference 3
 destination-pattern ^[2-9]..[2-9]......$
 session protocol sipv2
 session target ipv4:192.168.186.11
 incoming called-number .
 voice-class codec 1  
 dtmf-relay rtp-nte
 no vad

dial-peer voice 298 voip
 description Incoming Telephone Numbers
 translation-profile outgoing PSTNin
 call-block translation-profile incoming BLOCK
 call-block disconnect-cause incoming call-reject
 preference 2
 destination-pattern ^[2-9]..[2-9]......$
 session protocol sipv2
 session target ipv4:192.168.186.12
 incoming called-number .
 voice-class codec 1  
 dtmf-relay rtp-nte
 no vad


dial-peer voice 299 voip
 description Incoming Telephone Numbers
 translation-profile outgoing PSTNin
 call-block translation-profile incoming BLOCK
 call-block disconnect-cause incoming call-reject
 preference 1
 destination-pattern ^[2-9]..[2-9]......$
 session protocol sipv2
 session target ipv4:172.18.12.100
 incoming called-number .
 voice-class codec 1  
 dtmf-relay rtp-nte
 no vad


I have verified I am hitting the correct peer on the inbound call but it looks like the translation rule 1  translation-profile outgoing PSTNin is adding the +1 which I believe is causing it to not match.

Any help would be great.

 

 

3 Replies 3

Kirill Glushenkov
Enthusiast
Enthusiast

If you see, that CUBE adds +1, then try to modify your blocking pattern to format with +1 in the beginning +1610........

One more thing, there no expression X in CUBE, to clarify, do you just hide the full number?

 

 

Kirill thanks for the response.  I only used the X here to hide the numbers.  They are not in the config.  Additionally what you are saying about the +1 makes sense however the router will not take /+1610XXXXXXX/.

Is there a different method that would need to be used?

you need to escape \ the +  in this rule as you are matching in regex

voice translation-rule 400
 rule 1 reject /\+610XXXXXXX/

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: