]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
revert bogus change to attempt to fix bug 7506 which actually causes half of
authorRussell Bryant <russell@russellbryant.com>
Thu, 17 Aug 2006 16:36:21 +0000 (16:36 +0000)
committerRussell Bryant <russell@russellbryant.com>
Thu, 17 Aug 2006 16:36:21 +0000 (16:36 +0000)
the channels not to get "Newchannel" events at all (issue #7745)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@40227 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channel.c

index 26e5e05ba3ce26054341b21ed57684d17721538e..2f3950195d7a24a3cdc4cbcf31cfd65ac97a6f56 100644 (file)
--- a/channel.c
+++ b/channel.c
@@ -3196,7 +3196,8 @@ int ast_setstate(struct ast_channel *chan, int state)
 
        chan->_state = state;
        ast_device_state_changed_literal(chan->name);
-       manager_event(EVENT_FLAG_CALL, "Newstate",
+       manager_event(EVENT_FLAG_CALL,
+                     (oldstate == AST_STATE_DOWN) ? "Newchannel" : "Newstate",
                      "Channel: %s\r\n"
                      "State: %s\r\n"
                      "CallerID: %s\r\n"