diff options
author | Timo Teräs <timo.teras@iki.fi> | 2012-11-05 08:29:18 +0200 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2012-11-05 08:31:06 +0200 |
commit | defd141cdf47626784ffb405fc9531ad56d257e9 (patch) | |
tree | 5276e71329340e2a9a230b9c9e455d3b10fd2462 /main/asterisk/ASTERISK-19109.patch | |
parent | 24734f342b0ca02518a18f4c6e57cc777b45238e (diff) | |
download | aports-defd141cdf47626784ffb405fc9531ad56d257e9.tar.bz2 aports-defd141cdf47626784ffb405fc9531ad56d257e9.tar.xz |
main/asterisk: upgrade to 11.0.0 from testing/asterisk
- re-enable libasteriskssl as the uclibc bug should be fixed now
Diffstat (limited to 'main/asterisk/ASTERISK-19109.patch')
-rw-r--r-- | main/asterisk/ASTERISK-19109.patch | 143 |
1 files changed, 92 insertions, 51 deletions
diff --git a/main/asterisk/ASTERISK-19109.patch b/main/asterisk/ASTERISK-19109.patch index 73c8accff4..cd45b42731 100644 --- a/main/asterisk/ASTERISK-19109.patch +++ b/main/asterisk/ASTERISK-19109.patch @@ -1,11 +1,39 @@ -commit 0fad0f8a679cbb0609056528ac157476dd4e5877 -Author: Timo Teräs <timo.teras@iki.fi> -Date: Wed Dec 28 08:30:54 2011 +0200 +From 806946c35cf0560248e63fea53c4d82426a2034a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi> +Date: Wed, 5 Sep 2012 10:07:05 +0300 +Subject: [PATCH] ASTERISK-19109: Implement deaf participant support for + ConfBridge - Support 'deaf' participants in ConfBridge +--- + CHANGES | 3 + + apps/app_confbridge.c | 218 ++++++++++++++++++++++++++++++--- + apps/confbridge/conf_config_parser.c | 14 +++ + apps/confbridge/include/confbridge.h | 6 + + bridges/bridge_multiplexed.c | 2 +- + bridges/bridge_simple.c | 2 +- + bridges/bridge_softmix.c | 38 +++--- + configs/confbridge.conf.sample | 5 + + include/asterisk/bridging_features.h | 2 + + include/asterisk/bridging_technology.h | 15 +++ + main/bridging.c | 22 ++++ + 11 files changed, 294 insertions(+), 33 deletions(-) +diff --git a/CHANGES b/CHANGES +index c3c9891..2efa17b 100644 +--- a/CHANGES ++++ b/CHANGES +@@ -66,6 +66,9 @@ ConfBridge + file will be played to the user, and only the user, upon joining the + conference bridge. + ++ * Added support for deaf participants with CLI commands, manager actions ++ and ConfBridge DTMF actions to toggle the deaf state. ++ + + Dial + ------------------- diff --git a/apps/app_confbridge.c b/apps/app_confbridge.c -index d5609b7..8569f5c 100644 +index 90954b8..0455be4 100644 --- a/apps/app_confbridge.c +++ b/apps/app_confbridge.c @@ -185,6 +185,30 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") @@ -64,7 +92,7 @@ index d5609b7..8569f5c 100644 case CONF_SOUND_ONLY_ONE: return S_OR(custom_sounds->onlyone, "conf-onlyone"); case CONF_SOUND_THERE_ARE: -@@ -1423,10 +1458,13 @@ static int confbridge_exec(struct ast_channel *chan, const char *data) +@@ -1504,10 +1539,13 @@ static int confbridge_exec(struct ast_channel *chan, const char *data) volume_adjustments[0] = ast_audiohook_volume_get(chan, AST_AUDIOHOOK_DIRECTION_READ); volume_adjustments[1] = ast_audiohook_volume_get(chan, AST_AUDIOHOOK_DIRECTION_WRITE); @@ -79,7 +107,7 @@ index d5609b7..8569f5c 100644 if (ast_test_flag(&conference_bridge_user.u_profile, USER_OPT_DROP_SILENCE)) { conference_bridge_user.tech_args.drop_silence = 1; -@@ -1587,6 +1625,20 @@ static int action_toggle_mute_participants(struct conference_bridge *conference_ +@@ -1668,6 +1706,20 @@ static int action_toggle_mute_participants(struct conference_bridge *conference_ return 0; } @@ -100,7 +128,7 @@ index d5609b7..8569f5c 100644 static int action_playback(struct ast_bridge_channel *bridge_channel, const char *playback_file) { char *file_copy = ast_strdupa(playback_file); -@@ -1775,6 +1827,11 @@ static int execute_menu_entry(struct conference_bridge *conference_bridge, +@@ -1856,6 +1908,11 @@ static int execute_menu_entry(struct conference_bridge *conference_bridge, case MENU_ACTION_PARTICIPANT_COUNT: announce_user_count(conference_bridge, conference_bridge_user); break; @@ -112,7 +140,7 @@ index d5609b7..8569f5c 100644 case MENU_ACTION_PLAYBACK: if (!stop_prompts) { res |= action_playback(bridge_channel, menu_action->data.playback_file); -@@ -2038,13 +2095,13 @@ static int generic_lock_unlock_helper(int lock, const char *conference) +@@ -2119,13 +2176,13 @@ static int generic_lock_unlock_helper(int lock, const char *conference) } /* \internal @@ -128,12 +156,12 @@ index d5609b7..8569f5c 100644 { struct conference_bridge *bridge = NULL; struct conference_bridge tmp; -@@ -2062,10 +2119,44 @@ static int generic_mute_unmute_helper(int mute, const char *conference, const ch +@@ -2143,10 +2200,44 @@ static int generic_mute_unmute_helper(int mute, const char *conference, const ch } } if (participant) { - participant->features.mute = mute; -- ast_test_suite_event_notify("CONF_MUTE", "Message: participant %s %s\r\nConference: %s\r\nChannel: %s", participant->chan->name, participant->features.mute ? "muted" : "unmuted", bridge->b_profile.name, participant->chan->name); +- ast_test_suite_event_notify("CONF_MUTE", "Message: participant %s %s\r\nConference: %s\r\nChannel: %s", ast_channel_name(participant->chan), participant->features.mute ? "muted" : "unmuted", bridge->b_profile.name, ast_channel_name(participant->chan)); + const char *state, *verb; + + switch (action) { @@ -165,10 +193,10 @@ index d5609b7..8569f5c 100644 + "Message: participant %s %s\r\n" + "Conference: %s\r\n" + "Channel: %s", -+ participant->chan->name, ++ ast_channel_name(participant->chan), + verb, + bridge->b_profile.name, -+ participant->chan->name); ++ ast_channel_name(participant->chan)); + } } else { - res = -2;; @@ -176,7 +204,7 @@ index d5609b7..8569f5c 100644 } ao2_unlock(bridge); ao2_ref(bridge, -1); -@@ -2073,9 +2164,10 @@ static int generic_mute_unmute_helper(int mute, const char *conference, const ch +@@ -2154,9 +2245,10 @@ static int generic_mute_unmute_helper(int mute, const char *conference, const ch return res; } @@ -189,7 +217,7 @@ index d5609b7..8569f5c 100644 if (res == -1) { ast_cli(a->fd, "No conference bridge named '%s' found!\n", a->argv[2]); -@@ -2084,7 +2176,24 @@ static int cli_mute_unmute_helper(int mute, struct ast_cli_args *a) +@@ -2165,7 +2257,24 @@ static int cli_mute_unmute_helper(int mute, struct ast_cli_args *a) ast_cli(a->fd, "No channel named '%s' found in conference %s\n", a->argv[3], a->argv[2]); return -1; } @@ -215,7 +243,7 @@ index d5609b7..8569f5c 100644 return 0; } -@@ -2106,7 +2215,7 @@ static char *handle_cli_confbridge_mute(struct ast_cli_entry *e, int cmd, struct +@@ -2187,7 +2296,7 @@ static char *handle_cli_confbridge_mute(struct ast_cli_entry *e, int cmd, struct return CLI_SHOWUSAGE; } @@ -224,7 +252,7 @@ index d5609b7..8569f5c 100644 return CLI_SUCCESS; } -@@ -2129,7 +2238,53 @@ static char *handle_cli_confbridge_unmute(struct ast_cli_entry *e, int cmd, stru +@@ -2210,7 +2319,53 @@ static char *handle_cli_confbridge_unmute(struct ast_cli_entry *e, int cmd, stru return CLI_SHOWUSAGE; } @@ -279,7 +307,7 @@ index d5609b7..8569f5c 100644 return CLI_SUCCESS; } -@@ -2277,6 +2432,8 @@ static struct ast_cli_entry cli_confbridge[] = { +@@ -2358,6 +2513,8 @@ static struct ast_cli_entry cli_confbridge[] = { AST_CLI_DEFINE(handle_cli_confbridge_kick, "Kick participants out of conference bridges."), AST_CLI_DEFINE(handle_cli_confbridge_mute, "Mute a participant."), AST_CLI_DEFINE(handle_cli_confbridge_unmute, "Unmute a participant."), @@ -288,7 +316,7 @@ index d5609b7..8569f5c 100644 AST_CLI_DEFINE(handle_cli_confbridge_lock, "Lock a conference."), AST_CLI_DEFINE(handle_cli_confbridge_unlock, "Unlock a conference."), AST_CLI_DEFINE(handle_cli_confbridge_start_record, "Start recording a conference"), -@@ -2411,10 +2568,11 @@ static int action_confbridgelistrooms(struct mansession *s, const struct message +@@ -2492,10 +2649,11 @@ static int action_confbridgelistrooms(struct mansession *s, const struct message return 0; } @@ -301,7 +329,7 @@ index d5609b7..8569f5c 100644 int res = 0; if (ast_strlen_zero(conference)) { -@@ -2430,7 +2588,7 @@ static int action_mute_unmute_helper(struct mansession *s, const struct message +@@ -2511,7 +2669,7 @@ static int action_mute_unmute_helper(struct mansession *s, const struct message return 0; } @@ -310,7 +338,7 @@ index d5609b7..8569f5c 100644 if (res == -1) { astman_send_error(s, m, "No Conference by that name found."); -@@ -2440,17 +2598,41 @@ static int action_mute_unmute_helper(struct mansession *s, const struct message +@@ -2521,17 +2679,41 @@ static int action_mute_unmute_helper(struct mansession *s, const struct message return 0; } @@ -355,7 +383,7 @@ index d5609b7..8569f5c 100644 } static int action_lock_unlock_helper(struct mansession *s, const struct message *m, int lock) -@@ -2737,6 +2919,8 @@ static int unload_module(void) +@@ -2818,6 +3000,8 @@ static int unload_module(void) res |= ast_manager_unregister("ConfbridgeListRooms"); res |= ast_manager_unregister("ConfbridgeMute"); res |= ast_manager_unregister("ConfbridgeUnmute"); @@ -364,7 +392,7 @@ index d5609b7..8569f5c 100644 res |= ast_manager_unregister("ConfbridgeKick"); res |= ast_manager_unregister("ConfbridgeUnlock"); res |= ast_manager_unregister("ConfbridgeLock"); -@@ -2778,6 +2962,8 @@ static int load_module(void) +@@ -2860,6 +3044,8 @@ static int load_module(void) res |= ast_manager_register_xml("ConfbridgeListRooms", EVENT_FLAG_REPORTING, action_confbridgelistrooms); res |= ast_manager_register_xml("ConfbridgeMute", EVENT_FLAG_CALL, action_confbridgemute); res |= ast_manager_register_xml("ConfbridgeUnmute", EVENT_FLAG_CALL, action_confbridgeunmute); @@ -374,19 +402,10 @@ index d5609b7..8569f5c 100644 res |= ast_manager_register_xml("ConfbridgeUnlock", EVENT_FLAG_CALL, action_confbridgeunlock); res |= ast_manager_register_xml("ConfbridgeLock", EVENT_FLAG_CALL, action_confbridgelock); diff --git a/apps/confbridge/conf_config_parser.c b/apps/confbridge/conf_config_parser.c -index 9bb8b2a..3cf7a32 100644 +index f4a9604..8a02de7 100644 --- a/apps/confbridge/conf_config_parser.c +++ b/apps/confbridge/conf_config_parser.c -@@ -153,6 +153,8 @@ static int set_user_option(const char *name, const char *value, struct user_prof - ast_set2_flag(u_profile, ast_true(value), USER_OPT_MARKEDUSER); - } else if (!strcasecmp(name, "startmuted")) { - ast_set2_flag(u_profile, ast_true(value), USER_OPT_STARTMUTED); -+ } else if (!strcasecmp(name, "startdeaf")) { -+ ast_set2_flag(u_profile, ast_true(value), USER_OPT_STARTDEAF); - } else if (!strcasecmp(name, "music_on_hold_when_empty")) { - ast_set2_flag(u_profile, ast_true(value), USER_OPT_MUSICONHOLD); - } else if (!strcasecmp(name, "quiet")) { -@@ -231,6 +233,10 @@ static int set_sound(const char *sound_name, const char *sound_file, struct brid +@@ -279,6 +279,10 @@ static int set_sound(const char *sound_name, const char *sound_file, struct brid ast_string_field_set(sounds, muted, sound_file); } else if (!strcasecmp(sound_name, "sound_unmuted")) { ast_string_field_set(sounds, unmuted, sound_file); @@ -397,7 +416,7 @@ index 9bb8b2a..3cf7a32 100644 } else if (!strcasecmp(sound_name, "sound_there_are")) { ast_string_field_set(sounds, thereare, sound_file); } else if (!strcasecmp(sound_name, "sound_other_in_party")) { -@@ -541,6 +547,7 @@ static int add_action_to_menu_entry(struct conf_menu_entry *menu_entry, enum con +@@ -418,6 +422,7 @@ static int add_action_to_menu_entry(struct conf_menu_entry *menu_entry, enum con switch (id) { case MENU_ACTION_NOOP: case MENU_ACTION_TOGGLE_MUTE: @@ -405,7 +424,17 @@ index 9bb8b2a..3cf7a32 100644 case MENU_ACTION_INCREASE_LISTENING: case MENU_ACTION_DECREASE_LISTENING: case MENU_ACTION_INCREASE_TALKING: -@@ -1029,6 +1036,8 @@ static char *handle_cli_confbridge_show_bridge_profile(struct ast_cli_entry *e, +@@ -708,6 +713,9 @@ static char *handle_cli_confbridge_show_user_profile(struct ast_cli_entry *e, in + ast_cli(a->fd,"Start Muted: %s\n", + u_profile.flags & USER_OPT_STARTMUTED? + "true" : "false"); ++ ast_cli(a->fd,"Start Deaf: %s\n", ++ u_profile.flags & USER_OPT_STARTDEAF? ++ "true" : "false"); + ast_cli(a->fd,"MOH When Empty: %s\n", + u_profile.flags & USER_OPT_MUSICONHOLD ? + "enabled" : "disabled"); +@@ -896,6 +904,8 @@ static char *handle_cli_confbridge_show_bridge_profile(struct ast_cli_entry *e, 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)); @@ -414,7 +443,7 @@ index 9bb8b2a..3cf7a32 100644 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)); -@@ -1140,6 +1149,9 @@ static char *handle_cli_confbridge_show_menu(struct ast_cli_entry *e, int cmd, s +@@ -1021,6 +1031,9 @@ static char *handle_cli_confbridge_show_menu(struct ast_cli_entry *e, int cmd, s case MENU_ACTION_TOGGLE_MUTE: ast_cli(a->fd, "toggle_mute"); break; @@ -424,8 +453,16 @@ index 9bb8b2a..3cf7a32 100644 case MENU_ACTION_NOOP: ast_cli(a->fd, "no_op"); break; +@@ -1268,6 +1281,7 @@ int conf_load_config(int reload) + aco_option_register(&cfg_info, "admin", ACO_EXACT, user_types, "no", OPT_BOOLFLAG_T, 1, FLDSET(struct user_profile, flags), USER_OPT_ADMIN); + aco_option_register(&cfg_info, "marked", ACO_EXACT, user_types, "no", OPT_BOOLFLAG_T, 1, FLDSET(struct user_profile, flags), USER_OPT_MARKEDUSER); + aco_option_register(&cfg_info, "startmuted", ACO_EXACT, user_types, "no", OPT_BOOLFLAG_T, 1, FLDSET(struct user_profile, flags), USER_OPT_STARTMUTED); ++ aco_option_register(&cfg_info, "startdeaf", ACO_EXACT, user_types, "no", OPT_BOOLFLAG_T, 1, FLDSET(struct user_profile, flags), USER_OPT_STARTDEAF); + aco_option_register(&cfg_info, "music_on_hold_when_empty", ACO_EXACT, user_types, "no", OPT_BOOLFLAG_T, 1, FLDSET(struct user_profile, flags), USER_OPT_MUSICONHOLD); + aco_option_register(&cfg_info, "quiet", ACO_EXACT, user_types, "no", OPT_BOOLFLAG_T, 1, FLDSET(struct user_profile, flags), USER_OPT_QUIET); + aco_option_register_custom(&cfg_info, "announce_user_count_all", ACO_EXACT, user_types, "no", announce_user_count_all_handler, 0); diff --git a/apps/confbridge/include/confbridge.h b/apps/confbridge/include/confbridge.h -index 5337e22..c601fa8 100644 +index d3ead35..3d773c5 100644 --- a/apps/confbridge/include/confbridge.h +++ b/apps/confbridge/include/confbridge.h @@ -57,6 +57,7 @@ enum user_profile_flags { @@ -444,7 +481,7 @@ index 5337e22..c601fa8 100644 MENU_ACTION_PLAYBACK, MENU_ACTION_PLAYBACK_AND_CONTINUE, MENU_ACTION_INCREASE_LISTENING, -@@ -143,6 +145,8 @@ enum conf_sounds { +@@ -142,6 +144,8 @@ enum conf_sounds { CONF_SOUND_KICKED, CONF_SOUND_MUTED, CONF_SOUND_UNMUTED, @@ -453,7 +490,7 @@ index 5337e22..c601fa8 100644 CONF_SOUND_ONLY_ONE, CONF_SOUND_THERE_ARE, CONF_SOUND_OTHER_IN_PARTY, -@@ -169,6 +173,8 @@ struct bridge_profile_sounds { +@@ -168,6 +172,8 @@ struct bridge_profile_sounds { AST_STRING_FIELD(kicked); AST_STRING_FIELD(muted); AST_STRING_FIELD(unmuted); @@ -463,7 +500,7 @@ index 5337e22..c601fa8 100644 AST_STRING_FIELD(thereare); AST_STRING_FIELD(otherinparty); diff --git a/bridges/bridge_multiplexed.c b/bridges/bridge_multiplexed.c -index e004dfd..7add614 100644 +index cd30266..190f790 100644 --- a/bridges/bridge_multiplexed.c +++ b/bridges/bridge_multiplexed.c @@ -386,7 +386,7 @@ static enum ast_bridge_write_result multiplexed_bridge_write(struct ast_bridge * @@ -476,7 +513,7 @@ index e004dfd..7add614 100644 return AST_BRIDGE_WRITE_SUCCESS; diff --git a/bridges/bridge_simple.c b/bridges/bridge_simple.c -index 14864df..d4270ff 100644 +index 69e4114..1623ce0 100644 --- a/bridges/bridge_simple.c +++ b/bridges/bridge_simple.c @@ -81,7 +81,7 @@ static enum ast_bridge_write_result simple_bridge_write(struct ast_bridge *bridg @@ -489,7 +526,7 @@ index 14864df..d4270ff 100644 return AST_BRIDGE_WRITE_SUCCESS; diff --git a/bridges/bridge_softmix.c b/bridges/bridge_softmix.c -index 7632f36..7946c79 100644 +index 52e5551..5754e41 100644 --- a/bridges/bridge_softmix.c +++ b/bridges/bridge_softmix.c @@ -435,7 +435,7 @@ static void softmix_pass_dtmf(struct ast_bridge *bridge, struct ast_bridge_chann @@ -546,7 +583,7 @@ index 7632f36..7946c79 100644 sc->have_frame = 0; } -@@ -850,16 +850,23 @@ static int softmix_bridge_thread(struct ast_bridge *bridge) +@@ -850,16 +850,24 @@ static int softmix_bridge_thread(struct ast_bridge *bridge) ast_mutex_lock(&sc->lock); @@ -568,19 +605,20 @@ index 7632f36..7946c79 100644 + memcpy(sc->final_buf, buf, softmix_datalen); + + /* process the softmix channel's new write audio */ -+ softmix_process_write_audio(&trans_helper, &bridge_channel->chan->rawwriteformat, sc); ++ softmix_process_write_audio(&trans_helper, ++ ast_channel_rawwriteformat(bridge_channel->chan), sc); } - sc->write_frame.datalen = softmix_datalen; - sc->write_frame.samples = softmix_samples; - memcpy(sc->final_buf, buf, softmix_datalen); - - /* process the softmix channel's new write audio */ -- softmix_process_write_audio(&trans_helper, &bridge_channel->chan->rawwriteformat, sc); +- softmix_process_write_audio(&trans_helper, ast_channel_rawwriteformat(bridge_channel->chan), sc); /* The frame is now ready for use... */ sc->have_frame = 1; diff --git a/configs/confbridge.conf.sample b/configs/confbridge.conf.sample -index d113825..737f92c 100644 +index 7484b28..3b0ce85 100644 --- a/configs/confbridge.conf.sample +++ b/configs/confbridge.conf.sample @@ -16,6 +16,7 @@ type=user @@ -591,7 +629,7 @@ index d113825..737f92c 100644 ;music_on_hold_when_empty=yes ; Sets whether MOH should be played when only ; one person is in the conference or when the ; the user is waiting on a marked user to enter -@@ -209,6 +210,8 @@ type=bridge +@@ -210,6 +211,8 @@ type=bridge ;sound_kicked ; The sound played to a user who has been kicked from the conference. ;sound_muted ; The sound played when the mute option it toggled on. ;sound_unmuted ; The sound played when the mute option it toggled off. @@ -600,7 +638,7 @@ index d113825..737f92c 100644 ;sound_only_person ; The sound played when the user is the only person in the conference. ;sound_only_one ; The sound played to a user when there is only one other ; person is in the conference. -@@ -263,6 +266,8 @@ type=bridge +@@ -264,6 +267,8 @@ type=bridge ; 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. @@ -649,10 +687,10 @@ index 3d2e870..1ecb4c1 100644 * * \note All DSP functionality on the bridge has been pushed down to the lowest possible diff --git a/main/bridging.c b/main/bridging.c -index 9bc0edc..3295dc2 100644 +index 465d033..4f67e90 100644 --- a/main/bridging.c +++ b/main/bridging.c -@@ -336,6 +336,28 @@ void ast_bridge_handle_trip(struct ast_bridge *bridge, struct ast_bridge_channel +@@ -337,6 +337,28 @@ void ast_bridge_handle_trip(struct ast_bridge *bridge, struct ast_bridge_channel return; } @@ -681,3 +719,6 @@ index 9bc0edc..3295dc2 100644 /*! \brief Generic thread loop, TODO: Rethink this/improve it */ static int generic_thread_loop(struct ast_bridge *bridge) { +-- +1.7.12 + |