SRTP Context Retention
You can optionally configure the SBC to retain SRTP contexts for the outgoing SRTP encryption leg by setting the retain-srtp-roc option to egress on the media-sec-policy configuration object.
- Rollover counter (ROC)
- SSRC
- SRTCP SSRC and index
- An independent snapshot of the SRTP key parameters and cipher suite
Retaining this context is useful for calls that frequently switch between remote media peers, such as when a Cisco Unified Communications Manager (CUCM) platform switches the call between a music-on-hold (MOH) server and a phone. By default, when the phone switches to the MOH server and back, the SBC resets its ROC to 0. However, if the phone is still using the previously-established ROC, SRTP authentication or decryption may fail, resulting in one-way audio.
When you configure the SBC to retain the established ROC, the SBC caches a peer's non-zero ROC before changing to a different peer, which is processed with its own context. When the first peer returns with the established media stream and SSRC, the SBC caches the current peer's ROC, restores the first peer's cached ROC, and resumes media processing. The SBC caches and restores the relevant ROCs across repeated switches between peers.
Because the SBC caches separate contexts for each remote media IP address and port and for each call, an uncached peer cannot inherit another peer's context. The SBC releases contexts when the call ends.
Note:
Calls with ROC 0 retain their existing behavior, regardless of retention configurations. ROC increments when the RTP sequence number wraps from 65535 to 0; hold or re-INVITE signaling does not increment it.By default, ROC restoration requires matching SRTP key parameters and cipher suite, although a change in the crypto tag alone does not prevent restoration. To bypass the crypto identity comparison, you can optionally add the preserve-srtp-roc option at the realm level. When you include this option, the SBC can restore a returning peer's cached ROC using a newly-negotiated key and cipher suite rather than requiring a match with the cached crypto data.
SRTP context retention is supported when the remote media endpoint is not behind NAT.