switch_snprintf(name, sizeof(name), "loopback/%s-b", tech_pvt->caller_profile->destination_number);
switch_channel_set_name(b_channel, name);
if (loopback_globals.early_set_loopback_id) {
- switch_channel_set_variable(channel, "loopback_leg", "B");
- switch_channel_set_variable(channel, "is_loopback", "1");
+ switch_channel_set_variable(b_channel, "loopback_leg", "B");
+ switch_channel_set_variable(b_channel, "is_loopback", "1");
}
if (tech_init(b_tech_pvt, b_session, switch_core_session_get_read_codec(session)) != SWITCH_STATUS_SUCCESS) {
switch_channel_hangup(channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);