From c7d5128985e4f4480068f467ad8efafdc7f7b7ed Mon Sep 17 00:00:00 2001 From: spag Date: Fri, 18 Jan 2013 12:13:11 +0100 Subject: configuration.sip removed --- misc/freeswitch/scripts/configuration.lua | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'misc/freeswitch') 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{ -- cgit v1.2.3