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.

The retained context includes:
  • 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.

Configure SRTP Context Retention

You can enable SRTP context retention for the outgoing SRTP encryption leg.

  1. Access media-sec-policy configuration element:
    
                ORACLE# configure terminal
                ORACLE(configure)# security
                ORACLE(security)# media-security
                ORACLE(media-security)# media-sec-policy
                ORACLE(media-sec-policy)#
  2. Set the retain-srtp-roc option to egress to enable retention for the outgoing SRTP encryption leg.
    Use the following option value.
    • egress: Outgoing SRTP encryption leg only
    For example:
    
                  ORACLE(media-sec-policy)# options +retain-srtp-roc=egress

    Note:

    If you type the option without the plus sign, you will overwrite any previously configured options. In order to append the new option to this configuration’s options list, you must prepend the new option with a plus sign as shown in the previous example.
  3. Use the done and exit commands to save and activate your configuration.

Configure SRTP Crypto Check Bypass

You can optionally configure the SBC to bypass the check for matching crypto identity when restoring cached ROC for outgoing SRTP encryption by setting the preserve-srtp-roc option at the realm level.

  1. Access the realm-config configuration element.
    ORACLE# configure terminal
    ORACLE(configure)# media-manager
    ORACLE(media-manager)# realm-config
    ORACLE(realm-config)# 
  2. Select the realm-config object to edit.
    ORACLE(realm-config)# select
    identifier:
    1: realm01 left-left:0 0.0.0.0
    
    selection: 1
    ORACLE(realm-config)#
  3. Add the preserve-srtp-roc option:
    
                ORACLE(realm-config)# options +preserve-srtp-roc

    Note:

    If you type the option without the plus sign, you will overwrite any previously configured options. In order to append the new option to this configuration’s options list, you must prepend the new option with a plus sign as shown in the previous example.
  4. Use the done and exit commands to save and activate your configuration.