Montag, 20. April 2009

Use of Diva and CHAN_CAPI for deployment of high quality PBX

Use of Diva and CHAN_CAPI for deployment of high quality PBX

The modern PBX is not only a tool to switch between call parties and to forward the calls. And this is not only the PBX which is enriched by voice mail system. The requirement to modern PBX design are originated by the requirement to improve the user experience in the environments where telephony is used as major tool (support centers, sales, call centers, ...).

Following features are proven to improve the user experience:

  • Echo cancellation with 256 mSec tail length
  • Suppression of in band DTMF tones
  • Voice signal limiter (FCC Part 68)
  • Automatic gain control combined with digital gain control
  • Control of playback and recording speed (pitch control)
  • Suppression of ambient noises
  • Conferencing AGC (Automatic Gain Control)
  • Interactive media control, VC command
  • Use of IP resources for E.1/T.1/S0/PSTN and IP connections
  • Connections between E.1/T.1/S0/PSTN and IP

This document provides the in depth description of the features and the scenarios where (and how) the features can be used while the detailed description of commends can be found in README.media.

Echo cancellation with 256 mSec tail length

The vast majority of the public telephone system local loop wiring is done using two-wire connections whereby the same pair of wires carries voice signals in both directions. In the telephone company's central office or in an office PBX, a two-to-four wire conversion is done using a hybrid circuit. Hybrid circuits do not perform perfect impedance matches. The imperfection results in echo. The echo canceller's goal is to detect and remove echo as quickly and effectively, thereby minimizing any loss in voice quality due to the echo. The echo canceller must perform this function under all conditions including double-talk (when both parties are speaking at the same time) and in the presence of background noise. Furthermore, the echo canceller must not cause detriment to signaling tones (DTMF etc.) or fax and modem transmissions.

Diva supports echo cancellation (in accordance to G.168 with NLP) with tail length up to 256 mSec.

256 mSec tail length is required to ensure the operation in the environments where the signal is carried over the packet network. This is not always the case at customer site and can be done by transit network which does not provides own echo cancellation capabilities.

You can activate (deactivate) echo cancellation per call using “echocancel” command or generally using “echocancel” configuration parameter in capi.conf. “echocancelnlp” configuration parameter (capi.conf) is used to activate (deactivate) NLP (Non Linear Processor which removes the residual echo at the output of the echo cancellation unit). You can use Diva chan_capi configuration to change this capi.conf configuration parameter.

Upon detection of fax or modem transmission Diva echo cancellation is automatically deactivated. Diva echo cancellation is not activated for digital (voice, data, ...) calls.

Suppression of in band DTMF tones

DTMF (dual-tone multi-frequency, http://en.wikipedia.org/wiki/DTMF) tones are used for transmission of dialed digits. In PBX environment DTMF is often used to control the PBX functionality (connect to voice mailbox, redirect calls, initiate and control conference, ...) after the connection was established. Passing DTMF tones can be desirable in certain scenarios (for example pass tones through primary PBX to secondary PBX where users can access certain services).

But passing the DTMF trough can be unpleasant for users or introduce security leaks in PBX environment in other scenarios. For example if one of the conference members will by occasion pressed the key on his phone then the DTMF signal is sent to all other members. DTMF signals are loud (user experience compared to human voice) and will disturb other members. Given one large conference with high amount of members pressing of keys by users can change from occasional to regular event and conference will receive unuseable for members. The same is true for the call agent in the support or in the call center. While receiving the calls over long period of time the person should be protected from loud and unexpected signals, in this case from sent by occasional pressing of the phone keys by users.

The security is affected if the DTMF sequences are passed to location where it should not arrive. For example passing of DTMF through PBX connection gives the user the potential ability to control the equipment behind of PBX. Members of conference can record the DTMF sequences and receive passwords to control the conference, recorded on the voice mail message DTMF tones can be used to trigger certain events in PBX at time message is played back. The list is endless, but in the most of cases the users who are not allowed to access certain services (calls, mailboxes, ...) will receive access to appropriate services.

Diva provides the possibility to suppress the DTMF tones. This feature is available on per call basis and can be activated (deactivated) using “clamping” command. To activate this feature globally please use “Extended Voice Processing/DTMF Clamping” Diva configuration option. Diva will automatically deactivate clamping for digital (data, video, ...) commections.

The feature is always activated for Rx direction only. To activate this feature for both (all in case of conference) directions this is necessary to send this command to both (to every) peer.

The implemented by Diva DTMF suppression (clamping) does not affects the quality of the voice signal and it is even possible to receive overlapped by DTMF tones voice sequence.

Voice signal limiter

Voice signal limiter (FCC Part 68 Limiter, http://www.fcc.gov/wcb/iatd/part_68.html) is used to limit the signal power and to protect the listening on the phone equipment people from unexpected and too loud signals.

You can activate this feature for PBX interconnections and for conferencing. Part 68 limiter is automatically activated by Diva in countries where required by approvals. You can activate it by “Extended Voice Processing/Part 68 Voice Signal Limiter“ Diva configuration option. Diva will automatically deactivate Part 68 limiter for digital (data, video, ...) connections.

Automatic gain control combined with digital gain control

In case of conferences or if dealing with huge amount of callers in support or call center it is beter to equalize the loudness of the speakers. Rx AGC can be used for this purpose. If active it will preserve the level of the received signal at -14 dB. You can adjust the level to the personally best one using the digital gain control commands.

Other use of this feature is to ensure all voice mail messages are recorded with same signal level. This simplify the processing of huge amount of voice messages.

In addition AGC and digital gain control can be activated in transmit direction too. This feature can be used to play back voice messages which are recorded using different levels and to control the level of the signal in case this feature is not supported by peer.

You can control the levels of the Rx and Tx path independent one from the other. Following commands allow to activate (deactivate) AGC and digital gain control on call basis: “rxagc”, “txagc”, “rxdgain”, “txdgain”, “incrxdgain”, “inctxdgain”.

The AGC can be used if signal source is not normalized. Digital gain can be used to change the level of the signal. Both features are independent one from the other but in multiple scenarios used together.

Control of playback and recording speed (pitch control)

Some time user needs to play same voice mail message multiple time. It is often the case if phone numbers or other information of interest is contained in the call. In this case it is desirable to play the voice message slower.

In other case user needs to jump over the part of the long message to the information of interest. In this case it is better to play message faster.

Provided by Diva pitch control feature can be used to provide this functionality. The pitch control is accessed using “pitchcontrol” and “incpitchcontrol” commands. Using pitch control is possible to change the sampling rate of signal and as result play messages faster or slower.

This feature can be used only for playing back and for recording of voice messages. This feature is not available for connections between two or more parties.

Suppression of ambient noises

In the time of phone call or of one conference multiple ambient noises can lead to decrease of the level of understanding. It can be the noises from computer fans, projector fans, air cooling system, ventilation system, street noises trough open window, car noises, ...

Diva provides the possibility to suppress the ambient noises. The suppression of ambient noises can be activated using “noisesuppressor” command on per call basis or generally by “Extended Voice Processing/Noise suppression“ Diva configuration parameter.

Conferencing AGC

Several problems occurs if multiple parties are joined to conference.

First one is the summation (and as result increase of level) of noises if nobody in the conference is speaking. The noise signal will be added even if the phone is muted. In this case this is the own phone and line noise.

The other problem occurs if multiple people are are speaking at same time. In this case it is necessary to identify the real active talkers and protect they signal from received from listeners occasional signals. If not done then occasional signals from multiple conference members will affect the signal from active talkers. As result the listeners will stop to understand the talkers. This problem still can be resolved by deactivation of voice patch from listeners. But it results in need for one conference manager and conference management tools. And in this case listeners are not able to issue question and notes spontaneously. They need to receive the permission from conference manager first.

To resolve all mentioned above problems Diva provides conferencing AGC. Conferencing AGC receives automatically active as soon as more then two members have joined the conference.

Interactive media control, VC command

Multiple media control commands (volume control, playback speed control, ...) are usable only if media change can be applied to media directly without delay and without changes in the position of the media. Unfortunately currently available in Dial Plan set of commands does not provides necessary features.

To overcome this problem “vc” command is add to chan_capi. You can use this command to attach any provided by chan_capi command to sequence of DTMF (MF/Pulse, detection of tones, ...) digits. If active chan_capi will process received events and perform required action upon detection of event of interest. In this way events are processed without entering the Dial Plan. As result required action is processed without affecting the position of the media stream.

With other words “vc” command allows to create menu which binds certain events to certain chan_capi commands and to process this menu in front of Dial Plan while media is active.

The suggestion is to create small menus which do not involve more then one DTMF digit. Most of media commands require very short response time which can not be provided if user need to press multiple keys. The use of preprogrammed keys (single key sending multiple DTMF digits) still can use multiple digit, but the duration of single DTMF digit ~ 100 mSec plus inter digit pause. This again enforces the same limits. The big menus are not used by users too.

Good choices for conferences and for regular calls are: Increase and decrease level of signal, mute/un-mute tx direction, activate/deactivate suppression of ambient noises:

exten => s,n,capicommand(vc|incrxdgain|1|2.5) ; 1 – increase Rx gain
exten => s,n,capicommand(vc|incrxdgain|2|-2.5) ; 2 – decrease Rx gain
exten => s,n,capicommand(vc|txdgain|3|-128) ; 3 – mute Tx
exten=> s,n,capicommand(vc|txdgain|4|0) ; 4 – unmute Tx
exten => s,n,capicommand(vc|noisesuppressor|5|yes) ; 5 – turn suppression of ambient noises on
exten => s,n,capicommand(vc|noisesuppressor|7|yes) ; 7 – turn suppression of ambient noises off

Useful set of commands if processing voice mailbox can be:

exten => s,n,capicommand(vc|incrxdgain|1|2.5) ; 1 – increase Rx gain
exten => s,n,capicommand(vc|incrxdgain|2|-2.5) ; 2 – decrease Rx gain
exten => s,n,capicommand(vc|noisesuppressor|5|yes) ; 5 – turn suppression of ambient noises on
exten => s,n,capicommand(vc|noisesuppressor|7|yes) ; 7 – turn suppression of ambient noises off
exten => s,n,capicommand(vc|incpitchcontrol|8|100) ; 8 – Play faster
exten => s,n,capicommand(vc|incpitchcontrol|9|-100) ; 9 – Play slower

You can see used in previous menu keys “3” and “4” are left empty. The new functionality is assigned to still unused keys “8” and “9”. This is done to prevent the user confusion if switching between different menus.

In one conference can be useful to send one tone to track the attention of the conference members to certain event. This can be done using “sendtone” command:

exten => s,n,capicommand(vc|sendtone|*|0x8b) ; * – send comfort tone
exten => s,n,capicommand(vc|stoptone|0) ; 0 – stop sending tone

Keine Kommentare:

Kommentar veröffentlichen