summaryrefslogtreecommitdiff
path: root/misc/freeswitch/scripts/dialplan
diff options
context:
space:
mode:
authorspag <spag@golwen.net>2013-02-07 15:12:49 +0100
committerspag <spag@golwen.net>2013-02-07 15:12:49 +0100
commit3ea1b7bf7b808a88c6d5f05ea9c5071a5fcfb082 (patch)
tree801d0c78c798b41ca8dea09b07247605a3348819 /misc/freeswitch/scripts/dialplan
parentfa243f49c53d05c8b5510cd6ba062517cbc952cf (diff)
rudimentary call parking added
Diffstat (limited to 'misc/freeswitch/scripts/dialplan')
-rw-r--r--misc/freeswitch/scripts/dialplan/functions.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/misc/freeswitch/scripts/dialplan/functions.lua b/misc/freeswitch/scripts/dialplan/functions.lua
index 32fad78..4430be1 100644
--- a/misc/freeswitch/scripts/dialplan/functions.lua
+++ b/misc/freeswitch/scripts/dialplan/functions.lua
@@ -111,6 +111,8 @@ function Functions.dialplan_function(self, caller, dialed_number)
result = "+" .. tostring(parameters[3]);
elseif fid == "hangup" then
result = self:hangup(caller, parameters[3], parameters[4]);
+ elseif fid == "park" then
+ result = self:park(caller, parameters[3]);
end
return result;
@@ -911,3 +913,9 @@ function Functions.hangup(self, caller, code, phrase)
self.log:info("FUNCTION_HANGUP code: ", code, ', phrase: ', phrase);
return { continue = false, code = code, phrase = phrase:gsub('_', ' '), no_cdr = true }
end
+
+function Functions.park(self, caller, lot)
+ self.log:info("FUNCTION_PARK lot: ", lot);
+ caller:execute("valet_park", 'valet_lot ' .. lot);
+ return { continue = false, code = 200, phrase = 'OK', no_cdr = true }
+end