From ce019aa566d0b8c7bf1398325869fccee9368c5d Mon Sep 17 00:00:00 2001 From: lazedo Date: Mon, 11 Nov 2019 18:14:39 +0000 Subject: [PATCH] [mod_loopback] fix early_set_loopback_id for b leg --- src/mod/endpoints/mod_loopback/mod_loopback.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mod/endpoints/mod_loopback/mod_loopback.c b/src/mod/endpoints/mod_loopback/mod_loopback.c index 29391e024f..347ac52abc 100644 --- a/src/mod/endpoints/mod_loopback/mod_loopback.c +++ b/src/mod/endpoints/mod_loopback/mod_loopback.c @@ -271,8 +271,8 @@ static switch_status_t channel_on_init(switch_core_session_t *session) 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);