diff options
author | murf <murf@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-11-07 18:22:01 +0000 |
---|---|---|
committer | murf <murf@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-11-07 18:22:01 +0000 |
commit | b7327964f13662a0a52f598e4d0733be815a990f (patch) | |
tree | 74a31afbffd926812e2036b7205da4cd550625e8 /channel.c | |
parent | c65d4845ab5c5869a75bb446a24771e884b34a35 (diff) |
This mod for bug_7506, to make the manager code output the proper event
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@47274 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channel.c')
-rw-r--r-- | channel.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -2590,6 +2590,7 @@ struct ast_channel *ast_request(const char *type, int format, void *data, int *c c->cid.cid_num ? c->cid.cid_num : "<unknown>", c->cid.cid_name ? c->cid.cid_name : "<unknown>", c->uniqueid); + ast_set_flag(c, AST_FLAG_NOTNEW); } return c; } @@ -3253,7 +3254,7 @@ int ast_setstate(struct ast_channel *chan, int state) 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" |