Route Incoming Based on Calling Party Number

Unanswered Question
May 2nd, 2009

Hi. I want all calls coming from 07917123456 when they are calling 12345 to be translated so they ring 56789 instead. However all calls not from 07917123456 which ring 12345 should go through to that number.

I have tried to get this working using a translation rule to change the called number and match the incoming number on a dial-peer using the answer-address, however my default incoming dial-peer uses incoming called-number . which means all calls are matching this.

Anyone have any ideas on a way of getting this working? Its a H323 gateway and I am using Call Manager 5.

voice translation-rule 99

rule 1 /^12345$/ /56789/


voice translation-profile DIVERT

translate called 99


dial-peer voice 99 pots

answer-address 07917123456


translation-profile incoming DIVERT


dial-peer voice 1 pots

description *** Default incoming ***

incoming called-number .


port 0/2/0


I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Paolo Bevilacqua Sat, 05/02/2009 - 11:29

Add "incoming called-number ." to DP 99 as well.

Also, contrary to certain documentaion, you do not need to specify a port for incoming-only DP's".

ian.ryder Sat, 05/02/2009 - 11:32

Hi, I have tried adding incoming called number . to the dialpeer as well, however it then provides a match.

If I shut down the default dial-peer then the 99 dial-peer works succesfully, but it translates the called number for any incoming call whether its sources from 0791712345 or any other number. So doesnt appear to be taking the answer-address into account.

ian.ryder Sat, 05/02/2009 - 11:30

Another point. When I make an incoming call and debug voip dialpeer it does not appear to be matching dial-peer voice 99 using the answer-address.

Even though I see the following:

Calling Number=07917123456, Called Number=12345, Voice-Interface=0x0,

Paolo Bevilacqua Sat, 05/02/2009 - 11:32

You should be able to match the calling number with either answer-address or destination-pattern.

ian.ryder Sat, 05/02/2009 - 11:38

I have tried using the answer-address as above.

A question regarding the operation of dial-peers. If the incoming called number matches, which it does as I am using . wildcard, is the dial-peer still a match even if it doesnt match the answer-address. So it will affect all calls.

Paolo Bevilacqua Sat, 05/02/2009 - 12:32

Try "no huntstop" on DP 1"

Try lowering preference on DP 1.

After an equal weight first match, DP selection should preference anyway the one with a calling number.

All failing you can try a different IOS image or it's matter for the TAC.


This Discussion