[asterisk-users] One leg in a conference and adjusting stream volume of other leg

Matthew Jordan mjordan at digium.com
Mon Aug 27 14:29:51 CDT 2012


----- Original Message -----
> From: "Markus" <universe at truemetal.org>
> To: "Asterisk Users Mailing List - Non-Commercial Discussion" <asterisk-users at lists.digium.com>
> Cc: "Matthew Jordan" <mjordan at digium.com>
> Sent: Monday, August 27, 2012 1:55:08 PM
> Subject: Re: [asterisk-users] One leg in a conference and adjusting stream volume of other leg
> 
> Hi Matthew,
> 
> Am 27.08.2012 20:08, schrieb Matthew Jordan:
> >>> You can use ConfBridge's DTMF menus to allow a participant to
> >>> change
> >>> their listening volume.  This should only affect the audio that
> >>> the
> >>> participant hears, and not the other participants in the
> >>> conference
> >>> -
> >>> regardless of whether or not the audio originates from the same
> >>> source.
> >>
> >> thanks! I wasn't clear enough in my original mail. What I meant
> >> is:
> >> the
> >> volume of the stream that a user is listening to is adjusted, but
> >> the
> >> volume of the conference itself is not changed! That means, a
> >> conference
> >> is going on, and everyone is listening to the same music at the
> >> same
> >> time, but when the music becomes too loud or annoying, a user can
> >> individually adjust the volume of his music, while the volume of
> >> the
> >> speech of each user, basically the conference itself, remains the
> >> same.
> >
> > Yes, I know.  That's what the DTMF menus in ConfBridge let you do.
> 
> thanks again. If I understand correctly, you are saying that there is
> a
> switch that allows a user to adjust the volume of the "background"
> music
> only, but the incoming speech that is coming in to him from other
> users
> will not get adjusted? That's awesome, but I can't find anything like
> that in the docs.

No - what you stated was "the volume of the stream that a user is
listening to is adjusted, but the volume of the conference is not changed!"

I interpreted that as being the volume of the audio sent to the conference
participant.  That can be manipulated directly in ConfBridge.  However,
that affects all audio sent to that participant, which isn't apparently
what you want.

ConfBridge works by mixing the audio for all channels in the conference
and playing the resulting audio to each participant.  You can affect
each participant, but you can't change that all of the audio is mixed
together first.  If you want to play audio separately to each participant,
than you have to do something outside of the actual conference bridge itself.

> Will your example
> 
> [bridge_user_menu]
> *1=increase_listening_volume
> 1=increase_listening_volume
> *2=decrease_listening_volume
> 2=decrease_listening_volume
> 
> not just decrease/increase the audio of *everything* that is coming
> in
> to the user, i.e. both music and speech? At least that it's how it's
> explained in the documentation, isn't it?

Yes.
 
> "Decreases the caller's listening volume. *Everything* they hear will
> sound quieter."
> 
> What I'm looking for is to adjust the incoming music only, not the
> incoming speech. How is ConfBridge able to separate between these two
> if
> they are going on at the same time?

It doesn't; they are mixed together.

> Done that couple of times, but I still don't see that "feature".
> 
> I think there is still some sort of misunderstanding here. Maybe I'm
> not
> explaining it right...

Yup, that was a misunderstanding.

You could probably use ChanSpy to whisper the music to each individual
participant.  Something like this:

[conference]

exten => s,1,NoOp()
same => n,Set(GLOBAL(CONF_CHANNEL_NAME=${CHANNEL}))
same => n,Originate(Local/start_music at conference,exten,conference,moh,1)
same => n,ConfBridge(1)

exten => moh,1,NoOp()
same => n,MusicOnHold()

exten => start_music,1,NoOp()
same => n,Answer()
same => n,ChanSpy(${CONF_CHANNEL_NAME},w)
same => n,Hangup()

You may not want to use something more elegant than a global variable to
cache the name of the channel going into the conference or at least provide
some synchronization around it so that two channels entering the conference
don't step on each other, but this should point you in the correct direction.

As Johan mentioned, the trick to manipulating the volume on the Local channel
streaming the music is best handled externally through AMI.  You can use
the Redirect AMI command to manipulate the channel into other dialplan
extensions that change the volume, then Redirect them back into the moh
extension.  You could trigger that by using dialplan_exec menu actions
from the ConfBridge participant, and raise UserEvents that signal what
action the user wants to take.




--
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



More information about the asterisk-users mailing list