ivr_machine.dsl
4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
library
preprocessor digression machine
{
conditions { on #messageHasIntent("robot_marker") || #messageHasIntent("answering_machine") priority 110000; }
var visited = 0;
do
{
$cjm.push("machine_dig");
digression disable hello;
set $conversation_result = "автоответчик";
set $status = "wait_answer";
set digression.machine.visited += 1;
//if(digression.machine.visited == 2 || (digression.wait_answer.visited == 1 && digression.machine.visited == 1)) {goto do_before_exit;}
return;
//wait *;
}
transitions
{
do_before_exit: goto do_before_exit;
cantalk: goto fitness_not_qualified on timeout 5000;
bot: goto answering_machine on #messageHasIntent("robot_marker") || #messageHasIntent("answering_machine");
someone: goto fitness_not_qualified on true;
//maybe_bot: goto answering_machine on timeout 5000;
}
}
digression wait_answer // дигрессии
{
conditions
{
on #messageHasIntent("robot_marker") && digression.wait_answer.visited < 3 priority 110000;
}
var visited = 0;
do
{
$cjm.push("wait_answer_dig");
digression disable hello;
set $status = "wait_answer";
set digression.wait_answer.visited += 1;
wait *;
}
transitions
{
bot: goto answering_machine on #messageHasIntent("robot_marker");
someone: goto fitness_not_qualified on true;
maybe_bot: goto answering_machine on timeout 10000;
}
}
digression ivr // дигрессии
{
conditions
{
on #messageHasIntent("robot_marker") && digression.wait_answer.visited == 0 && digression.ivr.visited < 3 priority 110000;
}
var visited = 0;
do
{
$cjm.push("ivr_dig");
set $status = "ivr";
set digression.ivr.visited += 1;
set $conversation_result = "автоответчик";
return;
}
transitions
{
}
}
node fitness_not_qualified
{
do
{
$cjm.push("fitness_not_qualified");
#say("greetings");
digression enable {repeat, hello};
#waitingMode(duration: 2000);
wait *;
}
transitions
{
targeted_action_vm_botmachine: goto answering_machine on #messageHasIntent("robot_marker");
bot: goto its_machine on #messageHasIntent("robot_marker");
/* what_webinar: goto webinar_name on #messageHasIntent("what_webinar");
other: goto been_at_webinar on #messageHasAnyIntent(["what_question",
"who_are_you",
"where_my_number"]);
positive: goto been_at_webinar on #messageHasAnyIntent(["accept", "may_continue"]) || #messageHasSentiment("positive");
negative: goto call_later on #messageHasAnyIntent(["decline", "cant_talk_rn"]) || #messageHasSentiment("negative"); */
}
}
node its_machine
{
do
{
$cjm.push("its_machine");
set $status = "voice_menu";
wait *;
}
transitions
{
//someone: goto fitness_not_qualified on #messageHasIntent("can_you_hear_me") priority -100;
bot: goto answering_machine on #messageHasIntent("robot_marker");
someone: goto fitness_not_qualified on true;
maybe_bot: goto answering_machine on timeout 5000;
//targeted_action_vm_nqa_1: goto fitness_not_qualified on true;
}
}
node answering_machine
{
do
{
$cjm.push("answering_machine");
//#waitingMode(duration: 1500);
digression disable {repeat, dont_understand, can_hear_you};
set $status = "answering_machine";
goto do_before_exit;
//exit;
}
transitions
{
do_before_exit: goto do_before_exit;
//targeted_action_bot_yes: goto fitness_validation_yes;
//off_target_action_am: goto root;
}
onexit
{
default: do
{
set $conversation_result = "автоответчик";
}
}
}