×

Warning message

  • Cisco Support Forums is in Read Only mode while the site is being migrated.
  • Cisco Support Forums is in Read Only mode while the site is being migrated.

How I can block outgoing calls to specific number?

Answered Question
Mar 16th, 2012
User Badges:

Hello to all!


I want to block outgoing calls to list of specific numbers:


  • 08444 639595
  • 08719 977373
  • 08444 206464
  • 08717 704646
  • 09115 022525
  • 08444 660620
  • 09119 210220
  • 09112 070120


How I can do this?


Thanks to all!

Correct Answer by Jefferson Islan... about 5 years 5 months ago

Hi Maximo, how are you?


Use the reject keyword to reject calls that match. This example rejects all calls that start with "234".


rule 1 reject /^234/


router#test voice translation-rule 10 1234
1234 Didn't match with any of rules

router#test voice translation-rule 10 2345
 blocked on rule 1


Apply Rules


Voice Translation Rules are applied to Voice Translation Profiles.  These profiles are then applied to dial peers or voice ports. Profiles  can be applied to VoIP or POTS dial peers or voice ports, and can be  applied to inbound or outbound calls. A profile can translate Called,  Calling, or Redirecting numbers.


voice translation-rule 3 
 rule 1 /123/ /456/ 

voice translation-profile profile1
 translate calling 3 

dial-peer voice 10 pots
 translation-profile outgoing profile1

Please mark my reply as answered

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 4.5 (2 ratings)
Loading.
Aaron Harrison Fri, 03/16/2012 - 05:02
User Badges:
  • Super Bronze, 10000 points or more
  • Community Spotlight Award,

    Member's Choice, May 2015

Hi

CUCM? CME?


If CUCM, you can create route patterns to match each number (e.g. 908444639595) and set the route pattern to 'block this pattern'


Add them to your common internal partition (i.e. the one that DNs go in) if you have one to make it block system wide.


Aaron

Maximo Dominguez Fri, 03/16/2012 - 05:09
User Badges:

Hi aaronharrison, sorry for the miss information,


The system is a CME


Thanks

Correct Answer
Jefferson Islan... Fri, 03/16/2012 - 05:21
User Badges:

Hi Maximo, how are you?


Use the reject keyword to reject calls that match. This example rejects all calls that start with "234".


rule 1 reject /^234/


router#test voice translation-rule 10 1234
1234 Didn't match with any of rules

router#test voice translation-rule 10 2345
 blocked on rule 1


Apply Rules


Voice Translation Rules are applied to Voice Translation Profiles.  These profiles are then applied to dial peers or voice ports. Profiles  can be applied to VoIP or POTS dial peers or voice ports, and can be  applied to inbound or outbound calls. A profile can translate Called,  Calling, or Redirecting numbers.


voice translation-rule 3 
 rule 1 /123/ /456/ 

voice translation-profile profile1
 translate calling 3 

dial-peer voice 10 pots
 translation-profile outgoing profile1

Please mark my reply as answered

rvenkatesh7 Tue, 01/10/2017 - 23:11
User Badges:

Hi Jeff,

tried your solution but no luck it is not working.

Maximo Dominguez Tue, 03/20/2012 - 05:54
User Badges:

Hello to all,


I tried to configure Jefferson's solution, but I have an issue...


Mar 19 11:41:05.239: //-1/3AFC1059806E/RXRULE/regxrule_match: Skipping a call block rule; number=0644224569 rule precedence=1


I searched information about this issue and I deduced that it's not possible to use "rule X reject" with outgoing calls, this only works with incoming calls, it's true?


Also I tried to block number with COR, but here the problem is that the called number match with another dial-peer when the first try is blocked.


Example:


dial-peer cor custom

name local

name international

name movil

name oriol

!

!

dial-peer cor list local

member local

!

dial-peer cor list international

member international

!

dial-peer cor list movil

member movil

!

dial-peer cor list administracion

member local

member international

member movil

!

dial-peer cor list helpdesk

member local

member movil

!

dial-peer cor list block

member oriol

!

dial-peer voice 11 voip

corlist outgoing local

description ### SIP Nacionales por VoipBuster por si falla/ocupado ANALOGICA

preference 2

max-conn 4

destination-pattern 0T

progress_ind setup enable 3

session protocol sipv2

session target sip-server

session transport udp

dtmf-relay rtp-nte

no vad

!

dial-peer voice 2 voip

corlist outgoing international

description ### SIP Internacionales Voipbuster ###

preference 1

max-conn 4

destination-pattern 00T

progress_ind setup enable 3

session protocol sipv2

session target sip-server

session transport udp

dtmf-relay rtp-nte

no vad

!

dial-peer voice 50 pots

corlist outgoing block

description ### FXO ANTENA GSM SALIDA MOVILES ###

translation-profile outgoing SALIDA_CON_6_CELULAR

preference 1

destination-pattern 0644224569

port 0/2/1

!

ephone-dn  6  dual-line

number 400

pickup-group 830

label David Lopez 400

description David Lopez

name David Lopez

call-forward busy 899

call-forward noan 899 timeout 25

corlist incoming helpdesk

huntstop channel

hold-alert 30 originator

!



When I call from dn 400 the call is not possible via dial-peer 50, but the call is succes because CME uses dial-peer 11.


any idea?


Thanks!

Mohamed Ibrahim Fri, 04/12/2013 - 07:53
User Badges:

Hey Maximo,

I tried this but the call still goes out.

Can you help me please.

Mohamed Ibrahim Fri, 04/12/2013 - 08:22
User Badges:

Hey Chandan/Kamal,

My configuration


voice translation-rule 2

rule 1 reject /118118/

rule 2 /^9\(.*\)$/ /\1/

!

voice translation-profile Outbound

translate called 2

!


dial-peer voice 118118 pots

translation-profile outgoing Outbound

destination-pattern 118118

port 0/0/0:15


So Chandan you want me to remove the port number?

islam.kamal Fri, 04/12/2013 - 09:02
User Badges:
  • Red, 2250 points or more

hello


please use the below , i removed rule 2 /^9\(.*\)$/ /\1/  . For reject make it only in the voice translation rule. Please try


voice translation-rule 2

rule 1 reject /^118118/


voice translation-profile Outbound

translate called 2



dial-peer voice 118118 pots

translation-profile outgoing Outbound

destination-pattern 118118

port 0/0/0:15


Thank you

please rate if this will help

islam.kamal Fri, 04/12/2013 - 07:56
User Badges:
  • Red, 2250 points or more

Hello


can you share your configuration? . What do you need exactly form your configuration?.


thank you

Nishant Savalia Mon, 04/15/2013 - 05:10
User Badges:
  • Silver, 250 points or more

Hi Maximo,

Your configuration of COR list is not working because CME first checks the dial-peer 50 and then it checks for the another possibility of dialpeer which can be best match with the destination-pattern.

As per your configuration it will first block the call (pots dial peer 50) but it will through the call by dialpeer (voip 11).


You can try below methods:


1). If you want to use COR list then try to avoid overlapping pattern so that your cor list will work fine.


or


2). Create DN of the destination pattern and leave as it is (i.e. don't apply that DN anywhere)


Thank You,

Nishant Savalia

Actions

This Discussion