[asterisk-biz] Is anyone available to create a dialplan for me?

Markus universe at truemetal.org
Wed Aug 29 10:08:02 CDT 2012


Hi all!

I've already posted my requirement on asterisk-users, titled "One leg in 
a conference and adjusting stream volume of other leg".

My budget is 200 EUR and it would be great to get it done within 2-3 
days. I know, close to no money, but thats how it is unfortunately :( I 
have Asterisk 10.

Description:

- Conference

- Each participant can speak and hear any other participant (there's 
only one single conference going on)

- However, each participant will listen to an INDIVIDUAL mp3 stream at 
the same time they're able to speak to the people in the conference. 
Which stream that is depends on which extension they dial.

- That means they will hear music and the speech of other users 
simultaneously. They will also be able to speak simultaneously.

- Tricky part: each participant can adjust the volume of their (and only 
their) mp3 stream!

That means, if you dial extension 111, you will hear music. And you can 
adjust the volume of that music via DTMF. But, at the same time, you can 
also speak and will also hear all people in a conference. If you dial 
extension 222, you will hear another music, and so on.  But you are 
always in the same single conference with the other participants.

Each user only hears their mp3 stream and can only adjust the volume of 
their individual mp3 stream.

Bonus: if it would be also possible for each user to individually adjust 
the volume of the speech in the conference as well, that would be even 
better, like:

DTMF
Press 1: increase volume of my music (mp3 stream)
Press 2: decrease volume of my music (mp3 stream)
Press 3: increase volume of other users speech
Press 4: decrease volume of other users speech

Here are some keywords and suggestions from the asterisk-users list:

a)

---

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.

---

b)

1. Use Meetme or Confbridge and use functionality to jump out of the 
conference if DTMF is pressed (X-flag in meetme, I expect similar exists 
in confbridge).

2. Call AGI, Log to DB, etc - whatever - and return to the conference.

3. Have a external program that manipulates the channel playing the 
music. For example this could be done by ChannelRedirect AMI to special 
dialplan extensions that lower and raises the volum. You can use 
System()-app in asterisk, or AGI for example. Then use AMI in the script.

The music on hold could be implemented as a Local channel.

a. Look at Originate-app, or Originate AMI command. One side of the call 
are connected to a context/extension/priority (for example: Meetme 
here). And the other end you dial Local/extension at context (for example: 
Here you play music).

b. Prepare some extensions that lower/raises volume (look at func_volume)

---

c)

Your requirements are such that the only solution is to mix the audio
for each participant individually. This is a rather expensive operation
and not supported in either of the Asterisk conference applications,
AFAIK.

I can only think of one way of doing that: give each member their own
conference and bridge one leg of that conference into the main
conference. How to accomplish that is a bit beyond me though, but
perhaps others can help.

All the mixing is likely to cause a strain on your hardware, and the
sound quality could suffer.

---


Thank you!
Markus



More information about the asterisk-biz mailing list