[asterisk-dev] Volume Control

Matthew Jordan mjordan at digium.com
Wed Dec 24 13:30:09 CST 2014

On Wed, Dec 24, 2014 at 1:14 PM, Murthy Gandikota <mgandikota at nts.net>

>  To correct myself, it has nothing to do with hardware. I am using
> ast_openstream acquire the stream object. I then use ast_write to send a
> frame on the stream to all the conference members. Meanwhile  another
> thread is waiting  for events  on the channel (ast_waitfor) and if a spoken
> frame is sensed, then it is being queued for the conference members. Here
> is the catch: if I do ast_write(stream, NULL) and speak up on the phone,
> then I can hear an echo of myself. So it must be possible to do
> ast_write(stream, frame) and hear an echo, if the talk volume is
> sufficiently higher than the listen volume?

I have no idea what App Konference is doing with the media mixing that it
is performing. ast_write and ast_waitfor have nothing to do with the act of
mixing media however - those are merely calls to write media to a channel
and to wait for a file descriptor on a channel to be triggered. That actual
act of mixing the media would have to be provided by something else.

In bridge_softmix - which is a bridging module for the Bridging Framework
that mixes media between n channels - we explicitly remove the source
channel from the media that is mixed for it - so you don't hear yourself.
But that's an implementation detail of that mixer - other mixers could
choose to echo back the audio from the speakers.

Volume, again, is handled by something else completely different from
mixing media. In the case of func_volume, an audiohook is used to
manipulate the media prior to it being written down into the channel
technology. The audiohook itself is invoked via ast_write.

Matthew Jordan
Digium, Inc. | Engineering Manager
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: http://digium.com & http://asterisk.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20141224/d40ec7d9/attachment.html>

More information about the asterisk-dev mailing list