WebRTC configuration is relatively straight forward. Read and follow the sections below.
Install the Voice Elements Platform
Start by installing the WebRTC modules on your system. This can be done using the master installer, or by overlaying modules from a cumulative release. Contact support if you are unsure if the installer/modules that you currently have support WebRTC.
Install WebRTC Licenses
Contact support if you don’t have licenses for WebRTC. Installing licenses for WebRTC are the same as for the Voice Elements Platform. For more information see this page: Licensing Questions
Update Your Configuration Files
The configuration to modify file is HmpElementsServer.exe.config and it can be found in the HMPElements folder.
Start with inspecting the RFC2833StartBitRequired setting. It must be set to False:
<setting name="RFC2833StartBitRequired" serializeAs="String"> <value>False</value> </setting>
The next item is the WebRtcSockets setting. The system uses WebSockets to allow the browser to communicate with the server. This setting tells HmpElements which IPs and ports to listen on for new WebRTC connections. Here is an example:
<setting name="DtlsCertificates" serializeAs="Xml"> <value> <DtlsCertificates> <DtlsCertificate> <Id>Default</Id> <CACertificates>C:\Program Files\Inventive Labs\Voice Elements Platform\HMP Elements Server\cacert.crt</CACertificates> <CertificateFile>C:\Program Files\Inventive Labs\Voice Elements Platform\HMP Elements Server\client.pem</CertificateFile> <Password>inventiveDTLS</Password> <Encrypted>0</Encrypted> </DtlsCertificate> </DtlsCertificates> </value> </setting>
If you prefer a secure web socket, please check out this link: WebRTC – Setting up Secure WebSockets
WebRTC uses DTLS to secure the RTP traffic between the browser and the server. DTLS requires that you use a certificate. This can be a certificate from a Certificate Authority, or it can be a self-signed certificate. For information on creating a self-signed certificate see this link: WebRTC – Creating a Self Signed Certificate
Here is an example what is needed for the DTLSCertificate setting:
The CACertificates tag is a file full of certificates supplied from your Certificate Authority. Multiple certificates are allowed. The format is as follows:
-----BEGIN CERTIFICATE----- ... (CA certificate in base64 encoding) ... -----END CERTIFICATE-----
Repeated as necessary.
The CertificateFile tag is a file that contains your server’s certificate and your private key. The format is as follows:
-----BEGIN CERTIFICATE----- ... (CA certificate in base64 encoding) ... -----END CERTIFICATE----- -----BEGIN ENCRYPTED PRIVATE KEY----- ... (CA certificate in base64 encoding) ... -----END ENCRYPTED PRIVATE KEY-----
Note: Be sure that you use a 2048 bit certificate.
The Password is the password that will decrypt the private key of the certificate. If you don’t wish this to be seen in plain text you can use the Password Encryptor. Send a note to email@example.com and we can give you a link. If you decide to encrypt the password, you must set the Encrypted flag to 1 (one).
If you have difficulty starting HMPElements after you have made the appropriate changes to the configuration, check for these items in the start-up sequence in the HMPServer.log file:
Licensed For 50 WebRTC ports.
DTLS using Id: Default DTLS using CACertificates File: C:\Program Files\Inventive Labs\Voice Elements Platform\HMP Elements Server\cacert.crt DTLS using Certificate File: C:\Program Files\Inventive Labs\Voice Elements Platform\HMP Elements Server\client.pem DTLS configuration complete...
WebRtcSocket using Id: Unsecure WebRtcSocket using SocketIp: 172.18.13.145 WebRtcSocket using SocketPort: 1337 WebRtcSocket using MaxConnections: 100 Starting IPAddress: 172.18.13.145 Port: 1337 WebRtcSocket started...
If there is anything out of the ordinary, please contact support.