提交 0f8f7e82 authored 作者: Anthony Minessale's avatar Anthony Minessale

add loops var durning looped execution

上级 fcd00cb3
......@@ -620,6 +620,8 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_parse_event(switch_core_session_t *se
switch_channel_set_variable(channel, "app_uuid", event_uuid);
}
switch_channel_set_variable_printf(channel, "current_loop", "%d", x + 1);
switch_channel_set_variable_printf(channel, "total_loops", "%d", loops);
if (switch_core_session_execute_application(session, app_name, app_arg) != SWITCH_STATUS_SUCCESS) {
if (!inner || switch_channel_test_flag(channel, CF_STOP_BROADCAST)) switch_channel_clear_flag(channel, CF_BROADCAST);
......@@ -632,6 +634,9 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_parse_event(switch_core_session_t *se
}
}
switch_channel_set_variable(channel, "current_loop", NULL);
switch_channel_set_variable(channel, "total_loops", NULL);
if (b_uuid) {
if ((b_session = switch_core_session_locate(b_uuid))) {
switch_channel_t *b_channel = switch_core_session_get_channel(b_session);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论