diff options
author | Ted Trask <ttrask01@yahoo.com> | 2009-11-05 15:27:43 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2009-11-05 15:27:43 +0000 |
commit | 5261ae2fa86ae090a2923b502646aa03c6a275a9 (patch) | |
tree | 4bc0f92f7d8b0a844197d3bab6c1c9879b82cf0d /kamailio-controller.lua | |
download | acf-kamailio-0.1.0.tar.bz2 acf-kamailio-0.1.0.tar.xz |
First cut at kamailio ACF. Just status, listfiles, edit, startstop.v0.1.0
Diffstat (limited to 'kamailio-controller.lua')
-rw-r--r-- | kamailio-controller.lua | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/kamailio-controller.lua b/kamailio-controller.lua new file mode 100644 index 0000000..45a8fd7 --- /dev/null +++ b/kamailio-controller.lua @@ -0,0 +1,22 @@ +module(..., package.seeall) + +-- Load libraries +require("controllerfunctions") + +default_action = "status" + +function status(self) + return self.model.getstatus() +end + +function startstop(self) + return controllerfunctions.handle_startstop(self, self.model.startstop_service, self.clientdata) +end + +function listfiles(self) + return self.model.list_files() +end + +function edit(self) + return controllerfunctions.handle_form(self, function() return self.model.get_filedetails(self.clientdata.filename) end, self.model.update_filedetails, self.clientdata, "Save", "Edit File", "File Saved") +end |