RSS

Short and sweet – how to block an incoming call on your voice gateway

10 Mar

Welcome to a quick post on how to block an incoming call when you know the calling number you want to block. Specifically, this is how I would block an incoming call on a Cisco voice gateway with an ISDN PRI attached. Your mileage might vary a little with SIP trunks and will definitely vary quite a bit with MGCP.*

The first thing you need to do is create yourself a voice translation rule, something like this ought to do the trick:

voice translation-rule 9
rule 1 reject /5550005555/   <<keep in mind this is the calling number you want to block, but I like to test initially with an outside number such as my cell phone that I can test with.

Then set yourself up a lovely translation profile that references the rule you just created. Name it something obvious so that the next administrator doesn’t have to beat you to death for your obscurity:

voice translation-profile CALLBLOCK
translate calling 9

To complete the configuration, add these two commands to your incoming POTS dial-peer.  If you aren’t sure what your incoming dial-peer is, use the debug voip dialpeer all command and make a test call.  This is a good idea even if you think you know what the inbound dial-peer is because sometimes life is whimsical, and dial-peer configurations even more so.

dial-peer voice 4445 pots
call-block translation-profile incoming CALLBLOCK
call-block disconnect-cause incoming unassigned-number

There are a few ways to test this.  As I mentioned before, you can use your own cell phone number in the original configuration and confirm that the call blocking works. Then just substitute the to-be-blocked number into the voice translation rule.

You can also run the following command and see what the router *thinks* it will do when it sees the number you are trying to block:

test voice translation-rule 9 /5550005555/
/5550005555/ blocked on rule 1

As with all things voice, there are eleventy-billion ways to accomplish a task, this post just covers one.  If you have another method you prefer, please share in the comments, would love to hear it.

Published 03/10/2015

*The process with SIP trunks is practically the same, your inbound dial-peer won’t be POTS, though.  MGCP will require you to use CUCM 8.0 or later for this, check out this document

 

Advertisements
 

Tags: , , , , , ,

16 responses to “Short and sweet – how to block an incoming call on your voice gateway

  1. Will

    2015/03/10 at 14:32

    Ewww@mgcp, but doing this in CUCM (regardless of gateway/trunk protocol) is more scalable if your blacklist is potentially longer than 15 numbers. On the plus side, if your ingress gateway is also your SRST gateway, it is usually preferable to do this in ios for single-point configuration. …and you can do a ‘call-block translation-profile incoming’ in conjunction with a ‘translation-profile incoming’ (which isn’t entirely clear in the documentation) statement on the same dial-peer. Good stuff. That said, a ‘call-block translation-profile outgoing’ on your cell # would be beneficial too! Hopefully that’ll come in an upcoming ios release.

     
  2. amyengineer

    2015/03/10 at 14:40

    Thanks for the reply! You make excellent points! There is the limit on the number of numbers that can be blocked to consider and SRST considerations that you mentioned as well. All very good things to keep in mind!

     
  3. Che

    2015/03/11 at 17:19

    Hi, thanks for writing this, I have bookmarked it ready for when (not if!!) I’ll need it. Just a question on your dial-peer configuration – it says the incoming translation profile is called call_block but above your config says it is called CALLBLOCK. I’m no voice guru so I just wanted to check if these are referring to the same thing?
    Thanks again!

     
    • amyengineer

      2015/03/11 at 17:25

      Nice catch, error corrected! That’s what I get for deciding that all caps would stand out better mid-post. Thanks for pointing that out!

       
  4. Jared

    2015/03/16 at 08:40

    Thanks for this. A good reminder of working with CME or gateways. I am finally taking my CIPT1 test in a couple weeks.

     
  5. Caitlin Curtin

    2015/03/19 at 03:36

    As you said in the last para that there are 11 billion ways to do this. I think this would be the easiest of them all. And you’re gracious enough to accept the mistake you’ve never done (above comment). Will surely follow you regularly. Good stuff!

     
    • Che

      2015/03/19 at 07:31

      I was asking an honest question – like I said I’m not a guru, just learning myself and asked a question. I wasn’t trying to be a smart ass, just trying to take it all in from someone who knows an awful lot more than me…

       
      • amyengineer

        2015/03/19 at 12:17

        I didn’t take offense at all! I appreciate your seeing the discrepancy, I wish I had caught it in the proof reading, but I’m glad you pointed it out so I could fix it! 🙂

         
  6. David Holman

    2015/03/29 at 06:33

    I’ve also heard of this being done within CUCM to match the “block list” and then forward to Unity to play a greeting that advises the caller that their call has been blocked, why it was blocked and how to contest inclusion within the block list. It’s not the “quick” approach you’ve outlined here, but could be worth considering in some Enterprises that want to provide feedback to the caller beyond simply dropping the call.

     
    • amyengineer

      2015/03/30 at 07:29

      I never thought about doing it that way, but it makes sense. Definitely adding that to my bag of potential solutions. Thanks for sharing!

       
  7. Emily Sharrard

    2015/03/30 at 11:03

    We have an issue where the caller ID being presented is just three numbers (For example: 212) Have you ever run into this situation? Or have any input on a possible solution?

     
  8. Emily Sharrard

    2015/03/31 at 11:32

    Worked out the Answer! RegEx: /^212$/ It will block calls that are presenting a 3 digit ANI but allows for and ANI presenting a full set of digits through the gateway.

     
    • amyengineer

      2015/03/31 at 14:33

      That’s really great to hear! I’m was thinking about this and haven’t had a chance to respond until now. Glad you found a solution!

       
  9. SSkumar

    2015/04/10 at 12:06

    Thanks for this post. I have a query. An user dont want to receive incoming calls from a particular number. Is there a way to block incoming calls from a particular numbers to a single user

     
    • Tom

      2015/04/28 at 09:45

      I think you could accomplish this with the destination-pattern command. Let’s say for an example, you want to block calls to extension 6789. Amend the above dial-peer configuration to the following:

      dial-peer voice 4445 pots
      destination-pattern 6789
      call-block translation-profile incoming CALLBLOCK
      call-block disconnect-cause incoming unassigned-number

      This would only apply the call blocking translation to calls to 6789.

      Please correct me if I’m wrong–also not a voice guru!

       
  10. kashif

    2016/02/01 at 05:20

    please help me in this,
    we have two fxo ports,one going to auto attendant and other going directly to a line,
    and we want to block a particular incoming PSTN number say 1111 on the port going directly to a dn.
    we dont use incoming dial-peer
    following is voice-port config:

    voice-port 0/0/3
    supervisory disconnect anytone
    supervisory custom-cptone UAE-CUSTOM-ALCATEL
    supervisory dualtone-detect-params 1
    cptone BE
    timeouts initial 5
    timeouts wait-release 1
    timing hookflash-out 500
    timing guard-out 1000
    timing sup-disconnect 50
    connection plar opx 1025
    impedance complex2
    description STC
    caller-id enable
    caller-id alerting line-reversal
    caller-id alerting dsp-pre-allocate
    cable-detect

    and i tried creating translation rule and profile, applied it on the dn level, voice port level, but nothing seem to work at all. i even tried creating a incoming dial-peer also
    Please help me in this ASAP

     

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: