add event header
This commit is contained in:
parent
b3208f5cdc
commit
885203a461
|
@ -1847,6 +1847,10 @@ SWITCH_DECLARE(switch_channel_state_t) switch_channel_perform_set_running_state(
|
|||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Presence-Call-Direction",
|
||||
channel->direction == SWITCH_CALL_DIRECTION_OUTBOUND ? "outbound" : "inbound");
|
||||
|
||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Channel-HIT-Dialplan",
|
||||
switch_channel_direction(channel) == SWITCH_CALL_DIRECTION_INBOUND ||
|
||||
switch_channel_test_flag(channel, CF_DIALPLAN) ? "true" : "false");
|
||||
|
||||
if (switch_channel_down(channel)) {
|
||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Answer-State", "hangup");
|
||||
} else if (switch_channel_test_flag(channel, CF_ANSWERED)) {
|
||||
|
@ -2113,6 +2117,11 @@ SWITCH_DECLARE(void) switch_channel_event_set_basic_data(switch_channel_t *chann
|
|||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Presence-Call-Direction",
|
||||
channel->direction == SWITCH_CALL_DIRECTION_OUTBOUND ? "outbound" : "inbound");
|
||||
|
||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Channel-HIT-Dialplan",
|
||||
switch_channel_direction(channel) == SWITCH_CALL_DIRECTION_INBOUND ||
|
||||
switch_channel_test_flag(channel, CF_DIALPLAN) ? "true" : "false");
|
||||
|
||||
|
||||
if ((v = switch_channel_get_variable(channel, "presence_id"))) {
|
||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Channel-Presence-ID", v);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue