FSCORE-308

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12257 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale 2009-02-24 00:05:19 +00:00
parent 0f966ded62
commit 22f8489043
3 changed files with 13 additions and 8 deletions

View File

@ -982,7 +982,9 @@ SWITCH_DECLARE(switch_channel_state_t) switch_channel_perform_set_running_state(
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Channel-Name", channel->name);
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Unique-ID", switch_core_session_get_uuid(channel->session));
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Call-Direction",
switch_channel_test_flag(channel, CF_OUTBOUND) ? "outbound" : "inbound");
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)) {
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Answer-State", "answered");
} else if (switch_channel_test_flag(channel, CF_EARLY_MEDIA)) {
@ -1230,8 +1232,13 @@ SWITCH_DECLARE(void) switch_channel_event_set_basic_data(switch_channel_t *chann
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Channel-State-Number", state_num);
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Channel-Name", switch_channel_get_name(channel));
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Unique-ID", switch_core_session_get_uuid(channel->session));
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Call-Direction",
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");
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Call-Direction", switch_channel_test_flag(channel, CF_OUTBOUND) ? "outbound" : "inbound");
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)) {

View File

@ -269,8 +269,6 @@ SWITCH_DECLARE(switch_call_cause_t) switch_core_session_outgoing_channel(switch_
switch_assert(channel != NULL);
switch_channel_set_flag(channel, CF_OUTBOUND);
forwardvar = switch_channel_get_variable(channel, SWITCH_MAX_FORWARDS_VARIABLE);
if (!switch_strlen_zero(forwardvar)) {
forwardval = atoi(forwardvar) - 1;
@ -1100,12 +1098,12 @@ SWITCH_DECLARE(switch_core_session_t *) switch_core_session_request_uuid(switch_
abort();
}
switch_channel_init(session->channel, session, CS_NEW, 0);
if (direction == SWITCH_CALL_DIRECTION_OUTBOUND) {
switch_channel_set_flag(session->channel, CF_OUTBOUND);
}
switch_channel_init(session->channel, session, CS_NEW, 0);
/* The session *IS* the pool you may not alter it because you have no idea how
its all private it will be passed to the thread run function */

View File

@ -285,7 +285,7 @@ static void core_event_handler(switch_event_t *event)
switch_event_get_header_nil(event, "channel-state"),
switch_event_get_header_nil(event, "caller-dialplan"),
switch_event_get_header_nil(event, "caller-context")
);
);
break;
case SWITCH_EVENT_CODEC:
sql =