Index: main/channel.c =================================================================== --- main/channel.c (revision 371580) +++ main/channel.c (working copy) @@ -1205,6 +1205,14 @@ return NULL; } + /* + * Init file descriptors to unopened state just in case autoservice is called + * on the channel or something tries to read a frame from it. + */ + ast_channel_timingfd_set(tmp, -1); + ast_channel_internal_alertpipe_clear(tmp); + ast_channel_internal_fd_clear_all(tmp); + ast_pbx_hangup_handler_init(tmp); AST_LIST_HEAD_INIT_NOLOCK(ast_channel_datastores(tmp));