Cisco IOS contains a configurable object called SIP User Agent (sip-ua) where several different SIP settings may be altered from their default behavior. The focus here are the settings for SIP Retry Invite and SIP Timers and why it makes sense to change the default settings on the router if calls should reroute over another path if the SIP Trunk is unavailable. We are looking at this scenario from the perspective of the router running CME and the CME users dialing the CUCM site 1XXX. Through the use of dial-peers calls will first be routed over the data network to reach the SIP Trunk configured on CUCM. In the event the SIP Trunk in unavailable the call should automatically reroute over the secondary dial peer which in this case is a PRI, but may also be another SIP Trunk or H323 Gateway or Gatekeeper.
The issue with SIP dial peers is the sip-ua has a default SIP Invite Retry value of 6. If the first Invite does not receive a response then the counter in between each newly generated Invite increases thus causing an even longer delay between each new Invite. This will cause unacceptable post dial delay and more than likely users will abandon the call before it is rerouted over the PRI. The following are the appropriate dial peers to support SIP as the primary call path using 4 digit dialing. If the SIP Trunk is in an outage state the router will use the PRI and automatically prefix the full string of dialed digits required by the Telco that owns the PRI circuit.
dial-peer voice 1000 voip
session protocol sipv2
session target sip-server
voice-class codec 1
dial-peer voice 1001 pots
destination-pattern 1…$ < 1 is explicitly matched in this pattern so 1 must be added again in the prefix
retry invite 2
timers trying 150
The first thing to note is the SIP Trying timer, which is reflective of SIP 100 Trying (try debug ccsip messages to see this) has been reduced to 150 milliseconds. This is a more than adequate time frame for CUCM to reply to a SIP Invite. The next item that has been changed is the number of retry invites. Under this configuration there will be a total of three SIP Invites generated by CME. The intial Invite plus two retries if the first invite does not receive a response within 150 ms. Given this set of values – if CUCM is either unreachable or the CUCM SIP Trunk is down – the CME router will route the call over the PRI in less than one second from the time the first Invite was sent and users should not experience post dial delay. This is a significant improvement over the default behavior where the default SIP Timer value is 1500 ms (1.5 seconds) and six Invite retries.