Merge pull request #24 in FS/freeswitch from ~STANGOR/freeswitch:master to master

* commit '4d0b875d4e7b2ee1fc8f30591b5c98c61080fae5':
  fix mod_fifo presence https://jira.freeswitch.org/browse/FS-6732
This commit is contained in:
Brian West 2014-08-14 14:02:27 -05:00
commit 8ebfca9e3d

View File

@ -2214,9 +2214,9 @@ static void send_presence(fifo_node_t *node)
}
if ((wait_count = node_caller_count(node)) > 0) {
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "status", "Active (%d waiting)", wait_count);
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "force-status", "Active (%d waiting)", wait_count);
} else {
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "status", "Idle");
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "force-status", "Idle");
}
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "rpid", "unknown");
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "event_type", "presence");
@ -2225,7 +2225,7 @@ static void send_presence(fifo_node_t *node)
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "channel-state", wait_count > 0 ? "CS_ROUTING" : "CS_HANGUP");
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "unique-id", node->name);
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "answer-state", wait_count > 0 ? "early" : "terminated");
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "answer-state", wait_count > 0 ? "confirmed" : "terminated");
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "presence-call-direction", "inbound");
switch_event_fire(&event);
}