put running_state in the channel event rather than the state so presence events reflect the current state of the channel and not the one that was possibly changed during the last state

This commit is contained in:
Anthony Minessale
2012-11-08 14:13:05 -06:00
parent 6591eb1497
commit b39a2cbb8b
+1 -1
View File
@@ -2254,7 +2254,7 @@ SWITCH_DECLARE(void) switch_channel_event_set_basic_data(switch_channel_t *chann
originatee_caller_profile = caller_profile->originatee_caller_profile;
}
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Channel-State", switch_channel_state_name(channel->state));
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Channel-State", switch_channel_state_name(channel->running_state));
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Channel-Call-State", switch_channel_callstate2str(channel->callstate));
switch_snprintf(state_num, sizeof(state_num), "%d", channel->state);
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Channel-State-Number", state_num);