Sistema de paging de bajo costo con Anti-Feedback

Surely, many Elastix users have thought about enabling a paging system, but they don’t want to invest in those expensive IP-based systems that can cost hundreds or thousands of dollars. What some people may not know is that they can use server soundcard for this purpose.

When I first tested it with my simple system, I noticed that there was a problem: a quite annoying acoustic feedback appeared when using a phone close to the paging speakers. This occurs because the audio coming out of the speakers is reintroduced in the phone’s microphone and this triggers the existence of feedback. Later, I will let you know the trick I came out with for solving this problem.

In this experiment, I will plug the output of the soundcard to a tiny audio amplifier of approximately 35 Watts RMS that I got for a really convenient price. To the amplifier’s output I will plug a pair of speakers, which are commonly used for outdoor ambience. All these components are available for little more than $100USD. The first thing to do is enabling the chan_oss module that comes with Elastix, but appears to be disabled by default. Enabling it is very simple, we open the file /etc/Asterisk/modules.conf and comment the line that inhibits loading the chan_oss.so module. Then, a fragment of the file with the commented line.

[code language=”text”]
; Load either OSS or ALSA, not both
; By default, load no console driver
;
noload => chan_alsa.so
;noload => chan_oss.so
[/code]

Chan_oss is a channel that connects to the soundcard. Being a channel, we can make a bridge between a call and the soundcard.

The following will be to edit the configuration file /etc/asterisk/oss.conf and leave it as follows.

[code language=”text”]
[general]
autoanswer=yes
context=from-internal
overridecontext=yes
extension=s
language=en
playbackonly=yes
[/code]

It is important to leave the parameter autoanswer=yes so the soundcard automatically replies when we call. The rest of parameters are well commented in the file oss.conf that comes by default in Elastix.

Finally, we add a new context to our dial plan for calling a paging extension. This context was added in the file /etc/asterisk/extensions_custom.conf

[code language=”text”]
[voceo-neomano]
exten => *2011,1,Dial(console/dsp,20,A(beep))
exten => *2011,n,Hangup()
[/code]

In this way, we can call the extension *2011 and anything we say from the phone, will come out of the soundcard.

Well, thus far is the usual stuff. Now, I’ll let you know the trick I promised 🙂 The idea I came out with for removing the feedback was moving a little the audio frequency that’s coming out of the speaker. In such way, every time the audio is having feedback on the phone it will have a slightly higher frequency, avoiding the same frequency prevailing through the system. Until quite recently this was very difficult, but since Asterisk 1.8 we have a very interesting feature that allows us to make a shift in frequency or “pitch.” To achieve this, I have modified a bit the previous dial plan.

[code language=”text”]
[voceo-neomano]
exten => *2011,1,Set(PITCH_SHIFT(both)=.95)
exten => *2011,n,Dial(console/dsp,20,A(beep))
exten => *2011,n,Hangup()
[/code]

As you can see, we’ve set up a very small frequency offset, using the PITCH_SHIFT function. Ideally, it will be hardly noticeable. However, it should be enough to eliminate the annoying feedback.

I have chosen a value lesser than one, which means that the voice will sound slightly deeper. Well, that’s all; I hope this may come in handy.

Article taken from:
http://www.neomano.com/2011/09/sistema-de-voceo-anti-feedback-de-bajo-costo-para-elastix/