]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Changed SWITCH_EVENT_CHANNEL_STATE to SWITCH_EVENT_CHANNEL_HANGUP on the hangup state...
authorMichael Jerris <mike@jerris.com>
Thu, 7 Sep 2006 22:39:40 +0000 (22:39 +0000)
committerMichael Jerris <mike@jerris.com>
Thu, 7 Sep 2006 22:39:40 +0000 (22:39 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2563 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/switch_channel.c

index adf2ce134329cfffd78a82c745abf42d6c3bc6ae..dbf6c973748f3a506e07c101fc814275854e123c 100644 (file)
@@ -859,7 +859,8 @@ SWITCH_DECLARE(switch_channel_state_t) switch_channel_perform_hangup(switch_chan
                switch_log_printf(SWITCH_CHANNEL_ID_LOG, (char *) file, func, line, SWITCH_LOG_NOTICE, "Hangup %s [%s] [%s]\n", 
                                                  channel->name,
                                                  state_names[last_state], switch_channel_cause2str(channel->hangup_cause));
-               if (switch_event_create(&event, SWITCH_EVENT_CHANNEL_STATE) == SWITCH_STATUS_SUCCESS) {
+               if (switch_event_create(&event, SWITCH_EVENT_CHANNEL_HANGUP) == SWITCH_STATUS_SUCCESS) {
+                       switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Hangup-Cause", switch_channel_cause2str(channel->hangup_cause));
                        switch_channel_event_set_data(channel, event);
                        switch_event_fire(&event);
                }