[Asterisk-Dev] masquerade and ZOMBIE problem and question

Sergio Chersovani mlists at c-net.it
Wed Oct 26 11:40:43 MST 2005


I'm having a ZOMBIE problem coding with the ast_pickup_call function

channel.c line around 2818 CVS HEAD (now)

When a channel goes in the else statement it is marked ZOMBIE, ok...
where and when the ast_channel_free is supposed to be called in this case?
the channel is already fixed up so no pvt struct available.
I guess the channel will stay there as zombie because the  
ast_queue_frame(clone, &null_frame); function does not free up (or 
hangups) the channel when it is zombie
am I right?

    if (ast_test_flag(clone, AST_FLAG_ZOMBIE)) {
        ast_log(LOG_DEBUG, "Destroying channel clone '%s'\n", clone->name);
        ast_mutex_unlock(&clone->lock);
        ast_channel_free(clone);
        manager_event(EVENT_FLAG_CALL, "Hangup",
            "Channel: %s\r\n"
            "Uniqueid: %s\r\n"
            "Cause: %d\r\n"
            "Cause-txt: %s\r\n",
            clone->name,
            clone->uniqueid,
            clone->hangupcause,
            ast_cause2str(clone->hangupcause)
            );
    } else {
        struct ast_frame null_frame = { AST_FRAME_NULL, };
        ast_log(LOG_DEBUG, "Released clone lock on '%s'\n", clone->name);
        ast_set_flag(clone, AST_FLAG_ZOMBIE);
        ast_queue_frame(clone, &null_frame);
        ast_mutex_unlock(&clone->lock);
    }






More information about the asterisk-dev mailing list