Voice Translation Rules

Answered Question
Feb 20th, 2012
User Badges:

Hello,

I have stumbled upon what I believe is a voice translation rule issue in my Cisco voice home lab.

My senero is that I have one Cisco 1760 router with a FXO card connecting to the PSTN(home line 2).  My second router is just a 2691 running CME that is hosting my cisco phones.  finally I have an Asterisk server hosting an FXO card connecting to the PSTN (home line 1) and an SIP trunk to broadvoice.com.  The issue I am having, as you can see from my config, is that when I dial 88 followed by the 10 digit number to send calls out on line 2 it is matching up with my dial-peer 102 and sending to asterisk instead of the 1760.  I believe I need a voice translation rule that says when a dialing string starts with 88 followed by 10 digits send it to the 1760 and if just a 10 digit number  (including one that starts with 866, 888, or any 8 for that matter) is dialed send it to asterisk..  Forgive me for any ignorance but this is the first time in my cvoice studies that I have run into this issue and i'm sure it is better that I run into it now, rather than exam day (lol).  Any help is greatly appreciated. 





Cisco 1760 192.168.2.3 (hosting FXO card for line 2)


dial-peer voice 100 voip

description *** Dial 9 and send to Asterisk SIP broadvoice ***

destination-pattern 9[2-9]..[2-9]......

session target ipv4:192.168.2.2

session protocol sipv2

codec g711ulaw

!

dial-peer voice 101 pots

description *** dial 88 Connection to line 2 on FXO port ***

destination-pattern 88[2-9]..[2-9]......

port 3/0

forward-digits 10

!

dial-peer voice 102

description *** 10 digit connection to asterisk line 1 FXO ***

destination-pattern [2-9]..[2-9]......

session target ipv4:192.168.2.2

session protocol sipv2

codec g711ulaw



cisco 2691 (hosting phones)


dial-peer voice 100 voip

description *** Dial 9 and send to Asterisk SIP broadvoice ***

destination-pattern 9[2-9]..[2-9]......

session target ipv4:192.168.2.2

session protocol sipv2

codec g711ulaw

!

dial-peer voice 101 voip

description *** dial 88 to access 1760 FXO port ***

destination-pattern 88[2-9]..[2-9]......

session target ipv4:192.168.2.3

codec g711ulaw

!

dial-peer voice 102

description *** 10 digit connection to asterisk line 1 FXO ***

destination-pattern [2-9]..[2-9]......

session target ipv4:192.168.2.2

session protocol sipv2

codec g711ulaw




Thanks

-Jeff

Correct Answer by acampbell about 5 years 5 months ago

Hi,

Paolo is correct (+5 P ), this is dued to overlapping patterns

2 dial peers on the 2961 for the phones


!
dial-peer voice 101 voip
description *** dial 88 to access 1760 FXO port ***
destination-pattern 88[2-9]..[2-9]......
session target ipv4:192.168.2.3
codec g711ulaw
!
dial-peer voice 102
description *** 10 digit connection to asterisk line 1 FXO ***
destination-pattern [2-9]..[2-9]......
session target ipv4:192.168.2.2
session protocol sipv2
codec g711ulaw
!

From DP 101 -- 88[2-9]..[2-9]...... = 12 DIGITS
From DP 102 -- [2-9]..[2-9]......   = 10 DIGITS

As soon as the 10 digits pattern in DP102 is matched the call is sent to
that distination.


You would need to change onme of the patterns to use like an
access code say on DP 102
4[2-9]..[2-9]...... then remove the 4 with a profile or further down the line.



HTH
Alex

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (3 ratings)
Loading.
paolo bevilacqua Tue, 02/21/2012 - 00:07
User Badges:
  • Super Gold, 25000 points or more
  • Hall of Fame,

    Founding Member

You are trying to to things with overlapping numbers - 88 followed by something. As sson the first Dp is matched, the call goes out that is normal.


Overlapping always cause problems. You should differentiate numbers, eg 1-886xxxzzz. so that there is no overlap.

Dennis Mink Tue, 02/21/2012 - 03:45
User Badges:
  • Blue, 1500 points or more

Can you provide the debug dialpeer output. Of a 88xxxxxxxxxx call off the 2691 and see what numbers/ manipulation it gets offered that make it choose dialpeer 102 instead of 101




Thx


Sent from Cisco Technical Support iPhone App

Correct Answer
acampbell Tue, 02/21/2012 - 04:35
User Badges:
  • Green, 3000 points or more

Hi,

Paolo is correct (+5 P ), this is dued to overlapping patterns

2 dial peers on the 2961 for the phones


!
dial-peer voice 101 voip
description *** dial 88 to access 1760 FXO port ***
destination-pattern 88[2-9]..[2-9]......
session target ipv4:192.168.2.3
codec g711ulaw
!
dial-peer voice 102
description *** 10 digit connection to asterisk line 1 FXO ***
destination-pattern [2-9]..[2-9]......
session target ipv4:192.168.2.2
session protocol sipv2
codec g711ulaw
!

From DP 101 -- 88[2-9]..[2-9]...... = 12 DIGITS
From DP 102 -- [2-9]..[2-9]......   = 10 DIGITS

As soon as the 10 digits pattern in DP102 is matched the call is sent to
that distination.


You would need to change onme of the patterns to use like an
access code say on DP 102
4[2-9]..[2-9]...... then remove the 4 with a profile or further down the line.



HTH
Alex

paolo bevilacqua Tue, 02/21/2012 - 05:49
User Badges:
  • Super Gold, 25000 points or more
  • Hall of Fame,

    Founding Member

Indeed +5 to Alex for taking the time of explaining what is wrong exactly.

Jeffrey Miller Sun, 02/26/2012 - 22:02
User Badges:

Hey Guys,

Thanks for all the help and input.  Alex I ended up using your suggestion of placing a 4 at the end and then stripping it off.  Cisco's translation rules and a little more complex than asterisk.  Just one last thing if you could help.  This is my translation rule at the moment to add the 4 at the beginning of the string. 


voice translation-rule 1

rule 1 /^/ /4/


is there a way that instead of the ^ I can specify to forward 10 digits instead of all of them.


Thank you very much

-Jeff

Actions

This Discussion

Related Content