summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-03-12 13:18:23 +0100
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-03-12 13:18:23 +0100
commitb08abf797d8e476e07a89e40f43cddef32039dfb (patch)
tree28df141f552caa77eaa15db65e8856fcef06c2da
parentf788a35cd1a70ba08effb3807bbb313744324c85 (diff)
parent4332fb65f80b02707df15d5febd6e8fd30d1605b (diff)
Merge branch 'develop' of github.com:amooma/GS5 into develop
-rw-r--r--misc/freeswitch/scripts/dialplan/fax.lua4
-rw-r--r--misc/freeswitch/scripts/send_fax.lua6
2 files changed, 8 insertions, 2 deletions
diff --git a/misc/freeswitch/scripts/dialplan/fax.lua b/misc/freeswitch/scripts/dialplan/fax.lua
index 6dce0a9..dc52d16 100644
--- a/misc/freeswitch/scripts/dialplan/fax.lua
+++ b/misc/freeswitch/scripts/dialplan/fax.lua
@@ -231,8 +231,8 @@ function Fax.insert_document(self, record)
return self.database:query(sql_query);
end
-function Fax.trigger_notification(self, fax_document_id, uuid)
- local command = 'http_request.lua ' .. uuid .. ' http://127.0.0.1/trigger/fax?fax_account_id=' .. tostring(fax_document_id);
+function Fax.trigger_notification(self, fax_account_id, uuid)
+ local command = 'http_request.lua ' .. uuid .. ' http://127.0.0.1/trigger/fax?fax_account_id=' .. tostring(fax_account_id);
require 'common.fapi'
return common.fapi.FApi:new():execute('luarun', command);
diff --git a/misc/freeswitch/scripts/send_fax.lua b/misc/freeswitch/scripts/send_fax.lua
index d717f93..ded8c65 100644
--- a/misc/freeswitch/scripts/send_fax.lua
+++ b/misc/freeswitch/scripts/send_fax.lua
@@ -173,6 +173,12 @@ if session and session:answered() then
cause = session:hangupCause();
log:info('FAX_SEND - end - fax_document=', fax_document.id, ', success: ', fax_state.state, ', cause: ', cause, ', result: ', fax_state.result_code, ' ', session:getVariable('fax_result_text'));
+
+ local command = 'http_request.lua sendfax http://127.0.0.1/trigger/fax_has_been_sent/' .. tostring(fax_document.id);
+
+ require 'common.fapi'
+ common.fapi.FApi:new():execute('luarun', command);
+
else
if session then
cause = session:hangupCause();