cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2874
Views
3
Helpful
19
Replies

Outgoing calls working but incoming calls not making it to CUCM

ftorres
Level 1
Level 1

Hi there, I am learning to work with the CUBE.  At the moment, I have been able to make it to where outbound calls are working as expected.  Incoming calls are not being routed to CUCM from CUBE.  Instead, they are being sent back to the PSTN, creating a loop. I would greatly appreciate any help you can give.  I have been able to use several tools and identify the problem with the loop, but I have no clue how to fix it.

I am using CUCM 12.5, Flowroute (PSTN)

Dial Peers

dial-peer voice 100 voip
description *Inbound LAN DP - CUCM to CUBE*
session protocol sipv2
incoming called-number 1[2-9]..[2-9]......
dtmf-relay rtp-nte
codec g711ulaw
no vad
!

dial-peer voice 110 voip
description *Outbound WAN DP - CUBE to PSTN*
destination-pattern 1[2-9]..[2-9]......
session protocol sipv2
session target sip-server
session transport udp
dtmf-relay rtp-nte
codec g711ulaw
no vad
!

dial-peer voice 220 voip
description *Outbound LAN DP - CUBE to CUCM*
destination-pattern 1[2-9]..[2-9]......
session target ipv4:10.0.0.100
dtmf-relay rtp-nte
codec g711ulaw
no vad
!

dial-peer voice 200 voip
description *Inbound WAN DP - PSTN to CUBE*
session protocol sipv2
incoming called-number .
dtmf-relay rtp-nte
codec g711ulaw
no vad
!

2 Accepted Solutions

Accepted Solutions

Try with this configuration.

 

voice service voip
 ip address trusted list
  no ipv4 10.0.0.0 255.254.0.0
  ipv4 10.0.0.100
  ipv4 10.0.0.101
  ipv4 54.71.6.127
  ipv4 34.211.73.216
  ipv4 207.223.78.224
 no allow-connections h323 to h323
 no allow-connections h323 to sip
 no allow-connections sip to h323
!
voice class codec 1
 codec preference 1 g711ulaw
 codec preference 2 g711alaw
 codec preference 3 g729r8
!
voice class sip-options-keepalive 1
 description Used for Server Group SIP OPTIONS PING
!
voice class server-group 1
 ipv4 10.0.0.101 preference 1
 ipv4 10.0.0.100 preference 2
 description Inbound calls from PSTN to CUCM
!
voice class uri CUCM sip
 host ipv4:10.0.0.100
 host ipv4:10.0.0.101
!
voice class uri PSTN sip
 host ipv4:34.226.36.33
 host ipv4:34.226.36.34
 host ipv4:34.226.36.35
 host ipv4:34.226.36.36
 host ipv4:34.226.36.37
 host ipv4:34.226.36.38
 host ipv4:34.226.36.39
 host ipv4:34.226.36.40
 host ipv4:34.226.36.41
 host ipv4:34.226.36.42
 host ipv4:34.226.36.43
 host ipv4:34.226.36.44
 host ipv4:34.226.36.45
 host ipv4:34.226.36.46
 host ipv4:54.71.6.127
 host ipv4:34.211.73.216
 host ipv4:207.223.78.224
!
voice class dpg 220
 description *CUBE to CUCM*
 dial-peer 220
!
voice class dpg 110
 description *CUBE to PSTN*
 dial-peer 110
!
voice translation-rule 200
 rule 1 /^\+\(1.*\)/ /\1/
!
dial-peer voice 200 voip
 description *Inbound WAN DP - PSTN to CUBE*
 session protocol sipv2
 no session target sip-server
 no incoming called-number .
 incoming uri via PSTN
 destination dpg 220
 voice-class sip bind control source-interface GigabitEthernet1
 voice-class sip bind media source-interface GigabitEthernet1
 dtmf-relay rtp-nte
 no codec g711ulaw
 voice-class codec 1
 no vad
!
dial-peer voice 100 voip
 description *Inbound LAN DP - CUCM to CUBE*
 session protocol sipv2
 no session target sip-server
 no incoming called-number 1[2-9]..[2-9]......
 incoming uri via CUCM
 destination dpg 110
 voice-class sip bind control source-interface GigabitEthernet1
 voice-class sip bind media source-interface GigabitEthernet1
 dtmf-relay rtp-nte sip-kpml
 no codec g711ulaw
 voice-class codec 1
 no vad
!
dial-peer voice 220 voip
 description *Outbound LAN DP - CUBE to CUCM*
 session protocol sipv2
 translation-profile outgoing plusoff
 destination-pattern BAD.A
 no session target ipv4:10.0.0.100
 session server-group 1
 no session transport udp
 voice-class sip options-keepalive profile 1
 voice-class sip bind control source-interface GigabitEthernet1
 voice-class sip bind media source-interface GigabitEthernet1
 dtmf-relay rtp-nte sip-kpml
 no codec g711ulaw
 voice-class codec 1
 no vad
!
dial-peer voice 110 voip
 description *Outbound WAN DP - CUBE to PSTN*
 session protocol sipv2
 destination-pattern BAD.B
 session target sip-server
 voice-class sip options-keepalive
 voice-class sip bind control source-interface GigabitEthernet1
 voice-class sip bind media source-interface GigabitEthernet1
 dtmf-relay rtp-nte
 no codec g711ulaw
 voice-class codec 1
 no vad
!

 

 

 



Response Signature


View solution in original post

You are missing “session protocol sipv2“ on your new dial peers.

View solution in original post

19 Replies 19

Celso Silva
Level 1
Level 1

Would you mind to post your CUBE configuration and version (sh run / sh ver)? At a glance you can use voice class URI to match all calls coming from your PSTN and redirect to CUCM using dial-peer group DPG.

I tried the sample you posted about URI and DPG.  It didn't work for me.  I am attaching the two files you wanted to see.  I masked PSTN usernames, passwords, and sn; everything else is there.  Let me know if you need me to get anything else.

Can you please share information about what IP addresses that your CM uses and what IP(s) that is presented in the VIA header in the incoming invite from your service provider for inbound calls?



Response Signature


I took a quick look at your shared configuration. From what I can see you use sip-server as the target for all, or at least most of your dial peers. This will for example not work for the outbound dial peer to CM if you where to use it and it should not be used on inbound dial peers as it’s a setting that is used for outbound dial peers.

Also you only seem to use one interface in your SBC (Cube), this is not a recommended design. You should use two interfaces, one for the connection to your inside network and another that is connected to your service provider. That way you differentiate between your internal network and the service provider and have a demarcation point between the two. With one interface that you have now you reveal your entire network to the service provider and that’s not a good thing for many reasons, primarily from a security perspective.

Have a look at this document for details on how to configure Cube. Cisco Unified Border Element Configuration Guide Through Cisco IOS XE 17.5 



Response Signature


Celso Silva
Level 1
Level 1

Example of config where you use voice class URI and destination DPG:
!
voice class uri 200
 host ipv4:x.x.x.x         ! PSTN IP address
!
voice class dpg 220
 description *CUBE to CUCM*
 dial-peer 220 preference 1
!
dial-peer voice 200 voip
description *Inbound WAN DP - PSTN to CUBE*
session protocol sipv2
incoming uri via 200
destination dpg 220
dtmf-relay rtp-nte sip-kpml
codec g711ulaw
no vad
!

Your general problem is that you use the same destination pattern for both your outbound dial peers.

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

You need to change this so that you don’t have the exact same match on both. In CM how have you defined your directory numbers, are they full DID numbers or shortened numbers or even in +E.164 format? If they are either in the shortened or +E.163 format you can change the destination pattern on the outbound dial peer towards CM to match that and create a voice translation rule that is used on the inbound dial peer from PSTN to translate the called number into that format. That way you’ll get different numbers matched on your two outbound dial peers.

Apart from that it’s strongly advised to use something other than numerals to match your inbound dial peers. It’s much better to use information in the VIA header for this, or any other header in the SIP invite you’d prefer, but using VIA has the highest preference in the match for inbound dial peers. You can read more on this and also basically everything you’d need to know about how call routing works in IOS in this fantastic document. In Depth Explanation of Cisco IOS and IOS-XE Call Routing 

Another option all together is to use DPGs for the definition of the outbound dial peers as @Celso Silva suggested. For that the destination pattern set on the outbound dial peers have no relevance in the selection of what dial peer to use, but it’s still necessary to set one as otherwise the dial peer will have an operational status as down and then it cannot be used by the DPG configuration. This is why you’d often see a destination pattern like BAD.BAD or something similar in DPG configuration examples. If you go down that path it’s still recommended to use something else than a numeric match for the inbound dial peers, so my recommendation above is still applicable. If you go with DPG I would recommend that you use that for both calls to CM and for calls to PSTN.



Response Signature


So far, I have tried uri, e.164 pattern map, transform pattern to add a 9 in front, and sending that way it to CM.  The incoming part is not even taking the transformation pattern.  The only thing I have yet to try is adding the second interface.  I feel like I am missing something somewhere (with the inbound).  I tried removing the sip-server from the incoming DPs.   It's taking some time since I am still in the process of reading and grasping this whole thing since is new to me.

If you share the information that I asked for we will be able to help with your configuration. If you don’t know it please provide the output from debug voip ccapi inout and debug ccsip message with both enabled at the same time and do an inbound call. With this we should be able to figure out what’s going on.



Response Signature


Sorry, this is what I added for URI

voice class uri CUCM sip
host ipv4:10.0.0.100  <CUCM Pub>
host ipv4:10.0.0.101  <CUCM Subscriber>
!

voice class uri Flowroute sip  <PSTN>
host us-east-va.sip.flowroute.com
host ipv4:34.226.36.32
host ipv4:34.226.36.33
host ipv4:34.226.36.34
host ipv4:34.226.36.35
host ipv4:34.226.36.36
host ipv4:34.226.36.37
host ipv4:34.226.36.38
host ipv4:34.226.36.39
host ipv4:34.226.36.40
host ipv4:34.226.36.41
host ipv4:34.226.36.42
host ipv4:34.226.36.43
host ipv4:34.226.36.44
host ipv4:34.226.36.45
host ipv4:34.226.36.46
host ipv4:34.226.36.47
!

 

Let me know if you still need me to run a debug ccsip message and voip ccapi inout.

Thanks, are you absolutely sure on that all of these IPs can be present in the VIA header in the incoming invite for an inbound call from the service provider? It seems to be an awfully long list. It’s not very common to be that many, 1-3 is likely the most common. If you do collect the asked for debug output we should be able to validate this and also see what dial peers are used for each of the call legs. Collect the output and put it in a text file that you attach to the post.



Response Signature


Usually, for the PSTN, the IPs shown are:

host ipv4:34.226.36.32
host ipv4:34.226.36.33
host ipv4:34.226.36.34
host ipv4:34.226.36.35
host ipv4:34.226.36.36

CUCM 10.0.0.100 (Pub) 10.0.0.101 (Sub)

CUBE 10.0.0.250

 

In the shared invite this is the content of the VIA header.

Via: SIP/2.0/UDP 34.226.36.33:5060;branch=z9hG4bK571e.e2db9b247bde5f36154a40f5c9322890.0
Via: SIP/2.0/UDP 54.71.6.127:5060;branch=z9hG4bK571e.fa7225ef172f7f3c02b6cba3ca9b5216.1
Via: SIP/2.0/UDP 34.211.73.216:5060;branch=z9hG4bK571e.f27464d35cff53bb4d2e09ac632b2d36.0
Via: SIP/2.0/UDP 207.223.78.224:5060;branch=z9hG4bK00B888fef73f5e224fe

Those IPs is what you should use in the URI voice class.



Response Signature


From your shared configuration the call is intended to match dial peer 200 inbound for calls from the service provider, but it is matching dial peer 100. Then it matches dial peer 110 in the outbound direction instead of the intended 220. You need to change the match on inbound dial peers to use VIA header and remove the numeric match on dial peer 100 and 200. Once you’ll done that you can either modify the called number with an inbound voice translation profile on dial peer 200 so that you get a different number format that you can use as the destination pattern on the outbound dial peer to CM. On that dial peer you should also use a server group as you have multiple CMs instead of pointing it to one IP. You have not yet given us the information on how you have configured your directory numbers in CM. That’s a needed information to know how to craft the translation. The second option is to use DPGs, then you can forgo the translation and the destination number on the outbound dial peers as it has no actual part of call routing. You might need to do a translation anyway, it all depends on how you have formed your directory numbers in CM, but then you can do it in either the router as an outbound translation on the dial peer that sends calls to CM or in CM with various available options.



Response Signature


Try with this configuration.

 

voice service voip
 ip address trusted list
  no ipv4 10.0.0.0 255.254.0.0
  ipv4 10.0.0.100
  ipv4 10.0.0.101
  ipv4 54.71.6.127
  ipv4 34.211.73.216
  ipv4 207.223.78.224
 no allow-connections h323 to h323
 no allow-connections h323 to sip
 no allow-connections sip to h323
!
voice class codec 1
 codec preference 1 g711ulaw
 codec preference 2 g711alaw
 codec preference 3 g729r8
!
voice class sip-options-keepalive 1
 description Used for Server Group SIP OPTIONS PING
!
voice class server-group 1
 ipv4 10.0.0.101 preference 1
 ipv4 10.0.0.100 preference 2
 description Inbound calls from PSTN to CUCM
!
voice class uri CUCM sip
 host ipv4:10.0.0.100
 host ipv4:10.0.0.101
!
voice class uri PSTN sip
 host ipv4:34.226.36.33
 host ipv4:34.226.36.34
 host ipv4:34.226.36.35
 host ipv4:34.226.36.36
 host ipv4:34.226.36.37
 host ipv4:34.226.36.38
 host ipv4:34.226.36.39
 host ipv4:34.226.36.40
 host ipv4:34.226.36.41
 host ipv4:34.226.36.42
 host ipv4:34.226.36.43
 host ipv4:34.226.36.44
 host ipv4:34.226.36.45
 host ipv4:34.226.36.46
 host ipv4:54.71.6.127
 host ipv4:34.211.73.216
 host ipv4:207.223.78.224
!
voice class dpg 220
 description *CUBE to CUCM*
 dial-peer 220
!
voice class dpg 110
 description *CUBE to PSTN*
 dial-peer 110
!
voice translation-rule 200
 rule 1 /^\+\(1.*\)/ /\1/
!
dial-peer voice 200 voip
 description *Inbound WAN DP - PSTN to CUBE*
 session protocol sipv2
 no session target sip-server
 no incoming called-number .
 incoming uri via PSTN
 destination dpg 220
 voice-class sip bind control source-interface GigabitEthernet1
 voice-class sip bind media source-interface GigabitEthernet1
 dtmf-relay rtp-nte
 no codec g711ulaw
 voice-class codec 1
 no vad
!
dial-peer voice 100 voip
 description *Inbound LAN DP - CUCM to CUBE*
 session protocol sipv2
 no session target sip-server
 no incoming called-number 1[2-9]..[2-9]......
 incoming uri via CUCM
 destination dpg 110
 voice-class sip bind control source-interface GigabitEthernet1
 voice-class sip bind media source-interface GigabitEthernet1
 dtmf-relay rtp-nte sip-kpml
 no codec g711ulaw
 voice-class codec 1
 no vad
!
dial-peer voice 220 voip
 description *Outbound LAN DP - CUBE to CUCM*
 session protocol sipv2
 translation-profile outgoing plusoff
 destination-pattern BAD.A
 no session target ipv4:10.0.0.100
 session server-group 1
 no session transport udp
 voice-class sip options-keepalive profile 1
 voice-class sip bind control source-interface GigabitEthernet1
 voice-class sip bind media source-interface GigabitEthernet1
 dtmf-relay rtp-nte sip-kpml
 no codec g711ulaw
 voice-class codec 1
 no vad
!
dial-peer voice 110 voip
 description *Outbound WAN DP - CUBE to PSTN*
 session protocol sipv2
 destination-pattern BAD.B
 session target sip-server
 voice-class sip options-keepalive
 voice-class sip bind control source-interface GigabitEthernet1
 voice-class sip bind media source-interface GigabitEthernet1
 dtmf-relay rtp-nte
 no codec g711ulaw
 voice-class codec 1
 no vad
!

 

 

 



Response Signature