Get session data for the email headers
This commit is contained in:
parent
3336e1420a
commit
32b920b917
|
|
@ -1,6 +1,6 @@
|
|||
-- email.lua
|
||||
-- Part of FusionPBX
|
||||
-- Copyright (C) 2010 - 291 Mark J Crane <markjcrane@fusionpbx.com>
|
||||
-- Copyright (C) 2010 - 2022 Mark J Crane <markjcrane@fusionpbx.com>
|
||||
-- All rights reserved.
|
||||
--
|
||||
-- Redistribution and use in source and binary forms, with or without
|
||||
|
|
@ -59,6 +59,19 @@
|
|||
--replace the " with double quote
|
||||
body = body:gsub(""", [["]]);
|
||||
|
||||
--get sessions info
|
||||
if (session:ready()) then
|
||||
domain_uuid = session:getVariable("domain_uuid");
|
||||
domain_name = session:getVariable("domain_name");
|
||||
call_uuid = session:getVariable("uuid");
|
||||
headers = {
|
||||
["X-FusionPBX-Domain-UUID"] = domain_uuid;
|
||||
["X-FusionPBX-Domain-Name"] = domain_name;
|
||||
["X-FusionPBX-Email-Type"] = 'voicemail';
|
||||
["X-FusionPBX-Call-UUID"] = call_uuid;
|
||||
}
|
||||
end
|
||||
|
||||
--send the email
|
||||
if (file == nil) then
|
||||
send_mail(headers,
|
||||
|
|
|
|||
Loading…
Reference in New Issue