Saturday, December 29, 2018

Using SIP OPTIONS Ping to monitor groups of carrier servers on Cisco CUBE routers

Implementing multiple CUBEs in separate data centers carrying voice traffic to and from the same group of carrier servers.

Ideally, a single dial peer in CUBE 1 points to all the carrier servers, and a single dial peer in CUBE 2 does the same.

Carrier only authenticates traffic by IP so they want to use OPTIONS Ping to monitor the availability of the CUBEs.

I want to monitor the availability of the carrier servers using OPTIONS Ping as well so I can fail between CUBEs and / or other circuits quickly if necessary.  I also don't want to have to create redundant dial-peers to do it.

Step 1:
Add voice class uri defining carrier servers. I'll use this to (at least) define which inbound dial-peer will answer the SIP OPTIONS ping from the carrier. This will let the carrier know which CUBE to send incoming calls to.

voice class uri 2 sip
   host ipv4:10.7.X.X
   host ipv4:10.7.Y.Y

Step 2:
Add a server group defining carrier servers.  This allow me to both route calls to multiple carrier servers as well as monitor them with OPTIONS Ping with a single dial-peer. If OPTIONS Ping fails in defined intervals, the dial-peer is busied out and calls can be routed elsewhere. 

voice class server-group 2
   ipv4 10.7.X.X preference 1
   ipv4 10.7.Y.Y preference 2
   description SIP Carrier Interfaces

Step 3:
Use a voice class to administer down-intervals, up-intervals and retry intervals in one place rather than on a list of different dial-peers.

voice class sip-options-keepalive 2
   description SIP Carrier Interfaces Keepalive
   down-interval 30
   up-interval 60
   retry 5

Step 4:
Create a dial-peer to respond to the carriers OPTIONS Ping using the voice class uri above.

dial-peer voice 2 voip
   description incoming calls from carrier
   session protocol sipv2
   incoming uri via 2
   voice-class codec 1
   voice-class sip bind control source-interface GigabitEthernet0/0/2
   voice-class sip bind media source-interface GigabitEthernet0/0/2
   dtmf-relay sip-kpml rtp-nte
   no vad

Step 5:
Add the server-group session above to a single outgoing dial-peer. With that you can eliminate redundant dial-peers pointing to individual carrier servers.  Add the sip options-keepalive profile above to the same outgoing dial-peer.  You will then send SIP Options ping to the carrier servers to monitor their statuses.  When SIP OPTIONS Ping fails, this dial-peer will be busied out.

dial-peer voice 10 voip
   description Outgoing calls to carrier
   translation-profile outgoing OutboundPSTN
   destination-pattern +T
   session protocol sipv2
   session server-group 2
   voice-class codec 1
   voice-class sip options-keepalive profile 2
   voice-class sip bind control source-interface GigabitEthernet0/0/2
   voice-class sip bind media source-interface GigabitEthernet0/0/2
   dtmf-relay sip-kpml rtp-nte
   no vad

Now you can use show voice class sip-options-keepalive 2 or show dial-peer voice summary to monitor the status of the individual carrier server and general dial peer status.  Below you see neither carrier server is reachable (Busy) via SIP Options ping / voice class sip-options-keepalive 2 and that dial-peer 10 is in a busyout state:


myCUBE1#show voice class sip-options-keepalive 2
Voice class sip-options-keepalive: 2 AdminStat: Up
 Description: Carrier Interfaces Keepalive
 Transport: system Sip Profiles: 0
 Interval(seconds) Up: 60 Down: 30
 Retry: 5

  Peer Tag    Server GroupOOD SessID  OOD Stat    IfIndex   
  --------    ----------------------  --------    -------   
  10          2                       Busy        16         

  Server Group: 2 OOD Stat: Busy
   OOD SessID  OOD Stat   
   ----------  --------   
   5           Busy       
   6           Busy       

 OOD SessID: 5            OOD Stat: Busy
  Target: ipv4:10.7.X.X
  Transport: system       Sip Profiles: 0

 OOD SessID: 6            OOD Stat: Busy
  Target: ipv4:10.7.Y.Y
  Transport: system       Sip Profiles: 0

------------------------------------------------------

csb-dc-s0-vg1#show dial-peer voice summary
dial-peer hunt 0
             AD                                    PRE PASS                OUT
TAG    TYPE  MIN  OPER PREFIX    DEST-PATTERN      FER THRU SESS-TARGET    STAT PORT    KEEPALIVE    VRF
2      voip  up   up                                0  syst                          NA                 
10     voip  up   up             +T            0  syst                               busyout    NA                 


See related official Cisco documentation here:
https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/voice/cube_sip/configuration/15-mt/cube-sip-15-mt-book/oodo-ping-group.pdf



No comments:

Post a Comment