summaryrefslogtreecommitdiff
path: root/misc/freeswitch/scripts/dialplan/dialplan.lua
diff options
context:
space:
mode:
authorspag <spag@golwen.net>2013-01-12 09:02:59 +0100
committerspag <spag@golwen.net>2013-01-12 09:02:59 +0100
commitce5a4c9dc44a3793f336e454f63994fb4990a618 (patch)
tree2ed255a903786e46149f3d718a4818bd0866c2c7 /misc/freeswitch/scripts/dialplan/dialplan.lua
parent393428c8551f9c8180bb31e6f7c3101c62c8828e (diff)
set dialplan variables
Diffstat (limited to 'misc/freeswitch/scripts/dialplan/dialplan.lua')
-rw-r--r--misc/freeswitch/scripts/dialplan/dialplan.lua12
1 files changed, 6 insertions, 6 deletions
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();