Call restricting on Gateway

Unanswered Question
Jun 17th, 2009

I have a Cisco 2851 acting as my voice gateway for all of our customers. One client has a CM on site that I do not have access to, and when he sends calls to me the calling number is not a DID that I gave him.

How can I reject the calls unless he gives sends me a proper DID that is on my system?



I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
infosateng Wed, 06/17/2009 - 10:31

Thanks, but I think what I need is something different.

I have 100's of clients and thousands of phone numbers. Each has a dial-peer for incoming (from PSTN) calls.

When a call is going out to PSTN it uses our default pots dial-peer and if the clients phone system sends my router the correct phone number it uses its matching dial-peer.

Here is an example:

calprigw1#sh voic call stat

port called codec dial-peers

1/0:23.20 *8665008676 g729r8 3138116/998

The calling number matches dial-peer 3138116 and the called number matches the outgoing DP 998. This is a call I would accept. Sometimes though the client does not send me their actual DID, so it looks like this:

calprigw1#sh voic call stat

port called codec dial-peers

1/0:23.20 *5551234 g729r8 0/998

In this case the number 5551234 is not a valid number on my system, but the router still sends it out to the PSTN. I want to be able to block these calls.

Any ideas?


Paolo Bevilacqua Wed, 06/17/2009 - 10:59

What I wrote above.

The alternative, is a TCL script that checks validity of calling number using any criteria you set. If you pay me for, I can write that for you.

infosateng Wed, 06/17/2009 - 11:12

I see what you are saying p.bevilacqua but how do I have my translation rule check all of the numbers on the router to confirm they are valid? I am talking about a list of 2000 valid phone numbers.

Do I write a rule for even phone number?

Cheers & Thanks,


Paolo Bevilacqua Wed, 06/17/2009 - 13:05

Agree it's much config, however using separated incoming voip DP and patterns in answer-address it might be doable.

Ah and that doesn't save you from the case where someone uses the calling number of another customer.

It's not that the router can have a magic way to know which calling number are valid and which are not.

infosateng Wed, 06/17/2009 - 13:09

Yeah I am not too worried about one client using another clients numbers, unlikely that will happen. It's more for those times when the client has a PBX on site and does not set it up well. Then when it comes to collecting CDR's and billing people end up with free long distance.

So for the answer-address would I put that on the voip DP's....or the pots? Hmmm?


infosateng Wed, 06/17/2009 - 13:49

Thanks, that seems like what I am looking for.....but!

I have a phone that when it calls out it sends the phone number 4035551234, not the actual number. If I change the VOIP dial-peer associated with it to include the line:

answer-address 4034511234

which is the actual phone number, then the call still ignores the DP and goes out like:

port called codec dial-peers

1/0:23.21 *4035434567 g729r8 0/998

So I don't see how this will help?


Paolo Bevilacqua Thu, 06/18/2009 - 01:26

It hits the default DP, you have to make the translations so that unless it hits the specific DP, the called number is invalid.

infosateng Thu, 06/18/2009 - 06:30

Ok so my calls hit the default DP, that I agree with.

But how do I make a translation rule say that if you don't hit your specific DP the call fails?

I am trying to block calls based on calling number, not called.

Cheers and Thanks!


Paolo Bevilacqua Thu, 06/18/2009 - 10:15

Like I said in my first reply.

When default DP is hit, no special prefix is added, and call will fail.


This Discussion