abstract out originate_signal_bond to a function to avoid confustion and regressions

This commit is contained in:
Anthony Minessale committed 2012-05-29 13:10:15 -05:00
1 parent 4d8cdb3276
commit 8bb55ed4bf
27 files changed
+98 -90

No files matched your search

@@ -1536,7 +1536,7 @@ static void *SWITCH_THREAD_FUNC outbound_agent_thread_run(switch_thread_t *threa
/* Wait for the real channel to be fully bridged */
switch_channel_wait_for_flag(other_loopback_channel, CF_BRIDGED, SWITCH_TRUE, 5000, member_channel);
real_uuid = switch_channel_get_variable(other_loopback_channel, SWITCH_SIGNAL_BOND_VARIABLE);
real_uuid = switch_channel_get_partner_uuid(other_loopback_channel);
switch_channel_set_variable(other_loopback_channel, "cc_member_pre_answer_uuid", NULL);
/* Switch the agent session */
@@ -3439,7 +3439,7 @@ SWITCH_STANDARD_API(break_function)
channel = switch_core_session_get_channel(psession);
if (both) {
const char *quuid = switch_channel_get_variable(channel, SWITCH_SIGNAL_BOND_VARIABLE);
const char *quuid = switch_channel_get_partner_uuid(channel);
if (quuid && (qsession = switch_core_session_locate(quuid))) {
qchannel = switch_core_session_get_channel(qsession);
}
@@ -974,7 +974,7 @@ SWITCH_STANDARD_APP(transfer_function)
if (bleg || both) {
const char *uuid;
switch_channel_t *channel = switch_core_session_get_channel(session);
if ((uuid = switch_channel_get_variable(channel, SWITCH_SIGNAL_BOND_VARIABLE))) {
if ((uuid = switch_channel_get_partner_uuid(channel))) {
switch_core_session_t *b_session;
if ((b_session = switch_core_session_locate(uuid))) {
switch_ivr_session_transfer(b_session, argv[1], argv[2], argv[3]);
@@ -2149,7 +2149,7 @@ SWITCH_STANDARD_APP(att_xfer_function)
channel = switch_core_session_get_channel(session);
if ((bond = switch_channel_get_variable(channel, SWITCH_SIGNAL_BOND_VARIABLE))) {
if ((bond = switch_channel_get_partner_uuid(channel))) {
bond = switch_core_session_strdup(session, bond);
}
@@ -3570,13 +3570,8 @@ SWITCH_STANDARD_APP(pickup_function)
caller_profile->callee_id_number = num;
if (switch_event_create(&event, SWITCH_EVENT_CALL_UPDATE) == SWITCH_STATUS_SUCCESS) {
const char *uuid = switch_channel_get_variable(channel, SWITCH_SIGNAL_BOND_VARIABLE);
const char *uuid = switch_channel_get_partner_uuid(channel);
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Direction", "RECV");
if (!uuid) {
uuid = switch_channel_get_variable(channel, "originate_signal_bond");
}
if (uuid) {
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Bridged-To", uuid);
@@ -287,7 +287,7 @@ static void transfer_call(switch_core_session_t *session, char *destination)
switch_separate_string(mydup, ' ', argv, (sizeof(argv) / sizeof(argv[0])));
/* Find the uuid of our B leg. If it exists, transfer it first */
if ((uuid = switch_channel_get_variable(channel, SWITCH_SIGNAL_BOND_VARIABLE))) {
if ((uuid = switch_channel_get_partner_uuid(channel))) {
switch_core_session_t *b_session;
/* Get info on the B leg */
@@ -618,7 +618,7 @@ SWITCH_STANDARD_APP(valet_parking_function)
char tmp[512] = "";
switch_snprintf(tmp, sizeof(tmp), "%s:%s", lot_name, ext);
if ((uuid = switch_channel_get_variable(channel, SWITCH_SIGNAL_BOND_VARIABLE))) {
if ((uuid = switch_channel_get_partner_uuid(channel))) {
switch_core_session_t *b_session;
if ((b_session = switch_core_session_locate(uuid))) {