+-- Add Google accounts to all valid accounts, and accounts valid for incoming and outgoing calls.
+m.uci:foreach(googlemodulename, "gtalk_jabber",
+ function(s1)
+ -- Add this provider to list of valid accounts.
+ if s1.username ~= nil and s1.name ~= nil then
+ allvalidaccounts[s1.name] = s1.username
+
+ if s1.make_outgoing_calls == "yes" then
+ -- Add provider to the associative array of valid outgoing accounts.
+ validoutaccounts[s1.name] = s1.username
+ end
+
+ if s1.register == "yes" then
+ -- Add provider to the associative array of valid outgoing accounts.
+ validinaccounts[s1.name] = s1.username
+ end
+ end
+ end)
+
+-- Add SIP accounts to all valid accounts, and accounts valid for incoming and outgoing calls.
+m.uci:foreach(voipmodulename, "voip_provider",
+ function(s1)
+ -- Add this provider to list of valid accounts.
+ if s1.defaultuser ~= nil and s1.host ~= nil and s1.name ~= nil then
+ allvalidaccounts[s1.name] = s1.defaultuser .. "@" .. s1.host
+
+ if s1.make_outgoing_calls == "yes" then
+ -- Add provider to the associative array of valid outgoing accounts.
+ validoutaccounts[s1.name] = s1.defaultuser .. "@" .. s1.host
+ end
+
+ if s1.register == "yes" then
+ -- Add provider to the associative array of valid outgoing accounts.
+ validinaccounts[s1.name] = s1.defaultuser .. "@" .. s1.host
+ end
+ end
+ end)
+