Index: res/res_features.c =================================================================== --- res/res_features.c (revision 89465) +++ res/res_features.c (working copy) @@ -2326,6 +2326,7 @@ if (error) { ast_log(LOG_WARNING, "Failed to play courtesy tone!\n"); ast_hangup(peer); + ast_module_user_remove(u); return -1; } } else @@ -2335,6 +2336,7 @@ if (res < 0) { ast_log(LOG_WARNING, "Could not make channels %s and %s compatible for bridge\n", chan->name, peer->name); ast_hangup(peer); + ast_module_user_remove(u); return -1; } /* This runs sorta backwards, since we give the incoming channel control, as if it @@ -2360,6 +2362,7 @@ /* Simulate the PBX hanging up */ if (res != AST_PBX_NO_HANGUP_PEER) ast_hangup(peer); + ast_module_user_remove(u); return res; } else { /*! \todo XXX Play a message XXX */