[mod_loopback] fix early_set_loopback_id for b leg

This commit is contained in:
lazedo 2019-11-11 18:14:39 +00:00 committed by Andrey Volk
parent 12f56e293d
commit ce019aa566
1 changed files with 2 additions and 2 deletions

View 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);