This article is a brief introduction about RTP call encryption
in relation with Ozeki VoIP SIP SDK. After reading through this page you
will be fully familiar with all the essential terms concerning RTP encryption
and what you will need for creating your own solution using Ozeki VoIP SIP SDK.
The Secure Real-time Transport Protocol (or SRTP) defines a
profile of RTP (Real-time Transport Protocol), intended to
provide encryption, message authentication and integrity, and
replay protection to the RTP data in both unicast and multicast applications.
Figure 1 - VoIP RTP encryption
For encryption and decryption of the data flow (and hence for providing confidentiality
of the data flow), SRTP utilizes AES (Advanced Encryption Standard) as the default cipher.
AES is a symmetric-key algorithm, meaning the same key is used for both encrypting and decrypting the data.
Transport Layer Security (TLS) and its predecessor, Secure Sockets
Layer (SSL), are cryptographic protocols that provide communication
security over the Internet. TLS and SSL encrypt the segments of network
connections above the Transport Layer, using asymmetric cryptography for key
exchange, symmetric encryption for privacy, and message authentication codes for message integrity.
Source code explanation
Ozeki VoIP SIP SDK supports SRTP encryption for the phone line objects. You can set the SRTPMode
property of the phone line like in Code 1. The SRTPMode is an enum defined in
the Ozeki.Network namespace. It defines three SRTP modes: None, Prefer and Force.
The None SRTPMode is the default value for the encryption. If you do not set the
SRTP mode in your program, there will be no RTP encryption for the calls. If you set the SRTP mode to
Prefer, the system will try to encrypt the RTP connection, but there will be no encryption if one of the clients
does not support it. If the SRTP mode is set to Force, the RTP connection will be
encrypted no matter what.
Code 1 - Setting SRTP encryption for the phone line
The RTP encryption can be used in an Ozeki VoIP SIP SDK supported softphone
application only by setting that one property shown in the Code 1 above. You can
easily use this encryption in your solutions if you need secure phone lines.
When using UDP for message transmission, you need to select some of the codecs to disable
as the maximum length of 1500 bytes of the UDP packet will be exceeded if all the codecs are enabled when using SRTP mode.
This article introduced you the basic knowledge about encrypting VoIP calls with RTP encryption and showed how Ozeki VoIP SIP SDK can help you to fulfill your wishes about this topic. If you have read through this page carefully, you already have all the knowledge you need to start on your own solution.
As you are now familiar with all the terms concerning this topic, now it is time to take a step further and explore what other extraordinary solution Ozeki VoIP SIP SDK can provide to you.