mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-11-12 04:27:06 +00:00
more presence tweaks
This commit is contained in:
1 parent
0a9f6041dc
commit
7f075c0c28
2 files changed
+52
-34
No files matched your search
@@ -1530,7 +1530,10 @@ SWITCH_DECLARE(switch_channel_state_t) switch_channel_perform_set_running_state(
|
||||
channel->direction == SWITCH_CALL_DIRECTION_OUTBOUND ? "outbound" : "inbound");
|
||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Presence-Call-Direction",
|
||||
channel->direction == SWITCH_CALL_DIRECTION_OUTBOUND ? "outbound" : "inbound");
|
||||
if (switch_channel_test_flag(channel, CF_ANSWERED)) {
|
||||
|
||||
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)) {
|
||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Answer-State", "answered");
|
||||
} else if (switch_channel_test_flag(channel, CF_EARLY_MEDIA)) {
|
||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Answer-State", "early");
|
||||
@@ -1811,7 +1814,9 @@ SWITCH_DECLARE(void) switch_channel_event_set_basic_data(switch_channel_t *chann
|
||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Channel-Call-UUID", v);
|
||||
}
|
||||
|
||||
if (switch_channel_test_flag(channel, CF_ANSWERED)) {
|
||||
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)) {
|
||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Answer-State", "answered");
|
||||
} else if (switch_channel_test_flag(channel, CF_EARLY_MEDIA)) {
|
||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Answer-State", "early");
|
||||
|
||||
Reference in new issue
Block a user