Re: [asterisk-users] One leg in a conference and adjusting stream volume of other leg
); fputs($socket, UserName: $amiusername\r\n); fputs($socket, Events: off\r\n); fputs($socket, Secret: $amisecret\r\n\r\n); //Action: DBGet fputs($socket, Action: DBGet\r\n); fputs($socket, Family: moh_$sipexten\r\n); fputs($socket, Key: channel\r\n\r\n); fputs($socket, Action: Logoff\r\n\r\n); while (!feof($socket)) { $wrets .= fread($socket,8192 ); } fclose($socket); $channelVal = strpos($wrets,Val: ); if ($channelVal){ $Localplaybackchannel=trim(substr($wrets,$channelVal+5,strpos($wrets,Event: DBGetComplete) - $channelVal-5)); //Channel found. Play DTMF $wrets = ; // Send dtmf key $socket = fsockopen(127.0.0.1,5038, $errno, $errstr, 0); $wrets = fread($socket,30); //LOGIN fputs($socket, Action: Login\r\n); fputs($socket, UserName: $amiusername\r\n); fputs($socket, Events: off\r\n); fputs($socket, Secret: $amisecret\r\n\r\n); //Action: PlayDTMF fputs($socket, Action: PlayDTMF\r\n); fputs($socket, Channel: $Localplaybackchannel\r\n); fputs($socket, Digit: $dtmftone\r\n\r\n); //LOGOFF fputs($socket, Action: Logoff\r\n\r\n); while (!feof($socket)) { $wrets .= fread($socket,8192 ); } fclose($socket); } ? /var/lib/asterisk/mohstream-chatfire-1.sh: #!/bin/bash /usr/bin/mpg123 -q -r 8000 -b 0 --mono -s http://s10.pop-stream.de:10380 /var/lib/asterisk/mohstream-chatfire-2.sh: #!/bin/bash /usr/bin/mpg123 -q -r 8000 -b 0 --mono -s http://stream.laut.fm/chat-fire That's it :) Regards Markus Am 27.08.2012 21:29, schrieb Matthew Jordan: - Original Message - From: Markus unive...@truemetal.org To: Asterisk Users Mailing List - Non-Commercial Discussion asterisk-users@lists.digium.com Cc: Matthew Jordan mjor...@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
Re: [asterisk-users] One leg in a conference and adjusting stream volume of other leg
Markus unive...@truemetal.org writes: 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. 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. /Benny -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] One leg in a conference and adjusting stream volume of other leg
- Original Message - From: Markus unive...@truemetal.org To: Asterisk Users Mailing List - Non-Commercial Discussion asterisk-users@lists.digium.com Sent: Sunday, August 26, 2012 6:43:31 PM Subject: [asterisk-users] One leg in a conference and adjusting stream volume of other leg Hi all, snip A SIP caller dials into to my Asterisk 10. He will automatically listen to a specific MP3 stream. As you're using Asterisk 10, I'm going to assume you're using ConfBridge. snip When they adjust the volume of the stream, if effects only their stream, and not the volume of the stream of the other callers. In short: All callers at all times are *always* in the same conference, but each caller is able to increase or decrease the volume of their MP3 stream individually. 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. [bridge_user_menu] *1=increase_listening_volume 1=increase_listening_volume *2=decrease_listening_volume 2=decrease_listening_volume For more information on setting up DTMF menus and associating them with bridge users, see the ConfBridge article on the Asterisk wiki: https://wiki.asterisk.org/wiki/display/AST/ConfBridge+10 If I'm right the MP3 stream cannot come from inside conference (MeetMe or ConfBridge with MOH) because there is no functionality to control the volume individually. snip No, that's fine. ConfBridge allows you to control the listening/speaking volume of each participant. See above. snip I don't know where to start. Queue? Local channel? ... If you wanted to stream your sound from a source other than MOH, using a Local channel may be appropriate. I'm not sure how a Queue would help here. -- 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 -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] One leg in a conference and adjusting stream volume of other leg
Hi Matthew, Am 27.08.2012 15:41, schrieb Matthew Jordan: When they adjust the volume of the stream, if effects only their stream, and not the volume of the stream of the other callers. In short: All callers at all times are *always* in the same conference, but each caller is able to increase or decrease the volume of their MP3 stream individually. 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. I think what I'm looking for is to inject the MP3 stream into only the listening direction of each user, and allow its volume to get adjusted via DTMF. And at the same time, each user is in the same conference. Even more: I would like to be able to feed each user a *different* volume-adjustable MP3 stream, but all of the users are still in the same conference (not hearing each others MP3 stream, only their voice!). I've researched high and low and came up with the following pointers: - Dial with the G flag - ChanSpy, whispering - VOLUME() - MOH connected to a local channel - Queue that loops indefinitely But I don't know yet how to put it all together. I found some hints in the right direction here: Playing audio to one channel only: http://www.mail-archive.com/asterisk-users@lists.digium.com/msg245811.html Meetme with background music (last post) http://fonality.com/trixbox/forums/trixbox-forums/help/meetme-background-music Background music during a call http://www.mail-archive.com/asterisk-users@lists.digium.com/msg254252.html Does anyone have the right solution and is available to create a dialplan for me for cash? Please get in touch! Thank you! Markus -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] One leg in a conference and adjusting stream volume of other leg
- Original Message - From: Markus unive...@truemetal.org To: Asterisk Users Mailing List - Non-Commercial Discussion asterisk-users@lists.digium.com Cc: Matthew Jordan mjor...@digium.com Sent: Monday, August 27, 2012 12:48:53 PM Subject: Re: [asterisk-users] One leg in a conference and adjusting stream volume of other leg 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. I think what I'm looking for is to inject the MP3 stream into only the listening direction of each user, and allow its volume to get adjusted via DTMF. And at the same time, each user is in the same conference. Again, that is what the menus in ConfBridge do. Please read the ConfBridge documentation on the Asterisk wiki. https://wiki.asterisk.org/wiki/display/AST/ConfBridge+10 Even more: I would like to be able to feed each user a *different* volume-adjustable MP3 stream, but all of the users are still in the same conference (not hearing each others MP3 stream, only their voice!). Feeding different MP3 streams from outside sources to different participants is not possible in ConfBridge, as the bridging layer mixes the audio from the various channels and sends it to all participants. Manipulating the volume for each participant is possible. While feeding different MP3 streams to different users is not feasible, you can stream different MOH classes to different users by setting the music_on_hold_class user profile option for different ConfBridge users. You can also stream audio to a single channel using the playback menu option, but that's for relatively short messages, and not for MOH type situations. I've researched high and low and came up with the following pointers: - Dial with the G flag I'm not sure why transferring to a particular dialplan context would be needed here. If you wanted to bounce out to the dialplan while in a ConfBridge, that's possible using the dialplan_exec menu option. - ChanSpy, whispering You could always bounce out to the dialplan and execute a ChanSpy on the channel in the bridge, but that feels overly complex for what you're attempting to do. - VOLUME() This does the same thing under the hood that the ConfBridge listening/talking volume menu options do. - MOH connected to a local channel This would stream some music into the Bridge to all participants. You may want this to stream some MP3 file into the conference; on the other hand, it doesn't allow for the same granularity that the music_on_hold_class bridge profile option provides. - Queue that loops indefinitely This just scares me. But I don't know yet how to put it all together. I found some hints in the right direction here: Playing audio to one channel only: http://www.mail-archive.com/asterisk-users@lists.digium.com/msg245811.html Meetme with background music (last post) http://fonality.com/trixbox/forums/trixbox-forums/help/meetme-background-music Background music during a call http://www.mail-archive.com/asterisk-users@lists.digium.com/msg254252.html Those are all MeetMe specific. You can certainly use MeetMe in Asterisk 10 and put together a solution using what those forum/e-mails suggest; or you can use the tools provided in ConfBridge. Does anyone have the right solution and is available to create a dialplan for me for cash? Please get in touch! If you don't want to do the work yourself, contact the asterisk-biz list. -- 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 -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] One leg in a conference and adjusting stream volume of other leg
2012-08-27 19:48, Markus skrev: Hi Matthew, Am 27.08.2012 15:41, schrieb Matthew Jordan: When they adjust the volume of the stream, if effects only their stream, and not the volume of the stream of the other callers. In short: All callers at all times are *always* in the same conference, but each caller is able to increase or decrease the volume of their MP3 stream individually. 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. I think what I'm looking for is to inject the MP3 stream into only the listening direction of each user, and allow its volume to get adjusted via DTMF. And at the same time, each user is in the same conference. Even more: I would like to be able to feed each user a *different* volume-adjustable MP3 stream, but all of the users are still in the same conference (not hearing each others MP3 stream, only their voice!). I've researched high and low and came up with the following pointers: - Dial with the G flag - ChanSpy, whispering - VOLUME() - MOH connected to a local channel - Queue that loops indefinitely But I don't know yet how to put it all together. I found some hints in the right direction here: Playing audio to one channel only: http://www.mail-archive.com/asterisk-users@lists.digium.com/msg245811.html Meetme with background music (last post) http://fonality.com/trixbox/forums/trixbox-forums/help/meetme-background-music Background music during a call http://www.mail-archive.com/asterisk-users@lists.digium.com/msg254252.html Does anyone have the right solution and is available to create a dialplan for me for cash? Please get in touch! I would do it like this: 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@context (for example: Here you play music). b. Prepare some extensions that lower/raises volume (look at func_volume) Good luck! /Johan -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
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. 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? 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? Again, that is what the menus in ConfBridge do. Please read the ConfBridge documentation on the Asterisk wiki. https://wiki.asterisk.org/wiki/display/AST/ConfBridge+10 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... Thanks! Markus -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] One leg in a conference and adjusting stream volume of other leg
- Original Message - From: Markus unive...@truemetal.org To: Asterisk Users Mailing List - Non-Commercial Discussion asterisk-users@lists.digium.com Cc: Matthew Jordan mjor...@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@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 -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
[asterisk-users] One leg in a conference and adjusting stream volume of other leg
Hi all, I'm looking for some serious help. :) I couldn't find a better description for my problem... I think it is quite complex! Here's what I would like to achieve: A SIP caller dials into to my Asterisk 10. He will automatically listen to a specific MP3 stream. Other SIP callers dial also into my Asterisk. They all will automatically listen to the same MP3 stream. All callers automatically are joined into the same conference and are able to speak/hear each other at the same time they're listening to the stream. The tricky part: A caller may now press some digits on their their keypad, like 1, or 2, and this will have the effect that the volume of the stream is increasing or decreasing. BUT: When they adjust the volume of the stream, if effects only their stream, and not the volume of the stream of the other callers. In short: All callers at all times are *always* in the same conference, but each caller is able to increase or decrease the volume of their MP3 stream individually. If I'm right the MP3 stream cannot come from inside conference (MeetMe or ConfBridge with MOH) because there is no functionality to control the volume individually. So, I guess the basic foundation is a plain conference room without MOH, and then somehow the MP3 stream is joined to each caller individually, without bridging the audio into the whole conference ... I don't know where to start. Queue? Local channel? ... Thank you so much for any advise! I'm puzzled. :) Regards Markus -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users