cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
712
Views
10
Helpful
4
Replies

CUCM and Dial-Peers to 2 separate trunks

fieryhail
Level 1
Level 1

Hello All,

Please don't shoot me because of this question, lol.  I think the answer should be simple, but for some reason the answer is eluduing me.  I have a voice router setup with CUBE to SIP Trunk provider, as well as 3 FXO's to PSTN.  I am trying to setup dial-peers on the router so that outbound calls made from CUCM go out one trunk or the other based on the prefix digit dialed.  For instance,m if i dial 98885551212 then the call gets routed out the SIP Trunk dial-peer to the PSTN, if I dial 88885551212 then the call goes out to PSTN via one of the FXO ports.  The SIP trunk provider requires 10 digit dialing, the FXO requires 11 digits (1+888-555-1212).  I feel the answer lies somewhere with the "Called Party Transformations" area of the "Route Patterns" in CUCM and a corresponding destination-pattern in the dial-peer.  Have tried numerous combinations but still no luck.  This is a lab setup so nothing very in-depth as of now with the dial-peers.  For now, just want to get calls routed out of one trunk or the other based on the prefix digit dialed from IP Phone in CUCM.  Here are my 4 dial-peers currently.

dial-peer voice 91 voip
destination-pattern 2132819314
voice-class codec 1
session target ipv4:172.16.0.2
incoming called-number .
dtmf-relay h245-alphanumeric
no vad
!
dial-peer voice 9 voip
destination-pattern 9[2-9]..[2-9]......
voice-class codec 1
session protocol sipv2
session target sip-server
session transport udp
incoming called-number 9T
dtmf-relay rtp-nte
!
dial-peer voice 200 pots
trunkgroup FXO1
destination-pattern 8.T
forward-digits 0
!
dial-peer voice 1000 voip
preference 1
destination-pattern 10..
session target ipv4:172.16.0.2
dtmf-relay h245-alphanumeric h245-signal
no vad

The dial-peer 1000 is to route calls to an AA from PSTN coming in.

My other question, is how would I route calls from the PSTN that come in on the SIP trunk (dial-peer 91) to go to a specific DN inside CUCM, i.e, 1001.  Do I need a translation pattern?  Any help greatly appreciated.  Thanks in advance.

2 Accepted Solutions

Accepted Solutions

William Bell
VIP Alumni
VIP Alumni

For question 1, Try this:

dial-peer voice 9 voip

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

voice-class codec 1

session protocol sipv2

session target sip-server

session transport udp

dtmf-relay rtp-nte

!

dial-peer voice 200 pots

trunkgroup FXO1

destination-pattern 8.T

forward-digits all

prefix 1

!

>> My other question, is how would I route calls from the PSTN that come in on the SIP trunk (dial-peer 91) to go to a specific DN inside CUCM, i.e, 1001. Do I need a translation >>pattern? Any help greatly appreciated. Thanks in advance.

Depends on what your SIP carrier is giving you. For example, if your carrier is giving you 10-digits and your DID range is 7035551000 to 7035551999 then you could do something like this:

dial-peer voice 1000 voip

destination-pattern 7035551....

voice-class codec 1

session target ipv4:172.16.0.2

dtmf-relay h245-alphanumeric

no vad

!

The above would route the call to your CUCM cluster and you can use translation patterns or significant digits (h323 gateway config) to truncate the pattern. I prefer translations myself. As an alternate solution you could do this

voice translation-rule 10

rule 1 /^703555/ //

!

voice translation-profile truncateDID

translate called 10

!

dial-peer voice 1000 voip

destination-pattern 7035551....

voice-class codec 1

session target ipv4:172.16.0.2

translation-profile outgoing truncateDID

dtmf-relay h245-alphanumeric

no vad

!

Personally, I recommend preserving all digits presented by the carrier in the call setup to the CUCM. Meaning, if using 10-digits from the carrier then send all 10 to the CUCM cluster and use digit translation on the CUCM to control presentation. This is more scalable/flexible in the long run.

Going back to your first question, you could also prefix digits (using transformation patterns or Route List/Route Group assignments) at the CUCM before handing the call off to the voice gateway. You may find this is more flexible. Meaning, you could come up with a prefix solution whereby a certain sequence of digits will uniquely identify the call path you wish to take. The idea is to match your digit patterns as you normally would and then prefix a code (like 101 for POTS lines and 102 for SIP trunk) on the called party number before sending it to the gateway. You can do this either on the route pattern, Route Group (via Route List assignment), or as a Called Party Transformation Pattern on the gateway. Then, on the gateway itself you simply have two dial-peers that match on the prefix codes you made up. You will also want translation-profiles on the voice gateway to manipulate the digits (stripping the prefix codes). This is probably overkill for a lab setup.

HTH.

Regards,

Bill

HTH -Bill (b) http://ucguerrilla.com (t) @ucguerrilla

Please remember to rate helpful responses and identify

View solution in original post

Your new dial-peer will overlap with the 8T pattern on the POTS dial-peer and present problems in the long run. If your CUCM is sending the leading 9 to the voice gateway then it should match your SIP dial-peer. Though, an interesting point is that you would need a translation-profile/translation-rule on your gateway to strip the "9" before giving the call to your carrier. This is just a side note and wouldn't really contribute to the problem you describe. Based on the dial-peers you provided I am not sure how the leading "9" overlapped with the 8T destination pattern on the POTS dial-peer. I am missing something here.

As far as learning translations and transformation patterns. I recommend looking at the Unified Communications SRND (http://www.cisco.com/go/srnd/) as a starting point. If you are just starting to learn CUCM and aren't comfy with how partitions, calling search spaces, translations, etc. interact then you may want to check out some intro books. Cisco Press has several books on Cisco voice and CUCM.

HTH.

Regards,

Bill

HTH -Bill (b) http://ucguerrilla.com (t) @ucguerrilla

Please remember to rate helpful responses and identify

View solution in original post

4 Replies 4

William Bell
VIP Alumni
VIP Alumni

For question 1, Try this:

dial-peer voice 9 voip

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

voice-class codec 1

session protocol sipv2

session target sip-server

session transport udp

dtmf-relay rtp-nte

!

dial-peer voice 200 pots

trunkgroup FXO1

destination-pattern 8.T

forward-digits all

prefix 1

!

>> My other question, is how would I route calls from the PSTN that come in on the SIP trunk (dial-peer 91) to go to a specific DN inside CUCM, i.e, 1001. Do I need a translation >>pattern? Any help greatly appreciated. Thanks in advance.

Depends on what your SIP carrier is giving you. For example, if your carrier is giving you 10-digits and your DID range is 7035551000 to 7035551999 then you could do something like this:

dial-peer voice 1000 voip

destination-pattern 7035551....

voice-class codec 1

session target ipv4:172.16.0.2

dtmf-relay h245-alphanumeric

no vad

!

The above would route the call to your CUCM cluster and you can use translation patterns or significant digits (h323 gateway config) to truncate the pattern. I prefer translations myself. As an alternate solution you could do this

voice translation-rule 10

rule 1 /^703555/ //

!

voice translation-profile truncateDID

translate called 10

!

dial-peer voice 1000 voip

destination-pattern 7035551....

voice-class codec 1

session target ipv4:172.16.0.2

translation-profile outgoing truncateDID

dtmf-relay h245-alphanumeric

no vad

!

Personally, I recommend preserving all digits presented by the carrier in the call setup to the CUCM. Meaning, if using 10-digits from the carrier then send all 10 to the CUCM cluster and use digit translation on the CUCM to control presentation. This is more scalable/flexible in the long run.

Going back to your first question, you could also prefix digits (using transformation patterns or Route List/Route Group assignments) at the CUCM before handing the call off to the voice gateway. You may find this is more flexible. Meaning, you could come up with a prefix solution whereby a certain sequence of digits will uniquely identify the call path you wish to take. The idea is to match your digit patterns as you normally would and then prefix a code (like 101 for POTS lines and 102 for SIP trunk) on the called party number before sending it to the gateway. You can do this either on the route pattern, Route Group (via Route List assignment), or as a Called Party Transformation Pattern on the gateway. Then, on the gateway itself you simply have two dial-peers that match on the prefix codes you made up. You will also want translation-profiles on the voice gateway to manipulate the digits (stripping the prefix codes). This is probably overkill for a lab setup.

HTH.

Regards,

Bill

HTH -Bill (b) http://ucguerrilla.com (t) @ucguerrilla

Please remember to rate helpful responses and identify

Thank you for the quick response Bill,

It worked, kind of.  When I tried dialing outbound, the calls still went out the FXOs however.  As a temp workaround, I setup a pattern [2-9]XX[2-9]XXXXXX# in CUCM and:

dial-peer voice 9 voip
destination-pattern [2-9]..[2-9]......
voice-class codec 1
session protocol sipv2
session target sip-server
session transport udp
dtmf-relay rtp-nte
no vad

in router.  This separates the calls.  I do have a question regarding using translation patterns in CUCM.  I'm still quite new to CUCM and have often heard of translation patterns.  I understand the basic idea, but I'm confused as to how to implement them in CUCM to accept the call and then translate the incoming string to a DN.  Do you have any information as to where I might learn more about this or learn about setting it up?  Currently I only have 1 SIP trunk for testing purposes, as I progress further, I will bring more in however am trying to keep it relatively simple at the moment.  Thank you very much and sorry for the newb question.  At some point I'll understand...And continue to learn :-)

Your new dial-peer will overlap with the 8T pattern on the POTS dial-peer and present problems in the long run. If your CUCM is sending the leading 9 to the voice gateway then it should match your SIP dial-peer. Though, an interesting point is that you would need a translation-profile/translation-rule on your gateway to strip the "9" before giving the call to your carrier. This is just a side note and wouldn't really contribute to the problem you describe. Based on the dial-peers you provided I am not sure how the leading "9" overlapped with the 8T destination pattern on the POTS dial-peer. I am missing something here.

As far as learning translations and transformation patterns. I recommend looking at the Unified Communications SRND (http://www.cisco.com/go/srnd/) as a starting point. If you are just starting to learn CUCM and aren't comfy with how partitions, calling search spaces, translations, etc. interact then you may want to check out some intro books. Cisco Press has several books on Cisco voice and CUCM.

HTH.

Regards,

Bill

HTH -Bill (b) http://ucguerrilla.com (t) @ucguerrilla

Please remember to rate helpful responses and identify

Thank you again.  Yes, I am still quite new to CUCM, partitions/CSS are fine so far, am also currently reading through books as well.  Books only go so far however without the hands on.  Thus the lab portion lol.  Once again, I very much appreciate your assistance. 
I'll be spending lots of time reading through this link as well.  Thanks again Bill.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: