Fax notifications

Status
Not open for further replies.

Patrick_S

Member
Oct 21, 2021
33
0
6
35
We recently upgraded to 5.0.2 and now our fax notifications for received faxes are not being emailed I checked the email queue and the do not even show there so it does not appear that they are stuck in the system it looks like they are not being sent at all. we still get fax confirmations for for faxes sent and voicemail to email notifications just not any notifications letting us know we received a fax.
 

Patrick_S

Member
Oct 21, 2021
33
0
6
35
fax queue is already installed so is email queue they work fore everything except for notifications that faxes are received
 

Patrick_S

Member
Oct 21, 2021
33
0
6
35
I looked at that link already and am not sure about the code what I have does not match either the before or after and it also mentions 2 directories that both have the same file in them I am not sure what to change.

this is from the DIR /usr/share/freeswitch/scripts/app/fax/resources/scripts/hangup_rx.lua
1661190114865.png

and this is from the DIR /var/www/fusionpbx/app/scripts/resources/scripts/app/fax/resources/scripts/hangup_rs.lua
1661190432795.png

both are the exact same and are both mentioned in that thread should I change them both?
 

Patrick_S

Member
Oct 21, 2021
33
0
6
35
So I need to change the code from what is posted above to the code that is in that link you posted? Sry if I am talking circles I am just not sure what bg_system is and do not want to break it further because it is a production server.
 

hamagid

Member
Dec 14, 2020
78
8
8
33
I think bg_system is executing the command in the background.

Is your hangup_rx.lua file the same as what is described in the post mentioned above?
 

Patrick_S

Member
Oct 21, 2021
33
0
6
35
everything in that section appears to be the same other that the last line that is in question and the first cmd is commented out in the older version Differences marked in Blue

--fax to email
-- cmd = "lua" .. " " .. quote(scripts_dir .. "/fax_to_email.lua") .. " ";
cmd = quote(shell_esc(php_dir).."/"..shell_esc(php_bin)).." "..quote(shell_esc(document_root).."/secure/fax_to_email.php").." ";
cmd = cmd .. "email="..quote(shell_esc(fax_email)).." ";
cmd = cmd .. "extension="..quote(shell_esc(fax_extension)).." ";
cmd = cmd .. "name="..quote(shell_esc(fax_file)).." ";
cmd = cmd .. "messages=" .. quote("result:"..shell_esc(fax_result_text).." sender:"..shell_esc(fax_remote_station_id).." pages:"..shell_esc(fax_document_total_pages)).." ";
cmd = cmd .. "domain="..quote(shell_esc(domain_name)).." ";
cmd = cmd .. "caller_id_name=" .. quote(shell_esc(caller_id_name) or '') .. " ";
cmd = cmd .. "caller_id_number=" .. quote(shell_esc(caller_id_number) or '') .. " ";
if #fax_forward_number > 0 then
cmd = cmd .. "fax_relay=true ";
else
cmd = cmd .. "fax_relay=false ";
end
if #fax_prefix > 0 then
cmd = cmd .. "fax_prefix=true ";
else
cmd = cmd .. "fax_prefix=false ";
end
freeswitch.consoleLog("notice", "[fax] command: " .. cmd .. "\n");
result = api:execute("system", cmd);

My Version 5.0.2
--fax to email
cmd = "lua" .. " " .. quote(scripts_dir .. "/fax_to_email.lua") .. " ";
cmd = quote(shell_esc(php_dir).."/"..shell_esc(php_bin)).." "..quote(shell_esc(document_root).."/secure/fax_to_email.php").." ";
cmd = cmd .. "email="..quote(shell_esc(fax_email)).." ";
cmd = cmd .. "extension="..quote(shell_esc(fax_extension)).." ";
cmd = cmd .. "name="..quote(shell_esc(fax_file)).." ";
cmd = cmd .. "messages=" .. quote("result:"..shell_esc(fax_result_text).." sender:"..shell_esc(fax_remote_station_id).." pages:"..shell_esc(fax_document_total_pages)).." ";
cmd = cmd .. "domain="..quote(shell_esc(domain_name)).." ";
cmd = cmd .. "caller_id_name=" .. quote(shell_esc(caller_id_name) or '') .. " ";
cmd = cmd .. "caller_id_number=" .. quote(shell_esc(caller_id_number) or '') .. " ";
if #fax_forward_number > 0 then
cmd = cmd .. "fax_relay=true ";
else
cmd = cmd .. "fax_relay=false ";
end
if #fax_prefix > 0 then
cmd = cmd .. "fax_prefix=true ";
else
cmd = cmd .. "fax_prefix=false ";
end
freeswitch.consoleLog("notice", "[fax] command: " .. cmd .. "\n");
result = api:executeString("bg_system "..cmd);
 

hamagid

Member
Dec 14, 2020
78
8
8
33
What is the command that it's printing when trying to send the fax?

You can look it up in the logs or watch it live in the CLI when testing a inbound fax.
 

Patrick_S

Member
Oct 21, 2021
33
0
6
35
I sent a fax then checked log Viewer and filtered by number it did not show any results I am not sure of the process to check by CLI
 
Status
Not open for further replies.