switch_channel_caller_extension_masquerade(channel, other_channel, 0);
switch_channel_set_state(other_channel, CS_RESET);
- switch_channel_wait_for_state(other_channel, other_channel, CS_RESET);
+ switch_channel_wait_for_state(other_channel, NULL, CS_RESET);
switch_channel_set_variable(channel, "process_cdr", "false");
switch_channel_set_variable(b_channel, "process_cdr", "false");
switch_channel_hangup(channel, SWITCH_CAUSE_NORMAL_CLEARING);
- switch_channel_hangup(b_channel, SWITCH_CAUSE_NORMAL_CLEARING);
switch_channel_set_state(other_channel, CS_EXECUTE);
switch_core_session_rwunlock(other_session);
}
if (other_channel) {
if (!switch_core_session_in_thread(session)) {
- switch_channel_wait_for_state(channel, channel, CS_PARK);
+ switch_channel_wait_for_state(channel, NULL, CS_PARK);
switch_channel_wait_for_flag(channel, CF_REQ_MEDIA, SWITCH_FALSE, 10000, NULL);
switch_channel_wait_for_flag(channel, CF_MEDIA_ACK, SWITCH_TRUE, 10000, NULL);
switch_channel_wait_for_flag(channel, CF_MEDIA_SET, SWITCH_TRUE, 10000, NULL);