This document describes the basics of Session Initiation Protocol (SIP) Transport Layer Security (TLS) and Secure Real-time Transport Protocol (SRTP) over Cisco Unified Border Element (CUBE) with a configuration example.
Secure voice communication over CUBE can be divided into two parts:
Cisco recommends that you have knowledge of these topics:
The information in this document is based on these software and hardware versions:
In Open Systems Interconnection (OSI) model equivalences, TLS/SSL is initialized at layer 5 (the session layer) and then works at layer 6 (the presentation layer). In both the models, TLS and SSL work on behalf of the underlying transport layer, whose segments carry encrypted data.
In this image, the configuration example for setting up SIP TLS and SRTP between CUCM/IP phone and CUBE is shown. CUBE internetworks between SRTP and Real-time Transport Protocol (RTP). CUBE acts as IOS CA and CUCM would use self-signed certificates.
Synchronize the clocks in the CA server and the client trustpoints (CUBE/OGW/TGW). Otherwise, there are issues with the validity of the certificates issued by the CA server.
Secure-CUBE#clock set <hh:mm:ss> < Day of the month> <MONTH> <Year>
Or
Ntp server <IP Address>
Client trustpoints use HTTP to receive certificate from CA.
Secure-CUBE(config)#ip http server
This step generates Private and Public keys.
In this example, CUBE is just a label. It can be anything.
Secure-CUBE(config)#crypto key generate rsa general-keys label CUBE modulus 1024
The name for the keys will be: CUBE
% The key modulus size is 1024 bits
% Generating 1024 bit RSA keys, keys will be non-exportable...
[OK] (elapsed time was 0 seconds)
Secure-CUBE(config)#
In this example, CA Server is named cube-ca.
crypto pki server cube-ca
database level complete
no database archive
grant auto
lifetime certificate 1800
Secure-CUBE(cs-server)#no shut
%Some server settings cannot be changed after CA certificate generation.
% Please enter a passphrase to protect the private key
% or type Return to exit
Password:
Re-enter password:
% Generating 1024 bit RSA keys, keys will be non-exportable...
[OK] (elapsed time was 0 seconds)
% Certificate Server enabled.
Secure-CUBE(cs-server)#
In this example, trustpoint name for CUBE is CUBE-TLS. IP address used in enrollment url must be local interface on CUBE. Subject name used in this step must match on X.509 Subject Name on CUCM SIP Trunk security profile. The best practice is to use host-name with domain name (if domain name is enabled).
Associate RSA key pair created in Step 2.
crypto pki trustpoint CUBE-TLS
enrollment url http://X.X.X.X:80
serial-number none
fqdn none
ip-address none
subject-name CN=Secure-CUBE
revocation-check none
rsakeypair CUBE
5. Authenticate the trustpoint with CA server and accept certificate of CA.
Secure-CUBE(config)#crypto pki authenticate CUBE-TLS
Certificate has the following attributes:
Fingerprint MD5: BCEBB5A1 1AC882F7 24BE476D 06537711
Fingerprint SHA1: CE2FEEA5 42515B33 3EF6A8F6 7E31D6DF 8E32BEB6
% Do you accept this certificate? [yes/no]: yes
Trustpoint CA certificate accepted.
Secure-CUBE(config)#
In this step the CUBE receives a signed certificate from CA.
Secure-CUBE(config)#crypto pki enroll CUBE-TLS
%
% Start certificate enrollment ..
% Create a challenge password. You will need to verbally provide this
password to the CA Administrator in order to revoke your certificate.
For security reasons your password will not be saved in the configuration.
Please make a note of it.
Password:
Re-enter password:
% The subject name in the certificate will include: CN=Secure-CUBE
% The fully-qualified domain name will not be included in the certificate
Request certificate from CA? [yes/no]: yes
% Certificate request sent to Certificate Authority
% The 'show crypto pki certificate verbose CUBE-TLS' commandwill show the fingerprint.
Secure-CUBE(config)#
If CallManager group has multiple CM servers, then trustpoint needs to be created for all servers, otherwise failover not works.
crypto pki trustpoint cucmpub
enrollment terminal
revocation-check none
crypto pki trustpoint cucmsub
enrollment terminal
revocation-check none
Step 1. Log in to CUCM OS admin.
Step 2. Navigate to Security > Certificate Management > Find.
Step 3. Click the CallManager certificate, then download and save .PEM file as shown in this image.
Step 4. Open the file in the notepad and copy the content from BEGIN CERTIFICATE to END CERTIFICATE.
Step 5. Paste this certificate in CUBE as shown.
Secure-CUBE(config)#crypto pki authenticate cucmpub
Enter the base 64 encoded CA certificate.
End with a blank line or the word "quit" on a line by itself
-----BEGIN CERTIFICATE-----
MIICojCCAgugAwIBAgIQaqCuzslHvcr8xyIxDugyJDANBgkqhkiG9w0BAQUFADBj
MQswCQYDVQQGEwJJTjEOMAwGA1UEChMFY2lzY28xDDAKBgNVBAsTA3RhYzEOMAwG
A1UEAxMFY21wdWIxEjAQBgNVBAgTCWthcm5hdGFrYTESMBAGA1UEBxMJYmFuZ2Fs
b3JlMB4XDTE1MDIwNzE3MDkyMloXDTIwMDIwNjE3MDkyMVowYzELMAkGA1UEBhMC
SU4xDjAMBgNVBAoTBWNpc2NvMQwwCgYDVQQLEwN0YWMxDjAMBgNVBAMTBWNtcHVi
MRIwEAYDVQQIEwlrYXJuYXRha2ExEjAQBgNVBAcTCWJhbmdhbG9yZTCBnzANBgkq
hkiG9w0BAQEFAAOBjQAwgYkCgYEA0hkaJtUpBK4Uw7brGidgfVyk2FJRA32xkUHn
aQbSz89dyjCX//Vpt8GblwXediTKRBYX1J4I7iGl1cuPNYOh9giSeLlxgzthMt1M
d+XoGGby9DhrwWJSZY5b8MN8uETfilOn3ANN/yJf5xJ7D7qIq5ZhfQHDAm8QTuoS
SSqFciUCAwEAAaNXMFUwCwYDVR0PBAQDAgK8MCcGA1UdJQQgMB4GCCsGAQUFBwMB
BggrBgEFBQcDAgYIKwYBBQUHAwUwHQYDVR0OBBYEFDGq0WCT/OnqwePSnhaknzR0
BconMA0GCSqGSIb3DQEBBQUAA4GBACb9gC0u/piCQrv7BeLk2/qFmZl/zVuXPDOn
wqz4yBMsa7Nk6QmpP5zXKJJfXb3iKJPsMRWuUNEe+Df+sx0rUit3oGcF4ce/1ZfV
RKvt461TvA5r9HGXO+KaI8v7BaWeeROBfTboRpkvqRjFt6eIHEtn7+uUIcumDASp
SkXO8/Ar
-----END CERTIFICATE-----
Certificate has the following attributes:
Fingerprint MD5: 92DA2B5B A888784D C53B6C29 2E2B6A3C
Fingerprint SHA1: 5D31BEF0 DF2DCA7E 64D40246 89E564DD 9A7F8A01
% Do you accept this certificate? [yes/no]: yes
Trustpoint CA certificate accepted.
% Certificate successfully imported
Secure-CUBE(config)#
Step 6. Follow same procedure for the other CUCM servers.
This can be done either at a global or at a dial-peer level.
voice service voip
sip
session transport tcp tls
sip-ua
crypto signaling remote-addr <cucm pub ip address> 255.255.255.255 trustpoint CUBE-TLS
crypto signaling remote-addr <cucm sub ip address> 255.255.255.255 trustpoint CUBE-TLS
or default trustpoint can be configured for all SIP signaling from CUBE.
sip-ua
crypto signaling default trustpoint CUBE-TLS
Voice service voip
srtp fallback
If IOS version is 15.2.2T (CUBE 9.0) or later then, LTI transcoder can be configure to minimize the configuration.
LTI transcoder doesn't need PKI trustpoint configuration for SRTP-RTP calls
dspfarm profile 1 transcode universal security
codec g711ulaw
codec g711alaw
codec g729ar8
codec g729abr8
maximum sessions 10
associate application CUBE
If IOS is below 15.2.2T, then configure sccp transcoder.
Skinny Call Control Protocol (SCCP) transcoder would need trustpoint for signaling however if same router is used to host the transcoder then same trustpoint(CUBE-TLS) can be used for CUBE as well as transcoder.
sccp local GigabitEthernet0/0
sccp ccm 10.106.95.155 identifier 1 priority 1 version 7.0
sccp
!
sccp ccm group 1
bind interface GigabitEthernet0/0
associate ccm 1 priority 1
associate profile 2 register secxcode
!
dspfarm profile 2 transcode universal security
trustpoint CUBE-TLS
codec g711ulaw
codec g711alaw
codec g729ar8
codec g729abr8
maximum sessions 10
associate application SCCP
!
telephony-service
secure-signaling trustpoint CUBE-TLS
sdspfarm units 1
sdspfarm transcode sessions 10
sdspfarm tag 1 secxcode
max-ephones 1
max-dn 1
ip source-address 10.106.95.155 port 2000
max-conferences 8 gain -6
transfer-system full-consult
Step 1. Export IOS certificate. Copy self-signed CA certificate and save as .PEM file for example, Secure-CUBE.pem
Secure-CUBE(config)#crypto pki export CUBE-TLS pem terminal
% CA certificate:
-----BEGIN CERTIFICATE-----
MIIB/TCCAWagAwIBAgIBATANBgkqhkiG9w0BAQQFADASMRAwDgYDVQQDEwdjdWJl
LWNhMB4XDTE1MDIxMTEyNTYyMVoXDTE4MDIxMDEyNTYyMVowEjEQMA4GA1UEAxMH
Y3ViZS1jYTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAtN3gRiUQ409jECyo
xVZzrpBRqj/HOqkVu3iRYp2C2PGRr0lvbZvb6IZIh+m4K0Du7gBASUFDAOe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i2a
vrr2qwQYqRAh68BwTjWzR3mFAGbDZZwiywv1jJ92ra3EMAUc0sJZSLzGY0+BjO/E
dEW6JUIOx3NxP2SBN1NMAQ0=
-----END CERTIFICATE-----
Secure-CUBE(config)#
Step 2. Upload IOS CA certificate on CUCM as CallManager-trust.
Step 3. Navigate to CM OS Administration > Security > Certificate Management > Upload Certificate/Certificate Chain
Step 4. Upload .PEM file as shown in this image.
Step 1. On CM Administration navigate to System > Security > SIP Trunk Security Profiles > File.
Step 2. Copy the existing Non Secure SIP Trunk Profile in order to create new secure profile as shown in this image.
Step 1. Enable SRTP on SIP trunk as shown in this image.
Step 2. Configure Destination Port 5061 (TLS) and apply New Secure SIP trunk Security profile on the SIP trunk as shown in this image.
Secure-CUBE#show sip-ua connections tcp tls detail
Total active connections : 2
No. of send failures : 0
No. of remote closures : 13
No. of conn. failures : 0
No. of inactive conn. ageouts : 0
TLS client handshake failures : 0
TLS server handshake failures : 0
---------Printing Detailed Connection Report---------
Note:
** Tuples with no matching socket entry
- Do 'clear sip <tcp[tls]/udp> conn t ipv4:<addr>:<port>'
to overcome this error condition
++ Tuples with mismatched address/port entry
- Do 'clear sip <tcp[tls]/udp> conn t ipv4:<addr>:<port> id <connid>'
to overcome this error condition
Remote-Agent:10.106.95.151, Connections-Count:2
Remote-Port Conn-Id Conn-State WriteQ-Size Local-Address
=========== ======= =========== =========== ===========
5061 16 Established 0 10.106.95.155
57396 17 Established 0 10.106.95.155
-------------- SIP Transport Layer Listen Sockets ---------------
Conn-Id Local-Address
=========== =============================
2 [10.106.95.155]:5061
Output of show call active voice brief is captured when LTI transcoder is used.
Secure-CUBE#show call active voice brief
Telephony call-legs: 0
SIP call-legs: 2
H323 call-legs: 0
Call agent controlled call-legs: 0
SCCP call-legs: 0
Multicast call-legs: 0
Total call-legs: 2
1283 : 33 357052840ms.1 (23:57:23.929 IST Sun Feb 15 2015) +2270 pid:3 Answer 3001 active
dur 00:00:08 tx:383/61280 rx:371/59360 dscp:0 media:0 audio tos:0xB8 video tos:0x0
IP 10.106.95.132:17172 SRTP: off rtt:0ms pl:0/0ms lost:0/0/0 delay:0/0/0ms g711ulaw TextRelay: off Transcoded: Yes
media inactive detected:n media contrl rcvd:n/a timestamp:n/a
long duration call detected:n long duration call duration:n/a timestamp:n/a
LostPacketRate:0.00 OutOfOrderRate:0.00
1283 : 34 357052840ms.2 (23:57:23.929 IST Sun Feb 15 2015) +2270 pid:1 Originate 2001 active
dur 00:00:08 tx:371/60844 rx:383/62812 dscp:0 media:0 audio tos:0xB8 video tos:0x0
IP 10.65.58.24:24584 SRTP: on rtt:0ms pl:0/0ms lost:0/0/0 delay:0/0/0ms g711ulaw TextRelay: off Transcoded: Yes
media inactive detected:n media contrl rcvd:n/a timestamp:n/a
long duration call detected:n long duration call duration:n/a timestamp:n/a
LostPacketRate:0.00 OutOfOrderRate:0.00
Also when an SRTP encrypted call is made between Cisco IP phone and CUBE or Gateway, a lock icon is displayed on the IP phone.
These debugs are helpful for troubleshooting PKI/TLS/SIP/SRTP issues.
debug crypto pki{ API | callbacks | messages | scep | server | transactions | validation }
debug ssl openssl { errors | ext | msg | states }
debug srtp {api | events }
debug ccsip {messages | error | events | states | all }
debug voip ccapi inout