summaryrefslogtreecommitdiff
path: root/misc/freeswitch/scripts
diff options
context:
space:
mode:
authorPeter Kozak <spag@golwen.net>2013-03-12 08:10:33 -0400
committerPeter Kozak <spag@golwen.net>2013-03-12 08:10:33 -0400
commitf2d1e7e2d7d0a9c92134bf1d20a61a45495e12da (patch)
tree4c060202c9298a5f27f308cbb337ca0058bb3530 /misc/freeswitch/scripts
parent6d769f037d00f0ab52e5b50f31f3319e5a9fb00b (diff)
trigger url after sending
Diffstat (limited to 'misc/freeswitch/scripts')
-rw-r--r--misc/freeswitch/scripts/send_fax.lua6
1 files changed, 6 insertions, 0 deletions
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();