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.
Don’t have Voice Elements yet and want to go for a test drive? Check out our Demos.
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.
“RFC2833StartBitRequired” Config Setting
Start with inspecting the RFC2833StartBitRequired setting. It must be set to False:
<setting name="RFC2833StartBitRequired" serializeAs="String"> <value>False</value> </setting>
“WebRtcSockets” Config 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="WebRtcSockets" serializeAs="Xml"> <value> <WebRtcSockets> <WebRtcSocket> <Id>Unsecure</Id> <SocketIp>172.18.13.145</SocketIp> <SocketPort>1337</SocketPort> <CertificateFile></CertificateFile> <Password></Password> <Encrypted>0</Encrypted> <MaxConnections>100</MaxConnections> </WebRtcSocket> </WebRtcSockets> </value> </setting>
Secure WebSockets
If you prefer a secure web socket, please refer to this article: WebRTC – Setting up Secure WebSockets
Self-Signed Certificate
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, please refer to this article: WebRTC – Creating a Self Signed Certificate
DTLSCertificate Config Setting
Here is an example of what is needed for the DTLSCertificate setting:
<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>
In the above example, CACertificates tag points to 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.
Next in the DTLSCertificate Settings example, 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 support@voiceelements.com and we can give you a link. If you decide to encrypt the password, you must set the Encrypted flag to 1 (one).
Troubleshooting
If you have difficulty starting HMP Elements 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.