diff --git a/res/res_features.c b/res/res_features.c index 71c5addb1351a8737582e54c9b5255548fc0a318..e45d02184918475256f2ae2af321a16ea1a65ac6 100644 --- a/res/res_features.c +++ b/res/res_features.c @@ -956,8 +956,11 @@ static int builtin_atxfer(struct ast_channel *chan, struct ast_channel *peer, st return FEATURE_RETURN_SUCCESS; } - if (check_compat(transferer, newchan)) + if (check_compat(transferer, newchan)) { + /* we do mean transferee here, NOT transferer */ + finishup(transferee); return -1; + } memset(&bconfig,0,sizeof(struct ast_bridge_config)); ast_set_flag(&(bconfig.features_caller), AST_FEATURE_DISCONNECT); ast_set_flag(&(bconfig.features_callee), AST_FEATURE_DISCONNECT); @@ -970,8 +973,10 @@ static int builtin_atxfer(struct ast_channel *chan, struct ast_channel *peer, st transferer->_softhangup = 0; return FEATURE_RETURN_SUCCESS; } - if (check_compat(transferee, newchan)) + if (check_compat(transferee, newchan)) { + finishup(transferee); return -1; + } ast_indicate(transferee, AST_CONTROL_UNHOLD); if ((ast_autoservice_stop(transferee) < 0) @@ -1061,8 +1066,10 @@ static int builtin_atxfer(struct ast_channel *chan, struct ast_channel *peer, st return -1; /* newchan is up, we should prepare transferee and bridge them */ - if (check_compat(transferee, newchan)) + if (check_compat(transferee, newchan)) { + finishup(transferee); return -1; + } ast_indicate(transferee, AST_CONTROL_UNHOLD); if ((ast_waitfordigit(transferee, 100) < 0)