summaryrefslogtreecommitdiff
path: root/misc/freeswitch/scripts
diff options
context:
space:
mode:
authorspag <spag@golwen.net>2013-01-18 12:13:11 +0100
committerspag <spag@golwen.net>2013-01-18 12:13:11 +0100
commitc7d5128985e4f4480068f467ad8efafdc7f7b7ed (patch)
tree7e91a4b3f44fdb1ad0116716c33a6f83b48a17db /misc/freeswitch/scripts
parent3a91509c6c668cc634d667a2e1c7144873a39861 (diff)
configuration.sip removed
Diffstat (limited to 'misc/freeswitch/scripts')
-rw-r--r--misc/freeswitch/scripts/configuration.lua9
1 files changed, 4 insertions, 5 deletions
diff --git a/misc/freeswitch/scripts/configuration.lua b/misc/freeswitch/scripts/configuration.lua
index 1162e97..92ae7d8 100644
--- a/misc/freeswitch/scripts/configuration.lua
+++ b/misc/freeswitch/scripts/configuration.lua
@@ -312,10 +312,9 @@ function directory_sip_account(database)
if string.len(auth_name) > 3 and auth_name:sub(1, 3) == 'gw+' then
local gateway_name = auth_name:sub(4);
domain = domain or freeswitch.API():execute('global_getvar', 'domain');
- require 'configuration.sip'
- log:notice('DATABASE: ', database);
- local sip_gateway = configuration.sip.Sip:new{ log = log, database = database}:find_gateway_by_name(gateway_name);
- if sip_gateway ~= nil and next(sip_gateway) ~= nil then
+ require 'common.gateway'
+ local sip_gateway = common.gateway.Gateway:new{ log = self.log, database = self.database }:find_by_name(gateway_name);
+ if sip_gateway then
log:debug('DIRECTORY_GATEWAY - name: ', gateway_name, ', auth_name: ', auth_name);
local user_variables = {
@@ -332,7 +331,7 @@ function directory_sip_account(database)
'params',
xml:element{
'param',
- password = sip_gateway.password,
+ password = sip_gateway.record.password,
}
},
xml:element{