04-30-2015 10:57 AM - edited 03-17-2019 02:52 AM
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.
04-30-2015 05:08 PM
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?
05-01-2015 07:38 AM
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?
05-02-2015 01:02 AM
you need to escape \ the + in this rule as you are matching in regex
voice translation-rule 400
rule 1 reject /\+610XXXXXXX/
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