[asterisk-commits] dvossel: branch dvossel/hd_confbridge r309852 - in /team/dvossel/hd_confbridg...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Mar 7 11:21:03 CST 2011
Author: dvossel
Date: Mon Mar 7 11:20:58 2011
New Revision: 309852
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=309852
Log:
Introduction of the ConfBridge menu volume options
Modified:
team/dvossel/hd_confbridge/apps/app_confbridge.c
team/dvossel/hd_confbridge/apps/confbridge/conf_config_parser.c
team/dvossel/hd_confbridge/apps/confbridge/include/confbridge.h
team/dvossel/hd_confbridge/configs/confbridge.conf.sample
Modified: team/dvossel/hd_confbridge/apps/app_confbridge.c
URL: http://svnview.digium.com/svn/asterisk/team/dvossel/hd_confbridge/apps/app_confbridge.c?view=diff&rev=309852&r1=309851&r2=309852
==============================================================================
--- team/dvossel/hd_confbridge/apps/app_confbridge.c (original)
+++ team/dvossel/hd_confbridge/apps/app_confbridge.c Mon Mar 7 11:20:58 2011
@@ -758,6 +758,22 @@
case MENU_ACTION_PLAYBACK:
res |= action_playback(bridge_channel, menu_action->data.playback_file);
break;
+ case MENU_ACTION_INCREASE_LISTENING:
+ ast_audiohook_volume_adjust(conference_bridge_user->chan,
+ AST_AUDIOHOOK_DIRECTION_WRITE, 1);
+ break;
+ case MENU_ACTION_DECREASE_LISTENING:
+ ast_audiohook_volume_adjust(conference_bridge_user->chan,
+ AST_AUDIOHOOK_DIRECTION_WRITE, -1);
+ break;
+ case MENU_ACTION_INCREASE_TALKING:
+ ast_audiohook_volume_adjust(conference_bridge_user->chan,
+ AST_AUDIOHOOK_DIRECTION_READ, 1);
+ break;
+ case MENU_ACTION_DECREASE_TALKING:
+ ast_audiohook_volume_adjust(conference_bridge_user->chan,
+ AST_AUDIOHOOK_DIRECTION_READ, -1);
+ break;
case MENU_ACTION_PLAYBACK_AND_CONTINUE:
res |= action_playback_and_continue(conference_bridge,
conference_bridge_user,
Modified: team/dvossel/hd_confbridge/apps/confbridge/conf_config_parser.c
URL: http://svnview.digium.com/svn/asterisk/team/dvossel/hd_confbridge/apps/confbridge/conf_config_parser.c?view=diff&rev=309852&r1=309851&r2=309852
==============================================================================
--- team/dvossel/hd_confbridge/apps/confbridge/conf_config_parser.c (original)
+++ team/dvossel/hd_confbridge/apps/confbridge/conf_config_parser.c Mon Mar 7 11:20:58 2011
@@ -241,6 +241,10 @@
switch (id) {
case MENU_ACTION_TOGGLE_MUTE:
+ case MENU_ACTION_INCREASE_LISTENING:
+ case MENU_ACTION_DECREASE_LISTENING:
+ case MENU_ACTION_INCREASE_TALKING:
+ case MENU_ACTION_DECREASE_TALKING:
break;
case MENU_ACTION_PLAYBACK:
case MENU_ACTION_PLAYBACK_AND_CONTINUE:
@@ -272,6 +276,14 @@
ast_copy_string(menu_entry->dtmf, dtmf, sizeof(menu_entry->dtmf));
if (!strcasecmp(action, "toggle_mute")) {
res |= add_action_to_menu_entry(menu_entry, MENU_ACTION_TOGGLE_MUTE, NULL);
+ } else if (!strcasecmp(action, "increase_listening_volume")) {
+ res |= add_action_to_menu_entry(menu_entry, MENU_ACTION_INCREASE_LISTENING, NULL);
+ } else if (!strcasecmp(action, "decrease_listening_volume")) {
+ res |= add_action_to_menu_entry(menu_entry, MENU_ACTION_DECREASE_LISTENING, NULL);
+ } else if (!strcasecmp(action, "increase_talking_volume")) {
+ res |= add_action_to_menu_entry(menu_entry, MENU_ACTION_INCREASE_TALKING, NULL);
+ } else if (!strcasecmp(action, "decrease_talking_volume")) {
+ res |= add_action_to_menu_entry(menu_entry, MENU_ACTION_DECREASE_TALKING, NULL);
} else if (action_len >= 21 && !strncasecmp(action, "playback_and_continue", 21)) {
filename = ast_strdupa(action);
if ((filename = strchr(action, '(')) && (tmp = strrchr(filename, ')'))) {
@@ -537,6 +549,18 @@
case MENU_ACTION_TOGGLE_MUTE:
ast_cli(a->fd, "toggle_mute");
break;
+ case MENU_ACTION_INCREASE_LISTENING:
+ ast_cli(a->fd, "increase_listening_volume");
+ break;
+ case MENU_ACTION_DECREASE_LISTENING:
+ ast_cli(a->fd, "decrease_listening_volume");
+ break;
+ case MENU_ACTION_INCREASE_TALKING:
+ ast_cli(a->fd, "increase_talking_volume");
+ break;
+ case MENU_ACTION_DECREASE_TALKING:
+ ast_cli(a->fd, "decrease_talking_volume");
+ break;
case MENU_ACTION_PLAYBACK:
ast_cli(a->fd, "playback(%s)", menu_action->data.playback_file);
break;
Modified: team/dvossel/hd_confbridge/apps/confbridge/include/confbridge.h
URL: http://svnview.digium.com/svn/asterisk/team/dvossel/hd_confbridge/apps/confbridge/include/confbridge.h?view=diff&rev=309852&r1=309851&r2=309852
==============================================================================
--- team/dvossel/hd_confbridge/apps/confbridge/include/confbridge.h (original)
+++ team/dvossel/hd_confbridge/apps/confbridge/include/confbridge.h Mon Mar 7 11:20:58 2011
@@ -44,6 +44,10 @@
MENU_ACTION_TOGGLE_MUTE = 1,
MENU_ACTION_PLAYBACK,
MENU_ACTION_PLAYBACK_AND_CONTINUE,
+ MENU_ACTION_INCREASE_LISTENING,
+ MENU_ACTION_DECREASE_LISTENING,
+ MENU_ACTION_INCREASE_TALKING,
+ MENU_ACTION_DECREASE_TALKING,
};
/*! The conference menu action contains both
Modified: team/dvossel/hd_confbridge/configs/confbridge.conf.sample
URL: http://svnview.digium.com/svn/asterisk/team/dvossel/hd_confbridge/configs/confbridge.conf.sample?view=diff&rev=309852&r1=309851&r2=309852
==============================================================================
--- team/dvossel/hd_confbridge/configs/confbridge.conf.sample (original)
+++ team/dvossel/hd_confbridge/configs/confbridge.conf.sample Mon Mar 7 11:20:58 2011
@@ -3,6 +3,8 @@
; is not currently used, but reserved
; for future use.
+
+; --- ConfBridge User and Bride Profiles ---
; The default_user, default_bridge sections are applied
; automatically to all ConfBridge instances invoked without
; a user, bridge, or menu argument.
@@ -31,12 +33,38 @@
; closest sample rate Asterisk does support to the one requested
; will be used.
-;[sample_menu]
-;type=menu
-;*=playback_and_continue(conf-usermenu) ; playback_and_continue will play back a prompt
- ; while continuing to collect the dtmf sequence
-;*1=toggle_mute ; Toggle turning on and off mute. Mute will make the user silent
- ; to everyone else, but the user will still be able to listen in.
-;*2=playback(tt-weasels) ; playback will play a prompt back to the user but will not
- ; continue to collect the dtmf sequence.
+; --- ConfBridge Menu Options ---
+; The ConfBridge application also has the ability to
+; apply custom DTMF menu's to each channel using the
+; application. Like the User and Bridge profiles
+; a menu is passed in to ConfBridge as an argument in
+; the dialplan.
+;
+; Below is a list of menu actions that can be assigned
+; to a DTMF sequence.
+;
+; playback(<name of playback prompt>) ; Playback will play back a prompt to a channel
+ ; and then immediately return to the conference.
+; playback_and_continue(<name of playback prompt>) ; playback_and_continue will
+ ; play back a prompt while continuing to
+ ; collect the dtmf sequence. This is useful
+ ; when using a menu prompt that describes all
+ ; the menu options.
+; toggle_mute ; Toggle turning on and off mute. Mute will make the user silent
+ ; to everyone else, but the user will still be able to listen in.
+ ; continue to collect the dtmf sequence.
+; decrease_listening_volume ; Decreases the channel's listening volume.
+; increase_listening_volume ; Increases the channel's listening volume.
+; decrease_talking_volume ; Decreases the channel's talking volume.
+; increase_talking_volume ; Increases the channel's talking volume.
+
+[sample_user_menu]
+type=menu
+*=playback_and_continue(conf-usermenu)
+*1=toggle_mute
+*4=decrease_listening_volume
+*6=increase_listening_volume
+*7=decrease_talking_volume
+*9=increase_talking_volume
+
More information about the asterisk-commits
mailing list