[asterisk-commits] dvossel: branch dvossel/hd_confbridge r311473 - in /team/dvossel/hd_confbridg...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Mar 21 11:02:23 CDT 2011
Author: dvossel
Date: Mon Mar 21 11:02:18 2011
New Revision: 311473
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=311473
Log:
Display default sounds for bridge profile if custom sounds are not set
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
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=311473&r1=311472&r2=311473
==============================================================================
--- team/dvossel/hd_confbridge/apps/app_confbridge.c (original)
+++ team/dvossel/hd_confbridge/apps/app_confbridge.c Mon Mar 21 11:02:18 2011
@@ -121,9 +121,7 @@
return (!strcasecmp(conference_bridge0->name, conference_bridge1->name) ? CMP_MATCH | CMP_STOP : 0);
}
-/*! \brief Looks to see if sound file is stored in bridge profile sounds, if not
- * default sound is provided.*/
-static const char *conf_get_sound(enum conf_sounds sound, struct bridge_profile_sounds *custom_sounds)
+const char *conf_get_sound(enum conf_sounds sound, struct bridge_profile_sounds *custom_sounds)
{
switch (sound) {
case CONF_SOUND_HAS_JOINED:
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=311473&r1=311472&r2=311473
==============================================================================
--- team/dvossel/hd_confbridge/apps/confbridge/conf_config_parser.c (original)
+++ team/dvossel/hd_confbridge/apps/confbridge/conf_config_parser.c Mon Mar 21 11:02:18 2011
@@ -695,54 +695,22 @@
}
ast_cli(a->fd,"Internal Sample Rate: %s\n", tmp);
- if (!ast_strlen_zero(b_profile.sounds->onlyperson)) {
- ast_cli(a->fd,"sound_only_person: %s\n", b_profile.sounds->onlyperson);
- }
- if (!ast_strlen_zero(b_profile.sounds->hasjoin)) {
- ast_cli(a->fd,"sound_has_joined: %s\n", b_profile.sounds->hasjoin);
- }
- if (!ast_strlen_zero(b_profile.sounds->hasleft)) {
- ast_cli(a->fd,"sound_has_left: %s\n", b_profile.sounds->hasleft);
- }
- if (!ast_strlen_zero(b_profile.sounds->kicked)) {
- ast_cli(a->fd,"sound_kicked: %s\n", b_profile.sounds->kicked);
- }
- if (!ast_strlen_zero(b_profile.sounds->muted)) {
- ast_cli(a->fd,"sound_muted: %s\n", b_profile.sounds->muted);
- }
- if (!ast_strlen_zero(b_profile.sounds->unmuted)) {
- ast_cli(a->fd,"sound_unmuted: %s\n", b_profile.sounds->unmuted);
- }
- if (!ast_strlen_zero(b_profile.sounds->thereare)) {
- ast_cli(a->fd,"sound_there_are: %s\n", b_profile.sounds->thereare);
- }
- if (!ast_strlen_zero(b_profile.sounds->otherinparty)) {
- ast_cli(a->fd,"sound_other_in_party: %s\n", b_profile.sounds->otherinparty);
- }
- if (!ast_strlen_zero(b_profile.sounds->placeintoconf)) {
- ast_cli(a->fd,"sound_place_into_conference: %s\n", b_profile.sounds->placeintoconf);
- }
- if (!ast_strlen_zero(b_profile.sounds->waitforleader)) {
- ast_cli(a->fd,"sound_wait_for_leader:%s\n", b_profile.sounds->waitforleader);
- }
- if (!ast_strlen_zero(b_profile.sounds->getpin)) {
- ast_cli(a->fd,"sound_get_pin: %s\n", b_profile.sounds->getpin);
- }
- if (!ast_strlen_zero(b_profile.sounds->invalidpin)) {
- ast_cli(a->fd,"sound_invalid_pin: %s\n", b_profile.sounds->invalidpin);
- }
- if (!ast_strlen_zero(b_profile.sounds->locked)) {
- ast_cli(a->fd,"sound_locked: %s\n", b_profile.sounds->locked);
- }
- if (!ast_strlen_zero(b_profile.sounds->unlockednow)) {
- ast_cli(a->fd,"sound_unlocked_now: %s\n", b_profile.sounds->unlockednow);
- }
- if (!ast_strlen_zero(b_profile.sounds->lockednow)) {
- ast_cli(a->fd,"sound_lockednow: %s\n", b_profile.sounds->lockednow);
- }
- if (!ast_strlen_zero(b_profile.sounds->errormenu)) {
- ast_cli(a->fd,"sound_error_menu: %s\n", b_profile.sounds->errormenu);
- }
+ ast_cli(a->fd,"sound_only_person: %s\n", conf_get_sound(CONF_SOUND_ONLY_PERSON, b_profile.sounds));
+ ast_cli(a->fd,"sound_has_joined: %s\n", conf_get_sound(CONF_SOUND_HAS_JOINED, b_profile.sounds));
+ ast_cli(a->fd,"sound_has_left: %s\n", conf_get_sound(CONF_SOUND_HAS_LEFT, b_profile.sounds));
+ ast_cli(a->fd,"sound_kicked: %s\n", conf_get_sound(CONF_SOUND_KICKED, b_profile.sounds));
+ ast_cli(a->fd,"sound_muted: %s\n", conf_get_sound(CONF_SOUND_MUTED, b_profile.sounds));
+ ast_cli(a->fd,"sound_unmuted: %s\n", conf_get_sound(CONF_SOUND_UNMUTED, b_profile.sounds));
+ ast_cli(a->fd,"sound_there_are: %s\n", conf_get_sound(CONF_SOUND_THERE_ARE, b_profile.sounds));
+ ast_cli(a->fd,"sound_other_in_party: %s\n", conf_get_sound(CONF_SOUND_OTHER_IN_PARTY, b_profile.sounds));
+ ast_cli(a->fd,"sound_place_into_conference: %s\n", conf_get_sound(CONF_SOUND_PLACE_IN_CONF, b_profile.sounds));
+ ast_cli(a->fd,"sound_wait_for_leader: %s\n", conf_get_sound(CONF_SOUND_WAIT_FOR_LEADER, b_profile.sounds));
+ ast_cli(a->fd,"sound_get_pin: %s\n", conf_get_sound(CONF_SOUND_GET_PIN, b_profile.sounds));
+ ast_cli(a->fd,"sound_invalid_pin: %s\n", conf_get_sound(CONF_SOUND_INVALID_PIN, b_profile.sounds));
+ ast_cli(a->fd,"sound_locked: %s\n", conf_get_sound(CONF_SOUND_LOCKED, b_profile.sounds));
+ ast_cli(a->fd,"sound_unlocked_now: %s\n", conf_get_sound(CONF_SOUND_UNLOCKED_NOW, b_profile.sounds));
+ ast_cli(a->fd,"sound_lockednow: %s\n", conf_get_sound(CONF_SOUND_LOCKED_NOW, b_profile.sounds));
+ ast_cli(a->fd,"sound_error_menu: %s\n", conf_get_sound(CONF_SOUND_ERROR_MENU, b_profile.sounds));
ast_cli(a->fd,"\n");
conf_bridge_profile_destroy(&b_profile);
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=311473&r1=311472&r2=311473
==============================================================================
--- team/dvossel/hd_confbridge/apps/confbridge/include/confbridge.h (original)
+++ team/dvossel/hd_confbridge/apps/confbridge/include/confbridge.h Mon Mar 21 11:02:18 2011
@@ -276,4 +276,9 @@
struct conference_bridge_user *conference_bridge_user,
struct conf_menu_entry *menu_entry,
struct conf_menu *menu);
+
+
+/*! \brief Looks to see if sound file is stored in bridge profile sounds, if not
+ * default sound is provided.*/
+const char *conf_get_sound(enum conf_sounds sound, struct bridge_profile_sounds *custom_sounds);
#endif
More information about the asterisk-commits
mailing list