![]() |
SIP Configuration Guide, Cisco IOS Release 12.4T
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Configuring SIP Support for SRTP
![]() |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Contents
Configuring SIP Support for SRTPLast Updated: September 28, 2012
This module contains information about configuring Session Initiation Protocol (SIP) support for the Secure Real-time Transport Protocol (SRTP). SRTP is an extension of the Real-time Transport Protocol (RTP) Audio/Video Profile (AVP) and ensures the integrity of RTP and Real-Time Control Protocol (RTCP) packets that provide authentication, encryption, and the integrity of media packets between SIP endpoints. SIP support for SRTP was introduced in Cisco IOS Release 12.4(15)T. In this and later releases, you can configure the handling of secure RTP calls on both a global level and on an individual dial peer basis on Cisco IOS voice gateways. You can also configure the gateway (or dial peer) either to fall back to (nonsecure) RTP or to reject (fail) the call for cases where an endpoint does not support SRTP. The option to allow negotiation between SRTP and RTP endpoints was added for Cisco IOS Release 12.4(20)T and later releases, as was interoperability of SIP support for SRTP on Cisco IOS voice gateways with Cisco Unified Communications Manager. In Cisco IOS Release 12.4(22)T and later releases, you can configure SIP support for SRTP on Cisco Unified Border Elements (Cisco UBEs), as well.
Finding Feature InformationYour software release may not support all the features documented in this module. For the latest caveats and feature information, see Bug Search Tool and the release notes for your platform and software release. To find information about the features documented in this module, and to see a list of the releases in which each feature is supported, see the feature information table at the end of this module. Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required. Prerequisites for Configuring SIP Support for SRTP
Information About Configuring SIP Support for SRTPThe SIP Support for SRTP features use encryption to secure the media flow between two SIP endpoints. Cisco IOS voice gateways and Cisco Unified Border Elements use the Digest method for user authentication and, typically, they use Transport Layer Security (TLS) for signaling authentication and encryption. When TLS is used, the cryptographic parameters required to successfully negotiate SRTP rely on the cryptographic attribute in the Session Description Protocol (SDP). To ensure the integrity of cryptographic parameters across a network, SRTP uses the SIPS schema (sips:example .com). If the Cisco IOS voice gateway or Cisco Unified Border Element is configured to use TLS encryption and sends an invite to an endpoint that cannot provide TLS support, that endpoint rejects the INVITE message. For cases like these, you can configure the gateway or Cisco UBE either to fall back to an RTP-only call or to reject the call. The SIP support for SRTP features provide the following security benefits:
The table below describes the security level of SIP INVITE messages according to which of the four possible combinations of TLS and SRTP is configured.
Cryptographic ParametersRFC 3711 defines the SRTP cryptographic parameters, including valid syntax and values for attribute a=crypto (see the table below). Some of these parameters are declarative and apply only to the send direction of the declarer, while others are negotiable and apply to both send and receive directions. The following shows the cryptographic attribute syntax: a=crypto:<tag> <crypto-suite> <key-params> [<session-params>] The table below summarizes the syntax for the cryptographic attribute.
SDP NegotiationTo allow calls to succeed between endpoints that do not support SRTP, you can enable SIP support for SRTP by configuring the srtp command but you can also enable fall back to the RTP mechanism in cases where SRTP is not supported by one or both endpoints. To configure a Cisco IOS voice gateway or Cisco Unified Border Element to fall back to RTP when SRTP is not supported, configure the srtp fallback command either globally or for an individual dial peer. When the srtp command is enabled, the offer SDP in the INVITE message has only one m line for the RTP/SAVP (RTP/Secure AVP) transport type. If a called endpoint does not support SRTP, the call fails with a 4xx error. However, if you configure the srtp fallback command, the gateway generates another INVITE message with an RTP-only offer instead of simply allowing the call to fail.
When the gateway or Cisco Unified Border Element is the called endpoint, it will accept an offer with an m line value of SRTP-only, RTP-only, or both SRTP and RTP. For calls with two m lines (SRTP and RTP), the negotiation depends on the configuration of the inbound dial peer or global configuration. Only one m line negotiates--the port number in the other m line is set to 0. The table below summarizes the behavior of the gateway during negotiation.
The following example shows an offer SDP with two m lines that use the cryptographic attribute for the RTP/SAVP media transport type: v=0 o=CiscoSystemsSIP-GW-UserAgent 7826 3751 IN IP4 172.18.193.98 s=SIP Call c=IN IP4 172.18.193.98 t=0 0 m=audio 1789 RTP/AVP 0 a=rtpmap:0 PCMU/8000 m=audio 51372 RTP/SAVP 0 a=rtpmap:0 PCMU/8000 a=crypto:1 AES_CM_128_HMAC_SHA1_32 inline:d0RmdmcmVCspeEc3QGZiNWpVLFJhQX1cfHAwJSoj|2^20|1:32 The following example shows the corresponding answer SDP with SRTP supported: v=0 o=CiscoSystemsSIP-GW-UserAgent 7826 3751 IN IP4 172.18.193.98 s=SIP Call c=IN IP4 172.18.193.98 t=0 0 m=audio 0 RTP/AVP 0 a=rtpmap:0 PCMU/8000 m=audio 49170 RTP/SAVP 0 a=crypto:1 AES_CM_128_HMAC_SHA1_32 inline:NzB4d1BINUAvLEw6UzF3WSJ+PSdFcGdUJShpX1Zj|2^20|1:32 Call Control and SignalingSIP uses the SRTP library to receive cryptographic keys. If you configure SRTP for the call and cryptographic context is supported, SDP offers the cryptographic parameters. If the cryptographic parameters are negotiated successfully, the parameters are downloaded to the DSP, which encrypts and decrypts the packets. The sender encrypts the payload by using the AES algorithm and builds an authentication tag, which is encapsulated to the RTP packet. The receiver verifies the authentication tag and then decrypts the payload.
Default and Recommended SRTP SettingsThe table below lists the default and recommended SRTP settings.
Before an SRTP session can be established on a Cisco IOS voice gateway or Cisco UBE, the following cryptographic information must be exchanged in SDP between the two endpoints: Generating Master KeysThe SRTP library provides an application program interface (API), srtp_generate_master_key, to generate a random master key. For encryption and authentication purposes, the key length is 128 bits (master key and session keys). Additionally, RFC 3711 introduces "salting keys"--master salts and sessions salts--and strongly recommends the use of a master salt in the key derivation of session keys. The salting keys (salts) are used to fight against pre-computation and time-memory tradeoff attacks. The master salt (also known as the n-bit SRTP key) prevents off-line key-collision attacks on the key derivation and, when used, must be random (but can be public). The master salt is derived from the master key and is used in the key derivation of session keys. Session salts, in turn, are used in encryption to counter various attacks against additive stream ciphers. All salting keys (master salt and session salts) are 112 bits. SRTP Offer and Answer ExchangeIf you configure the gateway for SRTP (globally or on an individual dial peer) and end-to-end TLS, an outgoing INVITE message has cryptographic parameters in the SDP. If you use the srtp fallback command and the called endpoint does not support SRTP (offer is rejected with a 4xx class error response), the gateway or Cisco Unified Border Element sends an RTP offer SDP in a new INVITE request. If you do not configure the srtp fallback command, the call fails.
When a gateway or Cisco Unified Border Element receives an SRTP offer, negotiation is based on the inbound dial peer if specified and, if not, the global configuration. If multiple cryptographic attributes are offered, the gateway selects an SRTP offer it supports (AES_CM_128_HMAC_SHA1_32). The cryptographic attribute will include the following:
If this cryptographic suite is not in the list of offered attributes, or if none of the attributes are valid, the SRTP negotiation fails. If the INVITE message contains an alternative RTP offer, the gateway (or Cisco UBE) negotiates and the call falls back to (nonsecure) RTP mode. If there is no alternative offer and the SRTP negotiation fails, the INVITE message is rejected with a 488 error (Not Acceptable Media). Rekeying RulesThere is no rekeying on an SRTP stream. A REINVITE/UPDATE message is used in an established SIP call to update media-related information (codec, destination address, and port number) or other features, such as call-hold. A new key need only be generated if the offer SDP has a new connection address or port. Because the source connection address and port do not change, the gateway or Cisco UBE will not generate a new master key after a key has been established for an SRTP session. Call-Feature InteractionsThis section describes call-feature interactions when SIP Support for SRTP features are configured. Call HoldIf a gateway receives a call hold REINVITE message after an initial call setup is secured, the gateway places the existing SRTP stream on hold, and its answer in the 200 OK message depends on the offer SDP. If there is a cryptographic attribute in the offer, the gateway responds with a cryptographic attribute in its answer. Signaling ForkingA proxy can fork an INVITE message that contains an SRTP offer, which can result in multiple SRTP streams until a 200 OK message is received. Because the gateway always honors the last answer, the gateway deletes previous SRTP streams and creates a new stream to the latest endpoint. Other endpoints might also stream to the gateway, but because the DSP knows only the last streams's cryptographic suite and key, authentication on these packets fails, and the packets are dropped. Call RedirectionA gateway redirects a call when an INVITE message, sent to a proxy or redirect server, results in a 3xx response with a list of redirected contact addresses. The gateway handles a 3xx response based on the schema in the contact of a 3xx message. If the message is SIP, and you configure the call for SRTP with fallback, the gateway offers an SRTP-only redirected INVITE message. If you configure for SRTP only, the offer is SRTP only. If the schema is SIP, and you use the srtp fallback command to configure the call for RTP with fallback, the INVITE message has an RTP offer. If you do not configure the srtp fallback command, the call fails.
Call TransferThe SIP Support for SRTP feature interaction with call transfer depends on your outbound dial peer or global configuration. During a call transfer, the gateway sends an INVITE message to establish the connection to the transfer target. The gateway includes an SRTP offer in the INVITE message if the outbound dial peer or global configuration includes the SRTP offer. How to Configure SIP Support for SRTPBefore configuring SIP support for SRTP on a gateway or Cisco Unified Border Element, it is strongly recommended you first configure SIPS either globally or on an individual dial peer basis. The configuration on a dial peer overrides the global configuration.
Configuring SIPS GloballyTo configure secure SIP (SIPS) globally on a Cisco IOS voice gateway or Cisco Unified Border Element, perform the following steps. DETAILED STEPS
Configuring SIPS on a Dial Peer
SUMMARY STEPS
DETAILED STEPS
Configuring SRTP and SRTP Fallback GloballyTo configure SRTP and SRTP fallback behavior globally on a Cisco IOS voice gateway or Cisco Unified Border Element, perform the following steps. DETAILED STEPS
Configuring SRTP and SRTP Fallback on a Dial PeerTo configure SRTP and SRTP fallback behavior on an individual dial peer that overrides the global SRTP configuration, perform the following steps. DETAILED STEPS
Configuration Examples for Configuring SIP Support for SRTPThe following example shows how to configure SIPS globally on a Cisco IOS voice gateway or Cisco Unified Border Element: Router> enable Router# configure terminal Enter configuration commands, one per line. End with CNTL/Z. Router(config)# voice service voip Router(conf-voi-serv)# sip Router(conf-serv-sip)# url sips Router(conf-serv-sip)# exit The following example shows how to configure SIPS on dial peer 111: Router> enable Router# configure terminal Enter configuration commands, one per line. End with CNTL/Z. Router(config)# dial-peer voice 111 voip Router(config-dial-peer)# voice-class sip url sips Router(config-dial-peer)# exit The following example shows how to configure for SRTP with fallback to RTP globally on a Cisco IOS voice gateway or Cisco Unified Border Element: Router> enable Router# configure terminal Enter configuration commands, one per line. End with CNTL/Z. Router(config)# voice service voip Router(conf-voi-serv)# srtp Router(conf-voi-serv)# srtp fallback Router(conf-voi-serv)# exit The following example shows how to configure for SRTP with fallback to RTP on dial peer 111: Router> enable Router# configure terminal Enter configuration commands, one per line. End with CNTL/Z. Router(config)# dial-peer voice 111 voip Router(config-dial-peer)# srtp Router(config-dial-peer)# srtp fallback Router(config-dial-peer)# exit Additional ReferencesRelated Documents
RFCs
MIBsTechnical Assistance
Feature Information for Configuring SIP Support for SRTPThe following table provides release information about the feature or features described in this module. This table lists only the software release that introduced support for a given feature in a given software release train. Unless noted otherwise, subsequent releases of that software release train also support that feature. Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required.
GlossaryAVP --Audio/Video Profile. CAC --Call Admission Control. CME --Communications Manager Express. CVP --Customer Voice Portal. GW --gateway. ISDN --Integrated Services Digital Network. MIME --Multipurpose Internet Mail Extensions. m line --The media-level section of an SDP session begins and ends with an "m" line that confines the information about the media stream. MOH --music on hold. OGW --originating gateway (ingress gateway). PBX --Private Branch Exchange. PINX --private integrated services network exchange. PISN --private integrated services network. QoS --quality of service. QSIG --Q Signaling protocol. RSVP --Resource Reservation Protocol. RTP --Real-time Transport Protocol. SDP --Session Description Protocol. SIP --Session Initiation Protocol. SRTP --Secure Real-time Transport Protocol. TDM --time-division multiplexing. TGW --terminating gateway (egress gateway). UA --user agent. UDP --User Datagram Protocol. URI --uniform resource identifier. Cisco and the Cisco logo are trademarks or registered trademarks of Cisco and/or its affiliates in the U.S. and other countries. To view a list of Cisco trademarks, go to this URL: www.cisco.com/go/trademarks. Third-party trademarks mentioned are the property of their respective owners. The use of the word partner does not imply a partnership relationship between Cisco and any other company. (1110R) Any Internet Protocol (IP) addresses and phone numbers used in this document are not intended to be actual addresses and phone numbers. Any examples, command display output, network topology diagrams, and other figures included in the document are shown for illustrative purposes only. Any use of actual IP addresses or phone numbers in illustrative content is unintentional and coincidental. © 2012 Cisco Systems, Inc. All rights reserved.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|