cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
60912
Views
155
Helpful
74
Comments
Ayodeji Okanlawon
VIP Alumni
VIP Alumni

Often times this is one of the most misunderstood aspect of a CUBE configuration. This stems from our knowledge of how bind commands work with h323 gateway. Typically when deploying h323 gateway with CUCM we need to configured h323 bind commands on the interface that we will use for h323 traffic.

Once this is defined, this interface IP address is seen on CUCM for the gateway. Hence all h225 signaling and h245 media negotiations will be directed towards this interface.This is good for H323 and doesn't create any issues for us. However this doesn't work the same way on a SIP to SIP CUBE solution. Question is why?

On a traditional H323 to TDM PSTN connection, we only have one leg of VoIP traffic, so all h323 signaling is directed towards that leg. The other leg is a TDM either digital PRI, or Analogue FXO ports. In this setup where we apply signaling and media traffic doesn't need much consideration as it can only be done on one leg of the call.

On a H323 to SIP connection, even though we have two VoIP legs, the leg that usually connects to the PSTN is the SIP leg. In this case we usually apply sip signalling and media to the outside leg that connects to the ITSP..This works okay too without any issues….

However since most people are migrating to a full homogenous SIP solution this becomes very important to know where to apply your sip bind commands. This is because in most deployment, customers typically have two different interfaces. One interface connects to the LAN, and the other Interface connects to the ITSP. In this scenario applying the bind command wrongly on a SIP to-SIP CUBE, has the potential to remove the listener from the external interface and in some cases create a one way audio problems

Lets look at an example to understand this last point

Here is the scenario:

CUCM-----SIP---CUBE---SIP---ITSP

NB: CUCM IP is 192.168.12.190, ITSP 10.205.20.50

CUBE Interface config

interface GigabitEthernet0/0

Decription LAN interface

ip address 192.168.10.5 255.255.255.0

!

interface GigabitEthernet0/2

Decription Connection to ITSP

ip address 172.29.25.246 255.255.255.252

duplex auto

speed auto

voice service voip

sip

bind all source-interface gig0/0

In this example, all sip signaling and media traffic will be sent to gig0/0, the LAN interface on the CUBE. What is wrong with that you may ask…Well a lot!

Let’s look at a sample trace for an outbound call originating from CUCM towards the CUBE..

Received:

INVITE sip:0447014824@192.168.10.5:5060 SIP/2.0

Via: SIP/2.0/TCP 192.168.12.190:5060;branch=z9hG4bK78adb3ecc5092

From: "5399" <sip:5399@192.168.12.190>;tag=1729466~70e9433b-1d79-44ae-9a16-09a52be377c5-30642592

To: <sip:0447014824@192.168.10.5>

Sent:

INVITE sip:0447014824@10.205.20.50:5060 SIP/2.0

Via: SIP/2.0/UDP 192.168.10.5:5060;branch=z9hG4bK2C9207D

Remote-Party-ID: "5399" <sip:8065399@192.168.10.5>;party=calling;screen=yes;privacy=off

From: "5399" <sip:8065399@192.168.10.5>;tag=242A3EF4-1315

In this scenario what we see is this…All sip traffic originates and terminates on the LAN interface. Hence when CUBE sends an INVITE to the ITSP it uses the Local LAN interface also. This presents a problem because the ITSP cant talk to CUBE on the Local LAN Interface. In one case I looked at the INVITE didn't even make it to the ITSP because we never got any response from them. This is most likely because the LOCAL interface doesn't have any route to the ITSP network.

Some folks rather than binding on the local interface will bind on the interface facing the ITSP.

The major problem with this is:

CUCM will not accept any sip traffic coming from an IP address that is not configured on its sip trunk.

Lets look at a sample trace..CUCM SIP trunk configured with ip address 192.168.10.5

Received:

INVITE sip:0344556677@172.25.29.246:5060 SIP/2.0

Via: SIP/2.0/TCP 10.10:5060;branch=z9hG4bK78adb3ecc5092

From: <sip: 0447014824@10.205.20.50:5060>;tag=1729466~70e9433b-1d79-44ae-9a16-09a52be377c5-30642592

To: <sip: 0344556677@172.25.29.246>

Sent:

INVITE sip:5399@192.168.12.190:5060 SIP/2.0

Via: SIP/2.0/UDP 172.25.29.246:5060;branch=z9hG4bK2C9207D

From: <sip: : 0447014824@172.25.29.246>;tag=242A3EF4-1315

In this case, we can see that CUBE has sent out on INVITE to Cisco call Manager using the external interface.

The result of this is call failure. This is because CUCM is going to reject the call with “501 service unavailable” due to the fact that the IP address from which sip traffic originates and to which CUBE has indicated it want to receive a response back (through the via header) is not the ip configured on the SIP trunk on CUCM.

How do we then address SIP binds on deployments like this:

There are two ways to address this. The first is

  • No SIP BIND COMMANDS AT ALL

Don't use sip binds command at all. Yes you heard me, this is because you shouldn't need a SIP bind on SIP to SIP because the IOS on CUBE will source from the interfaces closest to the destination of the SIP packet.

In this scenario without a sip bind, CUBE will receive traffic on the Local interface and will send out INVITE to the ITSP on the ITSP interface and all will be well.

However there are scenarios where this won’t work either.I recently had one of those scenarios.

CUBE was selecting the MPLS interface on the router as the destination closest to CUCM, but because this interface was not the one configured on the sip trunk, CUCM rejected the call.

We then decided to configure this interface on the sip trunk..Everything worked except there was no audio. It turned out that this subnet was not reachable from the IP Phones Subnet. So question is what do we do..If we configure bind on one interface we had issues. When we didn’t, CUBE selected the wrong interface to originate and terminate sip traffic..This brings us to our second method

  • USE BIND COMMANDS on DIAL-PEER

Example..........

dial-peer voice 15 voip

description outbound dial-peer to CUCM

voice-class sip bind control source-interface GigabitEthernet0/0

voice-class sip bind media source-interface GigabitEthernet0/0

dial-peer voice 1 voip

description inbound from CUCM

voice-class sip bind control source-interface GigabitEthernet0/0

voice-class sip bind media source-interface GigabitEthernet0/0

dial-peer voice 2 voip

description inbound from ITSP

voice-class sip bind control source-interface GigabitEthernet0/2

voice-class sip bind media source-interface GigabitEthernet0/2

dial-peer voice 20 voip

description ***outbound dialpeer to ITSP***

voice-class sip bind control source-interface GigabitEthernet0/2

voice-class sip bind media source-interface GigabitEthernet0/2

In the config above, when traffic originates or terminate from or to CUCM-CUBE, the local interface will be used for both SIP signalling and Media traffic. When calls originate or terminate from ITSP to CUBE the external interface to ITSP will be used.

Sample trace

Received:

INVITE sip:0447014824@192.168.10.5:5060 SIP/2.0

Via: SIP/2.0/TCP 192.168.12.190:5060;branch=z9hG4bK78adb3ecc5092

From: "5399" <sip:5399@192.168.12.190>;tag=1729466~70e9433b-1d79-44ae-9a16-09a52be377c5-30642592

To: <sip:0447014824@192.168.10.5>

Sent:

INVITE sip:0447014824@10.205.20.50:5060 SIP/2.0

Via: SIP/2.0/UDP 172.25.29.246:5060;branch=z9hG4bK2C9207D

Remote-Party-ID: "5399" <sip:8065399@172.25.29.246>;party=calling;screen=yes;privacy=off

From: "5399" <sip:8065399@172.25.29.246>;tag=242A3EF4-1315

What we see here is how things should be..

CUCM sends invite to CUBE on its local interface and CUBE sends INVITE to ITSP on the external interface.

74 Comments
Ayodeji Okanlawon
VIP Alumni
VIP Alumni

Hi,

No question is silly but the one that is not asked :)

Having an inbound dial-peer is critical in most scenarios. Look at the call flow below

PBX---sip (fa0/1)----CUBE----sip(fa0/2)---ITSP

Most guys usually define the ff dial-peer for inbound calls..

dial-peer voice 1 voip

incoming called-number .

voice-class codec 1

session protocol sipv2

dtmf-relay rtp-nte 

no vad

voice-class sip bind control source-interface fa0/1

voice-class sip bind media source-interface fa0/1

The implication of this is that all your inbound sip signalling will happen on fa0/1.

So what are the issues with this

1. Security: It means that call coming from your ITSP will be routed via the fa0/1 interface even if the INVITE is sent to the ip address of fa0/2. The moment the call arrives on the gateway, the fa0/1 will be used for sip signalling because that's what you have configured.

2. If the fa0/1 interface is not routable from the ITSP point of view, then you have issues.

I recently saw this issue in one of our deployment where the ITSP was complaining that all sip responses was coming from the private interface on our CUBE.

For your scenario it wouldn't e an issue because you are using CCME and as such your  gateway is not really a CUBE. You have an two dial-peers (pots) and voip. Your VoIP dial-peer is facing your ITSP and your pots dial-peer for your ccme registered phones.

However if you have a separate ip interface on that CCME that points else where, then you need to consider how to apply your bind statements and ensure it is applied correctly..

Don't forget to rate the blog is you find it useful!

 

bvanbenschoten
Level 5
Level 5

All the bind commands really only effect the outbound requests from cube.  I think what you might be looking for is a feature added in IOS 15.1

Inbound Dial-peer Match Based on Remote IP Address on SIP Trunks

Voice class is used to match where the SIP invite is coming from.

Voice class is applied on inbound dial peers

This allows 2 dial peers with duplicate clauses < incoming called-number .>   to differentiate between the source of the invite

Based on the source IP will determine the match

 

voice class uri FromATT sip

 host ipv4:12.194.141.181

 host ipv4:12.194.129.85

!        

voice class uri FromCUCM sip

 host ipv4:10.3.90.6

 host ipv4:10.3.90.5

 host ipv4:10.3.90.7

 host ipv4:10.3.90.8

 host ipv4:10.3.90.9

 host ipv4:10.50.90.10

 host ipv4:10.8.78.11

 host ipv4:10.8.78.12

 

dial-peer voice 100 voip

 description Inbound SIP from Call Manager

 session protocol sipv2

 incoming called-number .

 incoming uri via FromCUCM

 

!

dial-peer voice 101 voip

 description Inbound SIP from ATT

 translation-profile incoming In-StripTo7Digits

 session protocol sipv2

 incoming called-number .

 incoming uri via FromATT

j.huizinga
Level 6
Level 6

I did a scenario where the ITSP IP address was a loopback on the CUBE and the inside LAN through routing protocols knew about this IP address, and also the CUCM uses this IP address.

Worked very well

 

JH

Ayodeji Okanlawon
VIP Alumni
VIP Alumni

JH,

I am not sure I understand your comments. Can you explain better.

j.huizinga
Level 6
Level 6

We had a CUBE that was placed behind an MPLS router (MPLS was a 72XX I think)

The MPLS provider also provided SIP trunk. They gave us a /32 address which we put on the CUBE as a loopback interface.

Through redistribution this /32 was know in the inside LAN and also in the network between MPLS router and CUBE.

The callmanager SIP trunk was defined using this /32 IP. On the CUBE all SIP traffic was bound to this loopback interface. The IP addresses on the two Ethernet interfaces didn't play any role in the SIP traffic.

We just had to make sure that all routing devices knew about the /32 network. We achieved that by EIGRP and some static routes.

 

Works fine for 2,5 years now

 

JH

Ayodeji Okanlawon
VIP Alumni
VIP Alumni

JH,

I am not sure if this comment is aimed at adding to the blog or correcting something on the blog.

I expect your solution to work as you described since the interface you are binding your sip signalling to is reachable from your ITSP. However most deployments do not use a single interface. Not many people trust their ITSP to give them access to their private LAN. Hence the reason why this blog was written. If we all have a single interface, then we probably wont have a need for this documentation.

You probably will find out in the future you will have requirements that use two different interfaces (private and public) for your deployment and hopefully then you will find this useful..

 

j.huizinga
Level 6
Level 6

Hi,

Just adding :)

We have had several scenarios where provider gave us a /32 address and other scenarios where we had the real IP on the outside interface from the CUBE and sometimes we need to bind, sometimes not. Sometimes one interface, sometimes two interfaces.

Think it all depends on the scenario.

 

Thanks!

 

tfertodd18
Level 1
Level 1

Hi Ayodeji,

 

Thanks for your reply.  I saw in my customer's production network the situation where the CUBE's matched inbound dial peer has a binding to an IP address that was not the destination of the original SIP INVITE.  In this scenario the SIP client (CME in my case) did not receive a response to the original INVITE.  I am pretty sure it was that the CUBE did not send the response (i.e. 1XX, 2XX..etc), although it may have been blocked by a firewall (am awaiting verification by the customer about their FW rules implemented).

If indeed the CUBE did not respond to the original INVITE it kinda answers my question regarding inbound dial beer with bindings.  Interestingly the CUBE did generate a separate INVITE to the ITSP as the destination phone rang  a couple of times before disconnecting.

 

Thanks,

 

Todd

 

FAISAL RASHID
Level 1
Level 1

Hi

Thank you for sharing. This saved me lots of troubleshooting.

Regards,

Tippu1

Oleh Doroshenko
Level 1
Level 1

What if we have options ping which does not match any dial-peer and when our side tries to reply it grabs wrong source interface. The other side cannot receive options ping and declares our side down.

And we cant enable global bind address because there are different source interfaces to CUCM and to ITSP?

 

How to make correct options ping behaviour?

Ayodeji Okanlawon
VIP Alumni
VIP Alumni

You can apply options ping at the dual-purpose level or under global level. I am not aware of any other place where you can apply it. 

Oleh Doroshenko
Level 1
Level 1

What if we have options ping which does not match any dial-peer and when our side tries to reply it grabs wrong source interface. The other side cannot receive options ping and declares our side down.

And we cant enable global bind address because there are different source interfaces to CUCM and to ITSP?

 

How to make correct options ping behaviour?

mudassirsol
Level 1
Level 1

Nice article Ayodeji,

I have a scenario i need our opinion on. Its related to SIP and bind commands. I have multiple sites which may have same IP address for phones. Each site has their own call manager. I want to connect all of them together via Cube.

 

I will install cube on each site and a centralized CUCM for Call routing. Cube on each site will have two sip sessions. One towards their own CUCM and one towards the centralized CUCM.

What i am not sure about is the media part. Since there is a chance that the Phone IP address may be same for some sites, I want to terminate IP Phone media session on cube and have a new media session using cube WAN IP towards the destination Cube.

Has anyone done similar setup?

jason.dever
Level 1
Level 1

J.H., would you be able provide an example config from your cube device? We are trying to implement the exact same setup you mentioned: a CUBE on MPLS that provides the SIP on one interface. I'm struggling to understand how to configure the interface(s) on the cube device.

thanks

JD

j.huizinga
Level 6
Level 6

Hi,

The config is as follow:

Internal----CUBE---External---FW---MPLS

Internal and external IP's from the CUBE are private IP's. We got from the provider a real /32 IP address what we configured on the CUBE as a loopback. All traffic (internal/external) has to use this real IP. This means that the SIP trunk on the callmanager uses the loopback address and not any of the Ethernet IP's. It requires some routing in the internal network, so that this specific address will not be send to the internet, but to the CUBE's internal Ethernet IP. The same from the outside, traffic to the real IP address must be routed correctly to external IP from the CUBE. On the CUBE all SIP traffic is bound to the loopback. We couldn't use anything else because this IOS was a 12.X and didn't support binding on the dial-peer.

It works perfectly, this customer has a call center that receives around 4500 call per day, and we haven't had any problems with this configuration.

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: