From fa7d8880c101118412b15161b774d21fa230f592 Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Tue, 12 Mar 2013 04:18:21 -0400 Subject: playback method added --- misc/freeswitch/scripts/dialplan/session.lua | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'misc/freeswitch/scripts/dialplan/session.lua') diff --git a/misc/freeswitch/scripts/dialplan/session.lua b/misc/freeswitch/scripts/dialplan/session.lua index 7de85ca..04d7675 100644 --- a/misc/freeswitch/scripts/dialplan/session.lua +++ b/misc/freeswitch/scripts/dialplan/session.lua @@ -226,3 +226,8 @@ function Session.expand_variables(self, line) return self.session:getVariable(captured) or ''; end)) end + + +function Session.playback(self, file) + self.session:streamFile(file); +end -- cgit v1.2.3 From 03a81f194a356a9228be357bad1101060af62cb1 Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Tue, 12 Mar 2013 06:54:27 -0400 Subject: save last destination --- misc/freeswitch/scripts/dialplan/session.lua | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'misc/freeswitch/scripts/dialplan/session.lua') diff --git a/misc/freeswitch/scripts/dialplan/session.lua b/misc/freeswitch/scripts/dialplan/session.lua index 04d7675..78be98e 100644 --- a/misc/freeswitch/scripts/dialplan/session.lua +++ b/misc/freeswitch/scripts/dialplan/session.lua @@ -58,6 +58,13 @@ function Session.init_channel_variables(self) self.node_id = self:to_i('sip_h_X-GS_node_id'); self.loop_count = self:to_i('sip_h_X-GS_loop_count'); + self.previous_destination_type = self:to_s('gs_destination_type'); + self.previous_destination_id = self:to_i('gs_destination_id'); + self.previous_destination_uuid = self:to_s('gs_destination_uuid'); + self.previous_destination_owner_type = self:to_s('gs_destination_owner_type'); + self.previous_destination_owner_id = self:to_i('gs_destination_owner_id'); + self.previous_destination_owner_uuid = self:to_s('gs_destination_owner_uuid'); + if self.node_id > 0 and self.node_id ~= self.local_node_id then self.from_node = true; else -- cgit v1.2.3 From a13f3ef5cfdf4c5bd2e08073603f0529eb2f16b1 Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Sat, 23 Mar 2013 18:17:25 +0100 Subject: answered query method added --- misc/freeswitch/scripts/dialplan/session.lua | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'misc/freeswitch/scripts/dialplan/session.lua') diff --git a/misc/freeswitch/scripts/dialplan/session.lua b/misc/freeswitch/scripts/dialplan/session.lua index 78be98e..9c43e74 100644 --- a/misc/freeswitch/scripts/dialplan/session.lua +++ b/misc/freeswitch/scripts/dialplan/session.lua @@ -173,6 +173,12 @@ function Session.answer(self) return self.session:answer(); end +-- Is answered? +function Session.answered(self) + return self.session:answered(); +end + + function Session.intercept(self, uid) self.session:execute("intercept", uid); end -- cgit v1.2.3