mirror of https://github.com/sipwise/sems.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
771 B
33 lines
771 B
|
|
initial state START
|
|
enter {
|
|
playPrompt(hello);
|
|
DI(user_timer, setTimer, (int)1, (int)5, @local_tag);
|
|
DI(user_timer, setTimer, (int)2, (int)20, @local_tag);
|
|
recordFile(/tmp/test_rec.wav);
|
|
};
|
|
|
|
state ADDKEY;
|
|
state FIN;
|
|
|
|
transition "start pin entry" START - / set($pin = "") -> ADDKEY;
|
|
|
|
transition "play from timer" ADDKEY - timerTest(#id == 1) / {
|
|
playPrompt(hello);
|
|
stopRecord();
|
|
closePlaylist();
|
|
playFile("/tmp/test_rec.wav");
|
|
}
|
|
-> ADDKEY;
|
|
|
|
transition "add a key" ADDKEY - keyTest(#key < 10) /
|
|
{
|
|
append($pin, #key);
|
|
playPrompt(#key);
|
|
} -> ADDKEY;
|
|
|
|
transition "timeout stop it" ADDKEY - timerTest(#id == 2) / stop(true) -> FIN;
|
|
|
|
transition finished ADDKEY - keyTest(#key > 9) / playPrompt(entering) -> FIN;
|
|
|