]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
[mod_loopback] fix early_set_loopback_id for b leg
authorlazedo <luis.azedo@factorlusitano.com>
Mon, 11 Nov 2019 18:14:39 +0000 (18:14 +0000)
committerAndrey Volk <andywolk@gmail.com>
Wed, 6 May 2020 22:10:30 +0000 (02:10 +0400)
src/mod/endpoints/mod_loopback/mod_loopback.c

index 29391e024f05a14f9b3a42a60d8b8c6a190b035f..347ac52abcb329c8f49c2f6aa20d52375d6432ba 100644 (file)
@@ -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);