put transfer_source in a variable too
This commit is contained in:
parent
4943f68208
commit
2e6b55810f
|
@ -132,6 +132,7 @@ SWITCH_BEGIN_EXTERN_C
|
||||||
#define SWITCH_CURRENT_APPLICATION_VARIABLE "current_application"
|
#define SWITCH_CURRENT_APPLICATION_VARIABLE "current_application"
|
||||||
#define SWITCH_PROTO_SPECIFIC_HANGUP_CAUSE_VARIABLE "proto_specific_hangup_cause"
|
#define SWITCH_PROTO_SPECIFIC_HANGUP_CAUSE_VARIABLE "proto_specific_hangup_cause"
|
||||||
#define SWITCH_TRANSFER_HISTORY_VARIABLE "transfer_history"
|
#define SWITCH_TRANSFER_HISTORY_VARIABLE "transfer_history"
|
||||||
|
#define SWITCH_TRANSFER_SOURCE_VARIABLE "transfer_source"
|
||||||
|
|
||||||
#define SWITCH_CHANNEL_EXECUTE_ON_ANSWER_VARIABLE "execute_on_answer"
|
#define SWITCH_CHANNEL_EXECUTE_ON_ANSWER_VARIABLE "execute_on_answer"
|
||||||
#define SWITCH_CHANNEL_EXECUTE_ON_PRE_ANSWER_VARIABLE "execute_on_pre_answer"
|
#define SWITCH_CHANNEL_EXECUTE_ON_PRE_ANSWER_VARIABLE "execute_on_pre_answer"
|
||||||
|
|
|
@ -5267,6 +5267,7 @@ static void mark_transfer_record(switch_core_session_t *session, const char *br_
|
||||||
switch_channel_get_variable(br_a_channel, dvar2));
|
switch_channel_get_variable(br_a_channel, dvar2));
|
||||||
|
|
||||||
switch_channel_add_variable_var_check(br_a_channel, SWITCH_TRANSFER_HISTORY_VARIABLE, cp->transfer_source, SWITCH_FALSE, SWITCH_STACK_PUSH);
|
switch_channel_add_variable_var_check(br_a_channel, SWITCH_TRANSFER_HISTORY_VARIABLE, cp->transfer_source, SWITCH_FALSE, SWITCH_STACK_PUSH);
|
||||||
|
switch_channel_set_variable(br_a_channel, SWITCH_TRANSFER_SOURCE_VARIABLE, cp->transfer_source);
|
||||||
|
|
||||||
switch_core_session_rwunlock(br_a_session);
|
switch_core_session_rwunlock(br_a_session);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1716,7 +1716,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_session_transfer(switch_core_session_
|
||||||
(long) switch_epoch_time_now(NULL), new_profile->uuid_str,
|
(long) switch_epoch_time_now(NULL), new_profile->uuid_str,
|
||||||
extension, use_context, use_dialplan);
|
extension, use_context, use_dialplan);
|
||||||
switch_channel_add_variable_var_check(channel, SWITCH_TRANSFER_HISTORY_VARIABLE, new_profile->transfer_source, SWITCH_FALSE, SWITCH_STACK_PUSH);
|
switch_channel_add_variable_var_check(channel, SWITCH_TRANSFER_HISTORY_VARIABLE, new_profile->transfer_source, SWITCH_FALSE, SWITCH_STACK_PUSH);
|
||||||
|
switch_channel_set_variable(channel, SWITCH_TRANSFER_SOURCE_VARIABLE, new_profile->transfer_source);
|
||||||
return SWITCH_STATUS_SUCCESS;
|
return SWITCH_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1586,6 +1586,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_uuid_bridge(const char *originator_uu
|
||||||
switch_core_session_get_uuid(originatee_session));
|
switch_core_session_get_uuid(originatee_session));
|
||||||
switch_channel_add_variable_var_check(originator_channel, SWITCH_TRANSFER_HISTORY_VARIABLE,
|
switch_channel_add_variable_var_check(originator_channel, SWITCH_TRANSFER_HISTORY_VARIABLE,
|
||||||
originator_cp->transfer_source, SWITCH_FALSE, SWITCH_STACK_PUSH);
|
originator_cp->transfer_source, SWITCH_FALSE, SWITCH_STACK_PUSH);
|
||||||
|
switch_channel_set_variable(originator_channel, SWITCH_TRANSFER_SOURCE_VARIABLE, originator_cp->transfer_source);
|
||||||
|
|
||||||
|
|
||||||
originatee_cp->transfer_source = switch_core_sprintf(originatee_cp->pool,
|
originatee_cp->transfer_source = switch_core_sprintf(originatee_cp->pool,
|
||||||
|
@ -1593,7 +1594,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_uuid_bridge(const char *originator_uu
|
||||||
switch_core_session_get_uuid(originator_session));
|
switch_core_session_get_uuid(originator_session));
|
||||||
switch_channel_add_variable_var_check(originatee_channel, SWITCH_TRANSFER_HISTORY_VARIABLE,
|
switch_channel_add_variable_var_check(originatee_channel, SWITCH_TRANSFER_HISTORY_VARIABLE,
|
||||||
originatee_cp->transfer_source, SWITCH_FALSE, SWITCH_STACK_PUSH);
|
originatee_cp->transfer_source, SWITCH_FALSE, SWITCH_STACK_PUSH);
|
||||||
|
switch_channel_set_variable(originatee_channel, SWITCH_TRANSFER_SOURCE_VARIABLE, originatee_cp->transfer_source);
|
||||||
|
|
||||||
/* change the states and let the chips fall where they may */
|
/* change the states and let the chips fall where they may */
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue