diff options
author | spag <spag@golwen.net> | 2013-01-29 11:07:57 +0100 |
---|---|---|
committer | spag <spag@golwen.net> | 2013-01-29 11:07:57 +0100 |
commit | e1e45b9d4859099ef314dda9101d1d59d4a91917 (patch) | |
tree | d88a99ccb7d2173d390cb1e62b3017f6b44c34cf | |
parent | f5cddb733550b16851a36b50f9b3f861c1f0de89 (diff) |
profiles order
-rw-r--r-- | misc/freeswitch/scripts/configuration.lua | 9 |
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 |