add CHANNEL_HANGUP_COMPLETE event to take the place of CHANNEL_HANGUP, CHANNEL_HANGUP now fires as soon as the channel is hungup but you must wait for CHANNEL_HANGUP_COMPLETE for the CDR data

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@13505 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2009-05-29 17:18:03 +00:00
parent 9d7ee8befd
commit c4b67d93fc
6 changed files with 12 additions and 1 deletions

View File

@@ -466,7 +466,7 @@ SWITCH_DECLARE(void) switch_core_session_run(switch_core_session_t *session)
switch_safe_free(stream.data);
}
if (switch_event_create(&event, SWITCH_EVENT_CHANNEL_HANGUP) == SWITCH_STATUS_SUCCESS) {
if (switch_event_create(&event, SWITCH_EVENT_CHANNEL_HANGUP_COMPLETE) == SWITCH_STATUS_SUCCESS) {
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Hangup-Cause", switch_channel_cause2str(cause));
switch_channel_event_set_data(session->channel, event);
switch_event_fire(&event);