[asterisk-commits] mmichelson: branch mmichelson/features_config r390667 - in /team/mmichelson/f...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Jun 6 09:22:40 CDT 2013
Author: mmichelson
Date: Thu Jun 6 09:22:37 2013
New Revision: 390667
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=390667
Log:
Address latest review feedback.
Modified:
team/mmichelson/features_config/channels/chan_sip.c
team/mmichelson/features_config/main/features.c
team/mmichelson/features_config/main/manager.c
Modified: team/mmichelson/features_config/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/features_config/channels/chan_sip.c?view=diff&rev=390667&r1=390666&r2=390667
==============================================================================
--- team/mmichelson/features_config/channels/chan_sip.c (original)
+++ team/mmichelson/features_config/channels/chan_sip.c Thu Jun 6 09:22:37 2013
@@ -25661,7 +25661,7 @@
enum ast_channel_state c_state = ast_channel_state(c);
RAII_VAR(struct ast_features_pickup_config *, pickup_cfg, ast_get_chan_features_pickup_config(c), ao2_cleanup);
const char *pickupexten;
-
+
if (!pickup_cfg) {
ast_log(LOG_ERROR, "Unable to retrieve pickup configuration options. Unable to detect call pickup extension\n");
pickupexten = "";
Modified: team/mmichelson/features_config/main/features.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/features_config/main/features.c?view=diff&rev=390667&r1=390666&r2=390667
==============================================================================
--- team/mmichelson/features_config/main/features.c (original)
+++ team/mmichelson/features_config/main/features.c Thu Jun 6 09:22:37 2013
@@ -3260,25 +3260,25 @@
!builtin_feature_get_exten(chan, "disconnect", dtmf, sizeof(dtmf)) &&
!ast_strlen_zero(dtmf)) {
res |= ast_bridge_features_enable(features, AST_BRIDGE_BUILTIN_HANGUP, dtmf,
- NULL, NULL, AST_BRIDGE_HOOK_REMOVE_ON_PULL1);
+ NULL, NULL, AST_BRIDGE_HOOK_REMOVE_ON_PULL);
}
if (ast_test_flag(flags, AST_FEATURE_PARKCALL) &&
!builtin_feature_get_exten(chan, "parkcall", dtmf, sizeof(dtmf)) &&
!ast_strlen_zero(dtmf)) {
res |= ast_bridge_features_enable(features, AST_BRIDGE_BUILTIN_PARKCALL, dtmf,
- NULL, NULL, AST_BRIDGE_HOOK_REMOVE_ON_PULL1);
+ NULL, NULL, AST_BRIDGE_HOOK_REMOVE_ON_PULL);
}
if (ast_test_flag(flags, AST_FEATURE_AUTOMON) &&
!builtin_feature_get_exten(chan, "automon", dtmf, sizeof(dtmf)) &&
!ast_strlen_zero(dtmf)) {
res |= ast_bridge_features_enable(features, AST_BRIDGE_BUILTIN_AUTOMON, dtmf,
- NULL, NULL, AST_BRIDGE_HOOK_REMOVE_ON_PULL1);
+ NULL, NULL, AST_BRIDGE_HOOK_REMOVE_ON_PULL);
}
if (ast_test_flag(flags, AST_FEATURE_AUTOMIXMON) &&
!builtin_feature_get_exten(chan, "automixmon", dtmf, sizeof(dtmf)) &&
!ast_strlen_zero(dtmf)) {
res |= ast_bridge_features_enable(features, AST_BRIDGE_BUILTIN_AUTOMIXMON, dtmf,
- NULL, NULL, AST_BRIDGE_HOOK_REMOVE_ON_PULL1);
+ NULL, NULL, AST_BRIDGE_HOOK_REMOVE_ON_PULL);
}
#if 0 /* BUGBUG don't report errors untill all of the builtin features are supported. */
@@ -4818,8 +4818,12 @@
ast_debug(1, "pickup attempt by %s\n", ast_channel_name(chan));
ast_channel_lock(chan);
- pickup_sound = ast_strdupa(pickup_cfg->pickupsound);
- fail_sound = ast_strdupa(pickup_cfg->pickupfailsound);
+ pickup_cfg = ast_get_chan_features_pickup_config(chan);
+ if (!pickup_cfg) {
+ ast_log(LOG_ERROR, "Unable to retrieve pickup configuration. Unable to play pickup sounds\n");
+ }
+ pickup_sound = ast_strdupa(pickup_cfg ? pickup_cfg->pickupsound : "");
+ fail_sound = ast_strdupa(pickup_cfg ? pickup_cfg->pickupfailsound : "");
ast_channel_unlock(chan);
/* The found channel is already locked. */
Modified: team/mmichelson/features_config/main/manager.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/features_config/main/manager.c?view=diff&rev=390667&r1=390666&r2=390667
==============================================================================
--- team/mmichelson/features_config/main/manager.c (original)
+++ team/mmichelson/features_config/main/manager.c Thu Jun 6 09:22:37 2013
@@ -4050,7 +4050,7 @@
const char *context = astman_get_header(m, "Context");
struct ast_channel *chan = NULL;
char feature_code[AST_FEATURE_MAX_LEN];
- char *digit;
+ const char *digit;
if (ast_strlen_zero(name)) {
astman_send_error(s, m, "No channel specified");
@@ -4079,12 +4079,13 @@
pbx_builtin_setvar_helper(chan, "TRANSFER_CONTEXT", context);
}
+/* BUGBUG action_atxfer() is broken because the bridge DTMF hooks need both begin and end events to match correctly. */
for (digit = feature_code; *digit; ++digit) {
struct ast_frame f = { AST_FRAME_DTMF, .subclass.integer = *digit };
ast_queue_frame(chan, &f);
}
- for (digit = (char *)exten; digit && *digit; ++digit) {
+ for (digit = exten; *digit; ++digit) {
struct ast_frame f = { AST_FRAME_DTMF, .subclass.integer = *digit };
ast_queue_frame(chan, &f);
}
More information about the asterisk-commits
mailing list