提交 88a6ac2f authored 作者: Anthony Minessale's avatar Anthony Minessale

FS-3170 this was specific to the user channel which is not a real channel in…

FS-3170 this was specific to the user channel which is not a real channel in every sense of the word as it has no running thread or any usable state changes so this new line of code in 233d3164 to wait for the state machine to stabalize before returning from originate caused an issue with user/ channels
上级 72f52aae
......@@ -1562,6 +1562,10 @@ SWITCH_DECLARE(switch_channel_state_t) switch_channel_get_running_state(switch_c
SWITCH_DECLARE(int) switch_channel_state_change_pending(switch_channel_t *channel)
{
if (switch_channel_down(channel) || !switch_core_session_in_thread(channel->session)) {
return 0;
}
return channel->running_state != channel->state;
}
......
......@@ -3625,7 +3625,12 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
}
}
while(switch_channel_get_state(bchan) != switch_channel_get_running_state(bchan) && switch_channel_up(bchan)) switch_cond_next();
while(switch_channel_state_change_pending(bchan)) {
switch_cond_next();
}
switch_ivr_sleep(*bleg, 0, SWITCH_TRUE, NULL);
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论