diff options
Diffstat (limited to 'kamailio-model.lua')
-rw-r--r-- | kamailio-model.lua | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/kamailio-model.lua b/kamailio-model.lua index f1ef074..cfc5c76 100644 --- a/kamailio-model.lua +++ b/kamailio-model.lua @@ -153,11 +153,11 @@ end -- ################################################################################ -- PUBLIC FUNCTIONS -function get_startstop(clientdata) +function get_startstop(self, clientdata) return modelfunctions.get_startstop(processname) end -function startstop_service(startstop, action) +function startstop_service(self, startstop, action) return modelfunctions.startstop_service(startstop, action) end @@ -169,8 +169,8 @@ function get_filedetails(filename) return modelfunctions.getfiledetails(filename, is_valid_filename) end -function update_filedetails(filedetails) - return modelfunctions.setfiledetails(filedetails, is_valid_filename) +function update_filedetails(self, filedetails) + return modelfunctions.setfiledetails(self, filedetails, is_valid_filename) end function reloadplan() @@ -248,7 +248,7 @@ function get_new_user() return cfe({type="group", value=user, label="Kamailio User"}) end -function create_new_user(user) +function create_new_user(self, user) local success = validate_user(user) if success then local cmd = path .. "kamctl add "..format.escapespecialcharacters(user.value.username.value).." "..format.escapespecialcharacters(user.value.password.value) @@ -287,7 +287,7 @@ function get_user(username) return user end -function update_user(user) +function update_user(self, user) local success = validate_user(user) if success then local cmd = path .. "kamctl passwd "..format.escapespecialcharacters(user.value.username.value).." "..format.escapespecialcharacters(user.value.password.value) @@ -385,11 +385,11 @@ function get_table_entry(table, id) return cfe({ type="group", value=retval, label="Database Table Entry", errtxt=errtxt }) end -function create_table_entry(entry) - return update_table_entry(entry, true) +function create_table_entry(self, entry, action) + return update_table_entry(self, entry, action, true) end -function update_table_entry(entry, create) +function update_table_entry(self, entry, action, create) local success = true local errtxt -- Validate the settings |