diff options
author | spag <spag@golwen.net> | 2013-01-09 12:40:36 +0100 |
---|---|---|
committer | spag <spag@golwen.net> | 2013-01-09 12:40:36 +0100 |
commit | a93f71d0c74c51ef744ed9a0b7152ca20160420e (patch) | |
tree | c7d1831b13872f3f4eb34eb6e41451438fc355aa /misc/freeswitch/scripts/configuration | |
parent | c05c78f1eaa2cbfff68f15287d6bb62cdd6f3a54 (diff) |
db based configuration
Diffstat (limited to 'misc/freeswitch/scripts/configuration')
-rw-r--r-- | misc/freeswitch/scripts/configuration/freeswitch_xml.lua | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/misc/freeswitch/scripts/configuration/freeswitch_xml.lua b/misc/freeswitch/scripts/configuration/freeswitch_xml.lua index c81bf50..5f4602c 100644 --- a/misc/freeswitch/scripts/configuration/freeswitch_xml.lua +++ b/misc/freeswitch/scripts/configuration/freeswitch_xml.lua @@ -13,11 +13,11 @@ function FreeSwitchXml.new(self, object) end function FreeSwitchXml.param(self, name, value) - return '<param name="' .. name .. '" value="' .. value .. '"/>' + return '<param name="' .. tostring(name) .. '" value="' .. tostring(value) .. '"/>' end function FreeSwitchXml.variable(self, name, value) - return '<variable name="' .. name .. '" value="' .. value .. '"/>' + return '<variable name="' .. tostring(name) .. '" value="' .. tostring(value) .. '"/>' end function FreeSwitchXml.document(self, sections_xml) @@ -78,9 +78,8 @@ function FreeSwitchXml.group_default(self, entries_xml) return xml_string end -function FreeSwitchXml.user(self, user) - require 'common.configuration_file' - local params = common.configuration_file.get('/opt/freeswitch/scripts/ini/sip_accounts.ini', 'parameters'); +function FreeSwitchXml.user(self, user, params) + params = params or {}; params['password'] = user.password; params['vm-password'] = user.voicemail_pin; |