Understanding and Configuring Options Ping on CUBE
Understanding and Configuring Options Ping on CUBE
Do you want to know what the options ping function for SIP trunks is all about? Do you want to learn how to busy out a dial-peer when a sip trunk goes down? We will take a deep dive into what the SIP options ping is all about and hopefully answer most of your questions.
What is the SIP Options Ping
The Options Ping feature is an out-of-dialog (OOD) message that provides a keepalive mechanism between two SIP devices. One side is configured to send the options ping message and wait for a response. No configuration is necessary to respond to an options ping message. It is A generic heartbeat mechanism that allows Cisco Unified Border Element to control and monitor the status of SIP endpoints servers and give the option of busying-out a dial-peer upon failure. When this heartbeat of a monitored endpoint fails, the dial-peer will be busied out.
The options ping can be used on any SIP dial-peer whether it is a SIP trunk to CUCM or to your ITSP. It is especially useful if you have multiple SIP trunks as it will busy-out the dial-peer so that SIP traffic to that dial-peer will be sent to the next dial-peer if one exists. The dial-peer will busy-out when it has not received a response in the time period expected. The timer is set to 5000ms by default but can be configured or adjusted. A dial-peer will also busy-out if it receives a 503 or 505 error. If there is another dial-peer configured for the same path the traffic will then go out that dial-peer. For example, if another dial-peer has the same destination pattern so it also matches, the call will then take that dial-peer as the first is busied out. There is an example of what this looks like in the show commands below. Let’s take a look at the dialog to understand this better. In this scenario we have a CUCM cluster with a SIP trunk to a CUBE router that in turn has a SIP trunk to the ITSP. We have configured the CUBE to send options pings to the ITSP. In this case we have one dial-peer to the CUCM and one dial-peer to the ITSP. Therefore, when it receives no response from the ITSP, it busies out the dial-peer to the ITSP. Subsequently the CUBE receives an Invite from CUCM and it will respond back to CUCM with a 503 Service Unavailable message.
· The CUBE sends the options ping to the ITSP and receives a 200 OK response. The dial-peer remains active.
· A normal call with an Invtie and a 200 ok response
· The CUBE sends the options ping but receives no response or 408 timeout. The dial-peer is placed in busy-out status.
· Now when the invite is sent from CUCM the CUBE sends back a 503 Service Unavailable message.
Configuring SIP Options Ping
Now that we understand the purpose of the options ping in monitoring SIP trunks, we are going to get into how to configure the options ping on SIP dial-peers. There are two ways to configure the options ping. You can configure the options ping directly on the dial-peer or through a sip options-keepalive group profile. Here is a configuration example of the options ping on the dial-peer.
dial-peer voice 100 voip
voice-class sip options-keepalive up-interval 20 down-interval 20 retry 3
The voice-class is one that does not have to be configured beforehand. It is already configured by default. The other options are the timers that can be configured. There are three timers that you can configure.
- Up-interval -- How often in seconds the CUBE will send an options ping
message after receiving a 200 OK
- Down-interval -- How often in seconds the CUBE will send an options ping
message after the dial-peer is busied out
- Retry -- How many times the CUBE will send an options ping message
before setting the dial-peer to busyout
To explain the timers further and using the timers above, the CUBE will send an options ping message every 20 seconds as long as it receives a 200 OK indicating that all is working fine. If it does not receive a response within 5000ms it will sent three more options ping messages. It does not wait 20 seconds to send these, it sends them right after the 5000ms no response time. Once it has send the three retries and it has not received a response the dial-peer is busied out. The cube will then send another options ping every 20 seconds until it receives the 200 OK response.
Now let’s look at the configuration example of a sip-options-keepalive group profile
voice class sip-options-keepalive 1
description UDP Options consolidation
down-interval 49 The timers can be configured in the
up-interval 180 profile
retry 7
transport udp
dial-peer voice 201 voip
destination-pattern 6666
session protocol sipv2
session target ipv4:10.104.45.253
voice-class sip options-keepalive profile 1 The profile can then be
placed on multiple dial-
peers
dial-peer voice 211 voip
destination-pattern 5555
session protocol sipv2
session target ipv4:10.104.45.253
voice-class sip options-keepalive profile 1
The sip-options-keepalive group profile is useful if you want to change the timers associated with the options ping and assigned it to several dial-peers. Otherwise you would have to configure the timers in each dial-peer. It allows you to consolidate the sending of options ping messages to a single dial-peer destination. So, only one options ping message is sent per sip-options-keepalive group.
What happens when a dial-peer goes into busyout?
At this point we are going to look at the show commands to look at what the options ping commands are configured for and some of the debug messages that you will see. Here is a sample show command for the sip options keepalive group profile.
CUBE#sh voice class sip-options-keepalive 1
Voice class sip-options-keepalive: 1 AdminStat: Up
Description: UDP Options consolidation
Transport: udp Sip Profiles: 0
Interval(seconds) Up: 180 Down: 49
Retry: 7
Peer Tag Server Group OOD SessID OOD Stat IfIndex
-------- ------ ----- --- ------ -------- ---------
201 4 Active 9
211 4 Active 10
OOD SessID: 4 OOD Stat: Active
Target: ipv4:10.104.45.253
Transport: udp Sip Profiles: 0
Let’s talk about what this show command is telling us. The Admin state is up which means that it is functioning as it is supposed to. It tells us what the up and down interval timers are configured for as well as the retry timer. It also shows us which dial-peers this profile is configured on.
Here is the show dial-peer voice summary:
CUBE#sh dial-peer voice sum
dial-peer hunt 0
AD PRE PASS OUT
TAG TYPE MIN OPER PREFIX DEST-PATTERN FER THRU SESS-TARGET STAT PORT KEEPALIVE
201 voip up up 00.T 0 syst ipv4:172.25.1.233 busyout
211 voip up up 00.T 0 syst ipv4:172.25.101.233 active
Notice that dial-peer 201 is busied out and dial-peer 211 is active. So now traffic destined for dial-peer 201 will go out dial-peer 211 which has a different destination IP address. Now all SIP calls with destination pattern 0 will go out 211 due to 201 being in busyout.
What does the options ping message look like? Here is an example of the options ping message and the 200 OK message:
OPTIONS sip:10.27.2.30 SIP/2.0 Notice the OPTIONS dialog
Call-ID: eb04af2372bd9ef72e380879acff1d6a@10.27.2.81
CSeq: 0 OPTIONS
From: <sip:CUBE@10.27.2.81>;tag=d06cdba5
To: <sip:10.27.2.30>
Via: SIP/2.0/TCP 10.27.2.81:5060;branch=z9hG4bK-323537-530f7381ae6eb37e51f7c446da7a88b4
Max-Forwards: 70
Contact: <sip:CUBE@10.27.2.81;transport=tcp>
Supported:
Accept: application/sdp
User-Agent:
Content-Length: 0
SIP/2.0 200 OK This is the 200 OK
Via: SIP/2.0/TCP 10.27.2.81:5060;branch=z9hG4bK-323537-530f7381ae6eb37e51f7c446da7a88b4
From: <sip:CUBE@10.27.2.81>;tag=d06cdba5
To: <sip:10.27.2.30>;tag=94118275
Date: Tue, 09 May 2017 18:15:02 GMT
Call-ID: eb04af2372bd9ef72e380879acff1d6a@10.27.2.81
Server: Cisco-CUCM11.5
CSeq: 0 OPTIONS
Allow: INVITE,OPTIONS,INFO,BYE,CANCEL,ACK,PRACK,UPDATE,REFER,SUBSCRIBE,NOTIFY
Content-Length: 0
The options ping keepalive mechanism in CUBE can be very useful and is easy to configure. Please let us know if you have any comments or experiences and problems you have run into. We would love to hear from you. And others would love to see resolutions to issues you may have had.
Please check out my YouTube Channel
Comments
Post a Comment