From ce5a4c9dc44a3793f336e454f63994fb4990a618 Mon Sep 17 00:00:00 2001 From: spag Date: Sat, 12 Jan 2013 09:02:59 +0100 Subject: set dialplan variables --- misc/freeswitch/scripts/dialplan/dialplan.lua | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'misc/freeswitch') diff --git a/misc/freeswitch/scripts/dialplan/dialplan.lua b/misc/freeswitch/scripts/dialplan/dialplan.lua index 0f3f59f..07b8f4f 100644 --- a/misc/freeswitch/scripts/dialplan/dialplan.lua +++ b/misc/freeswitch/scripts/dialplan/dialplan.lua @@ -466,10 +466,6 @@ function Dialplan.dial(self, destination) end end - if common.str.to_b(self.config.parameters.bypass_media) then - self.caller:set_variable('bypass_media', true); - end - require 'dialplan.sip_call' return dialplan.sip_call.SipCall:new{ log = self.log, database = self.database, caller = self.caller }:fork( destinations, @@ -866,9 +862,7 @@ end function Dialplan.run(self, destination) self.caller:set_variable('hangup_after_bridge', false); - self.caller:set_variable('ringback', self.config.parameters.ringback); self.caller:set_variable('bridge_early_media', 'true'); - self.caller:set_variable('send_silence_when_idle', 0); self.caller:set_variable('default_language', self.default_language); self.caller:set_variable('gs_save_cdr', true); self.caller:set_variable('gs_call_service', 'dial'); @@ -876,6 +870,12 @@ function Dialplan.run(self, destination) self.caller.date = os.date('%y%m%d%w'); self.caller.time = os.date('%H%M%S'); + if type(self.config.variables) == 'table' then + for key, value in pairs(self.config.variables) do + self.caller:set_variable(key, value); + end + end + self.routes = common.configuration_file.get('/opt/freeswitch/scripts/ini/routes.ini'); self.caller.domain_local = self.domain; self:retrieve_caller_data(); -- cgit v1.2.3