Showing results for 
Search instead for 
Did you mean: 

Welcome to the Cisco Small Business Community

Have a question? Click on a topic board below to get started in the community.


Routing inbound calls by area code

Hi all,

Being in a bilingual country, we have a client that would need to be able to route inbound calls by area code.

The client will have a T1 PRI, and would like to have something like this :

Outside call 514-XXX-XXXX -> routed to AA1 (french auto attendant)

Outside call 506-XXX-XXXX -> routed to AA2 (english auto attendant)

And so on

Is there anyway to do this in a UC560 system?

If so, how?

Thank you!

Alexander Maroukian
Rising star


You can accomplish this in two other different ways.

1. Create one AA1 in English or French. Put one of the options to be e.g. "Press 1 for French" and forward this to the other AA.

2. Create one AA with two options e.g. "Press 1 for French" ""Press 2 for English" and each option forward to the respective AA.

Best regards,


*Please rate helpful posts

Hello Alexander,

That is not exactly what I am looking for...

Right now the client has an old Nortel PBX and it is actually doing what we are looking for in the UC560.

When a call is received by the PBX, it will "analyse" the phone number of the call and route it to the proper AA automatically.

So basically, we could set rules for every area code in the PBX and associate them with the right AA, either french or english. The caller wouldn't need to press a button to get the good language, his call would simply be routed automatically to the english AA if his area code was listed as an english speaking area code, and in the AA queue, if he was in a french speaking area code.

I don't know if I am clear but hopefully I am, and hopefully, there is something that can be done as it will have an impact on his buying decision.

Thanks guys!

I spoke with a Cisco Engineer today and he confirmed me that this was not feasible on the UC5XX line.

We might have a solution where the phone provider maybe will be able to redirect calls from specific are code to a specific phone number. In that case, I guess we could achieve what we are looking for?

Just so you are aware --

This is definetely possible on the UC500 platform... but not via CCA. So it would be a custom solution outside of Cisco Support. (Unless you are CLI certified -- and even then, not if you went the script route)

If your curious, there are 3 ways this could be done: (that I can think of)

1. Some fancy custom dial peers. Probaby pretty simple for you since you only need a few area codes.

2. TCL Script -- much harder, but really flexible.

3. CUE script -- not 100% sure this is possible (the script editors ability to manipulate strings is pretty weak -- needed for matching the dial patterns)


Are you talking about my initial question? If so, I'd be definately interested to know a bit more about those solutions.

Do you have some examples/documents I could relate to?

Thank you!

Yes I was referring to the original question.

For the dial-peer solution,

Something like this: (I just typed this up off the top of my head - NOT TESTED)

voice translation-rule 1000

rule 1 /.*/ /300/

voice translation-profile 418_redirect

translate called 1000

voice translation-rule 1001

rule 1 /.*/ /301/

voice translation-profile 514_redirect

translate called 1001

voice translation-rule 1002

rule 1 /.*/ /302/

voice translation-profile 506_redirect

translate called 1002

dial-peer voice 100 voip

description 418 Area Code

translation-profile incoming 418_redirect

incoming called number 8005555555

answer-address 418.......

session protocol sipv2


session protocol sipv2

session target ipv4:

dtmf-relay rtp-nte

codec g711ulaw

no vad

dial-peer voice 100 voip

description 514 Area Code

translation-profile incoming 514_redirect

incoming called number 8005555555

answer-address 514.......

session protocol sipv2


session protocol sipv2

session target ipv4:

dtmf-relay rtp-nte

codec g711ulaw

no vad

dial-peer voice 100 voip

description 506 Area Code

translation-profile incoming 506_redirect

incoming called number 8005555555

answer-address 506.......

session protocol sipv2


session protocol sipv2

session target ipv4:

dtmf-relay rtp-nte

codec g711ulaw

no vad

300, 301, 302 are 3 auto attendants in this scenario.

As I said -- I havn't tested this, and it will definetely not be Cisco supported unless you are UC Express certified.

For the other 2 solutions: (Much more difficult -- much less documented)


CUE Script:

Hope that helps.


Wow this looks like it might be what I need.

Do you know if it would work if I test it out on a UC520 with PSTN lines or do I need to have a PRI to make it work. I'm not sure if with PSTN line, the UC is able to read the caller phone number and use the right dial-peer...

Might need to test it out myself.

You would have to change those dial peers to do POTS... but other than that it should work.

This is of course assuming that your provider sends caller-id. (you also need caller-id enabled on the voice-ports -- I think CCA does this by default.)

Daniel is 100% correct here (rated), including that the weak CUE "language" doesn't allow for string manipulation.

In my TCL/IVR scripts, calling number routing is supported, and I have added dual-language support to B-ACD/AA.

Haven't had a chance to test Daniel's solution yet, but I am guessing this will work as expected. I should be able to test this out this week.

Just out of curiosity, could you post your script Paolo? I am curious to see what a TCL script looks like.


My scripts can be acquired at

Recognize Your Peers
How would you describe your level of technical expertise?