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.
sems/doc/dsm/examples/test_dbfile.dsm

15 lines
616 B

import(mod_mysql);
initial state lobby
enter {
mysql.connect(mysql://root:sa07@localhost/sems);
mysql.putFileToDB('INSERT INTO audio (application,message,audio) VALUES ("test","testmessage","__FILE__")', wav/welcome.wav);
mysql.playDBAudio(SELECT audio FROM audio WHERE id=$db.insert_id, anything.wav);
mysql.getFileFromDB(SELECT audio FROM audio WHERE id=$db.insert_id, /tmp/retrieved.wav);
};
transition "error" lobby - test($errno!="") / stop(true) -> end;
transition "audio ends" lobby - noAudioTest / stop(true) -> end;
transition "bye recvd" lobby - hangup / stop(false) -> end;
state end;