--- channel.c.orig 2006-08-31 20:23:14.000000000 -0500 +++ channel.c 2006-08-31 20:23:20.000000000 -0500 @@ -2557,6 +2557,7 @@ c->cid.cid_num ? c->cid.cid_num : "", c->cid.cid_name ? c->cid.cid_name : "", c->uniqueid); + ast_set_flag(c, AST_FLAG_NOTNEW); } return c; } @@ -3197,7 +3198,7 @@ chan->_state = state; ast_device_state_changed_literal(chan->name); manager_event(EVENT_FLAG_CALL, - (oldstate == AST_STATE_DOWN) ? "Newchannel" : "Newstate", + (oldstate == AST_STATE_DOWN && !ast_test_flag(chan, AST_FLAG_NOTNEW)) ? "Newchannel" : "Newstate", "Channel: %s\r\n" "State: %s\r\n" "CallerID: %s\r\n" --- include/asterisk/channel.h.orig 2006-08-31 20:16:49.000000000 -0500 +++ include/asterisk/channel.h 2006-08-31 20:17:51.000000000 -0500 @@ -435,6 +435,7 @@ so when ->priority is set, it will get incremented before finding the next priority to run */ +#define AST_FLAG_NOTNEW (1 << 10) /*!< see bug:7855 incorrect Newchannel event generation */ /* @} */ #define AST_FEATURE_PLAY_WARNING (1 << 0)