summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorspag <spag@golwen.net>2013-01-09 19:26:53 +0100
committerspag <spag@golwen.net>2013-01-09 19:26:53 +0100
commitc317b518e0431db624f5e8e66aa00e7d0ff1a291 (patch)
tree6b2cafafc7b8045e175bafe499941ceafaa6ab3c
parent9c15b1dfd6057cbfde8c6a5c8d90a35073ec5dca (diff)
set default odbc dsn
-rw-r--r--misc/freeswitch/scripts/configuration.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/misc/freeswitch/scripts/configuration.lua b/misc/freeswitch/scripts/configuration.lua
index d7fd105..d0e2268 100644
--- a/misc/freeswitch/scripts/configuration.lua
+++ b/misc/freeswitch/scripts/configuration.lua
@@ -47,6 +47,11 @@ function profile(database, sofia_ini, profile_name, index, domains, node_id)
log:error('SOFIA_PROFILE ', index,' - name: ', profile_name, ' - no parameters');
return '';
end
+
+ if tostring(profile_parameters['odbc-dsn']) == 'default' then
+ profile_parameters['odbc-dsn'] = 'gemeinschaft:' .. tostring(database.user_name) .. ':' .. tostring(database.password);
+ end
+
-- set local bind address
if domains[index] then
profile_parameters['sip-ip'] = domains[index]['host'];