summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--misc/freeswitch/scripts/configuration.lua9
1 files changed, 8 insertions, 1 deletions
diff --git a/misc/freeswitch/scripts/configuration.lua b/misc/freeswitch/scripts/configuration.lua
index 062cf5d..18f4ef2 100644
--- a/misc/freeswitch/scripts/configuration.lua
+++ b/misc/freeswitch/scripts/configuration.lua
@@ -134,9 +134,16 @@ function conf_sofia(database)
require 'configuration.sip'
local domains = configuration.sip.Sip:new{ log = log, database = database}:domains();
- sofia_profiles_xml = '';
+ local sofia_profiles = {};
for profile_name, index in pairs(sofia_ini.profiles) do
if tonumber(index) and tonumber(index) > 0 then
+ sofia_profiles[index] = profile_name;
+ end
+ end
+
+ local sofia_profiles_xml = '';
+ for index, profile_name in ipairs(sofia_profiles) do
+ if tonumber(index) and tonumber(index) > 0 then
sofia_profiles_xml = sofia_profiles_xml .. profile(database, sofia_ini, profile_name, tonumber(index), domains, local_node_id);
end
end