From: Anthony Minessale Date: Thu, 8 Nov 2012 20:13:05 +0000 (-0600) Subject: put running_state in the channel event rather than the state so presence events refle... X-Git-Tag: v1.3.3~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b39a2cbb8b5ea785b7737067f1f27bb4ae033e1f;p=thirdparty%2Ffreeswitch.git 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 --- diff --git a/src/switch_channel.c b/src/switch_channel.c index 5ccca55184..9e40829f82 100644 --- a/src/switch_channel.c +++ b/src/switch_channel.c @@ -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);