Programmable Voice

  1. Home
  2. Docs
  3. Programmable Voice
  4. HMP Elements
  5. Conferencing Overview

Conferencing Overview

Voice Elements SIP Platform (formerly HMP Elements) empowers businesses with the tools that they need to design high quality conference solutions using .NET and SIP. It is rich with features such as silent coaching, conference monitoring, recording, and more. Conference establishment, and state are easily maintained when using the Voice Elements Platform client interface. This document provides information on the fundamental operation of the conference product, provides information about appropriate network management necessary for proper conference operations, and describes the setting that can be used to control the conference engine.

Conferencing Diagrams

Graphic of Audio Pre-Processing
As shown above, a conference participant’s signal can be enhanced by a programmable front end gain. By default, no gain is applied. However, the application can control the front end gain by increasing or decreasing the gain of the signal on a per participant basis. Typically this would be implemented via a DTMF key stroke on the pad of the participant in question or via a user interface as desired. When you adjust front end gain, it will increase or decrease the volume of a call before any other audio controls are taken into account. This can help in situations where there is a large difference in the volume levels of different participants. The front end gain is manipulated with the following syntax:
ChannelResource.SetConferenceFEGLevel(float gain);

After the Front End Gain is applied, an optional Echo Canceller can be also be applied. This is programmable on a system wide basis, or on an individual channel. It is recommended that the echo canceller only be used on channels that are producing echo. Also, the echo canceller has a maximum tail length of 200ms. This makes it effective for round trip signals that do not exceed at latency of 200ms. Far end echo (AKA network echo) cannot be improved with the echo cancellation at the server. More on this later. The best course of action to determine echo is to ask an individual to temporarily mute their phone. If the echo ceases, then that person is the channel that is causing the echo. It is also possible that more than one participant is causing echo. As each person is identified, the echo cancellation can be turned on for that channel as follows:

Graphic of Mixer

The Mixer

ChannelResource.ConferenceAttributes.EchoCancellation = true;

A noise reducer is built into the echo canceller and is on automatically when using the echo canceller for a particular channel. However, if a channel is not using echo cancellation, noise reduction will be performed if it is turned on in the system configuration. Noise reduction is not handled on a channel by channel basis, rather it is system wide. Refer to the settings section below for more information on Noise Reduction parameters. The last step before mixing is Automatic Gain Control. AGC is important for normalizing the signals of the active talkers before combining them. AGC can be controlled both system wide and on an individual channel basis. System wide settings are explained below. AGC can be turned on or off with the following setting:

ChannelResource.ConferenceAttributes.AutomaticGainControl = true);

When AGC is activated for an individual channel, it uses the system wide settings. However, it can also be controlled programmatically with on individual channels as needed:

ChannelResource.SetConferenceAGCLevels(float target, float clipLevel, float maxGain);

Following the audio pre-processing, the signals are differentiated using voice activity techniques and the active talkers are chosen. As shown in Figure 2, These signals are mixed to provide the mixed conference signal.

Conference Quality

Graphic of Acoustic Echo

Acoustic Echo

HMP Elements is designed to provide an optimal experience while conferencing multiple channels. Every effort is made to ensure quality signal processing within the HMP Elements code. There are however, external factors that can affect the overall quality of an individual conference. Namely, signal strength, and echo.

Signal strength is critical to good performance. Too little signal can make a participant hard to hear by others. Too much signal can saturate the mixer and cause clipping. In addition, a signal that is too strong can cause a far end device to introduce echo into its audio stream. Management of the signal strength is done with either or both of the front end gain, or the AGC components of the system.

Echo cannot be created in a digital network. However, analog networks are an entirely different matter. For starters, echo generally can be created by Acoustic Echo, or Hybrid Echo. For more info refer to:

http://en.wikipedia.org/wiki/Echo_cancellation

Acoustic Echo (See Fig 3) can be mitigated by picking up the handset, or in the case of a SoftPhone or SIP device, ensuring that it’s built in echo canceller is on and working. Other options could include having a caller call in from another device.

More notorious and more difficult to solve is Hybrid echo. See Fig. 4 Hybrid echo is created by a mismatch of the impedance between a two wire device and a four wire network. The impedance mismatch causes part of the incoming signal to be reflected back BEFORE the signal even reaches the end device. The end user hears a quieter signal and may even ask for the conference signal to be turned up, adding to the energy sent, and thus adding to the echo.

Graphic of Hybrid Echo

Two-Wire to Four-Wire Hybrid Echo Due to Impedance Mismatch.

Graphic of Round Trip Echo

Round Trip Echo

For echo cancellation to work properly, it must be supplied with both the original outgoing signal to the talker and the incoming signal (with the echo) coming from the talker. The echo canceller looks for the original outgoing signal embedded within the new incoming signal. How far back the echo canceller looks is called the echo tail and the longer the tail, the more processing power is needed.

For best performance an echo canceller needs to have minimal latency from the source of the echo to the echo canceller. In the case of Acoustic Echo, the best situation is to have a local echo canceller build in the phone or device. This is called a line echo canceller. Hybrid echo would be best handled at the local carrier with a network echo canceller. Unfortunately, not all carriers bother with echo cancelation. When the echo is not handled locally, it is introduced onto the network where signal delays increase significantly. This echo is known by far end echo, round trip echo or end to end echo. See Fig. 5

Due to performance limitations of the CPU, especially on high density systems, the echo tail must remain below 200ms. Preferably, an echo tail of 50ms would be ideal.

If the round trip echo is longer than the echo tail, HMP Elements can provide buffering to compensate for the additional delay in the returned signal. This is done internally by stashing the outgoing signal in temporary buffers and then presenting both the incoming and buffered outgoing signal to the echo canceller at the correct time. To control the length of the buffering, the application can use the command SetConferenceECTailDelay. Setting the delay can be done on a per channel basis.

To get an idea of how short 200ms is, play the following file:

Media:Echo200ms.wav

If in your testing the echo delay is longer than what you hear in the file, you will need to use the SetConferenceECTailDelay to compensate.

Conference Settings

For a detailed discussion on the settings, please see this page: HMP Elements – Conferencing Settings

Conference Strategies

To tune your system, it is recommended that you set the conference participants to the following:

m_ChannelResource.ConferenceAttributes.EchoCancellation = false;
m_ChannelResource.ConferenceAttributes.AutomaticGainControl = false;
 
m_ChannelResource.SetConferenceAGCLevels(-1.0f, -1.0f, -1.0f);
m_ChannelResource.SetConferenceFEGLevel(fegGain);
 
InboundConference.Conference.Add(m_ChannelResource);

 

In this way each participant starts with their own raw signal. The next step is to determine the audio levels of each participant. By using digit events, the participant can raise or lower their front end gain so that they can be heard at a reasonable level by all listening to the conference.

        
public float fegGain = 0.0f;
     
void m_VoiceResource_Digit(object sender, DigitEventArgs e)
{
    Log.WriteWithId(m_VoiceResource.DeviceName, "Digit Received: {0}", e.Digit.ToString());
     
    int locked = Interlocked.CompareExchange(ref handlingDigit, 1, 0);
     
    if (locked == 1)
    {
        Log.WriteWithId(m_VoiceResource.DeviceName, "Digit Ignored.  Already handling digit.");
        return;
    }
     
    m_LastDigit = e.Digit;
     
    switch (e.Digit)
    {
        case '4':
            fegGain = 0.0f;
            m_ChannelResource.SetConferenceFEGLevel(fegGain);
            Interlocked.Exchange(ref handlingDigit, 0);
            return;
        case '5':
            fegGain = fegGain - 2.0f;
            if (fegGain < -30.0f) fegGain = -30.0f; m_ChannelResource.SetConferenceFEGLevel(fegGain); Interlocked.Exchange(ref handlingDigit, 0); return; case '6': fegGain = fegGain + 2.0f; if (fegGain > 30.0f) fegGain = 30.0f;
                m_ChannelResource.SetConferenceFEGLevel(fegGain);
            Interlocked.Exchange(ref handlingDigit, 0);
            return;
    }
     
    m_Digit.Set();
} 

 

Through testing, you may be able to determine some preset values to use for the FEG based on the caller id of who is calling. For example overseas callers may need to start in the conference with a slight boost in the FEG.

After working with the front end gain, you should be able to determine the maximum gain you would ever need to ask of the AGC. For example, if testing the FEG you find a caller who is soft and you realize that you need to increase their volume by 8 dB, then this would be a good starting point for your AGC setting AutomaticGainControlMaxGain.

The AGC can then be enabled on a per channel basis.

Following these tests, you can then work with the echo cancellation. It is recommended to use an echo tail of about 50-100ms in conjunction with the SetConferenceECTailDelay command to add additional delay for long distance and overseas callers that have hybrid echo.

Conference Settings

To read about specific settings, please see this article Conference Settings.

Was this article helpful to you? Yes 13 No

How can we help?