Fax not working

I have a new install 4.0.1-1 all phones and trunks work good, only the fax does not receive or send, I have Virtual Fax license installed and 5 other license’s. everything is configured the same as I had on the V3 server. when calling in I hear fax tone but it fails, when sending out a pdf I get error.

An exception has occurred
Exception: mkdir(): Permission denied at file /usr/share/vitalpbx/www/includes/virtual_faxes.php on line 0

Error Trace

File Function

1 /usr/share/vitalpbx/www/index.php:0 app\Core->run(…args);
2 /usr/share/vitalpbx/www/includes/app/Core.php:0 app\Core->_loadModule(…args);
3 /usr/share/vitalpbx/www/includes/app/Core.php:0 app\Core->loadModuleAction(…args);
4 /usr/share/vitalpbx/www/includes/app/Core.php:0 modules\fax_sending\fax_sending->put(…args);
5 /usr/share/vitalpbx/www/modules/fax_sending/fax_sending.php:0 vitalpbx\virtual_faxes->uploadOutboundFax(…args);
6 /usr/share/vitalpbx/www/includes/virtual_faxes.php:0 vitalpbx\virtual_faxes->buildFaxPath(…args);
7 /usr/share/vitalpbx/www/includes/virtual_faxes.php:0 mkdir(…args);
8 — {closure}(…args);

Could this be the issue, chown

-rw-r–r-- 1 www-data www-data 62572 Jan 28 12:00 utils.php
-rw-r–r-- 1 www-data www-data 3010 Dec 21 10:48 uuid.php
-rw-r–r-- 1 www-data www-data 40546 Dec 21 10:48 Validate.php
-rw-r–r-- 1 root root 8526 Dec 21 10:48 virtual_faxes.php
-rw-r–r-- 1 www-data www-data 3035 Nov 10 2021 vmgroup_member.php
-rw-r–r-- 1 www-data www-data 6289 Nov 10 2021 vmgroup.php
root@ptpbx4:/usr/share/vitalpbx/www/includes#

Did you restore from a backup from VitalPBX3 on your VitalPBX 4? or this is a clean installation with no restored data?

clean install, hand configured no backup restore.

I changed ownership of folder, then I also ran vitalpbx --check-integrity which gave this result, rebooted system but fax does not still work.

Issues Found:
Folder “/var/lib/vitalpbx/static/backup” didn’t exist (fixed up)
The folder or file “/var/lib/vitalpbx/static/backup” had the permissions 1325 instead of 2775 (fixed up)
The folder or file “/var/lib/vitalpbx/static/backup” had the owner “root” instead of “www-data” (fixed up)
The folder or file “/var/lib/vitalpbx/static/backup” had the group “root” instead of “www-data” (fixed up)
Folder “/var/lib/vitalpbx/static/fax” didn’t exist (fixed up)
The folder or file “/var/lib/vitalpbx/static/fax” had the permissions 1325 instead of 2775 (fixed up)
The folder or file “/var/lib/vitalpbx/static/fax” had the owner “root” instead of “www-data” (fixed up)
The folder or file “/var/lib/vitalpbx/static/fax” had the group “root” instead of “www-data” (fixed up)
The folder or file “/var/lib/vitalpbx/static/pictures” had the permissions 0775 instead of 2775 (fixed up)
Folder “/var/lib/vitalpbx/static/recordings” didn’t exist (fixed up)
The folder or file “/var/lib/vitalpbx/static/recordings” had the permissions 1325 instead of 2775 (fixed up)
The folder or file “/var/lib/vitalpbx/static/recordings” had the owner “root” instead of “www-data” (fixed up)
The folder or file “/var/lib/vitalpbx/static/recordings” had the group “root” instead of “www-data” (fixed up)

Execute the command below to fix the issue:

chown www-data:www-data /var/lib/vitalpbx/fax

Will this be fixed in the next version? Thanks

I changed chown as above but still not working, also now when trying to send out fax the caller ID name is missing so sip trunk provider blocks call, caller ID name was Ok before changes.

Are you still getting the permission error or this is a different error?

No error when sending, i think it fails because no caller id name, inbound fails as well.

Inside /var/lib/vitalpbx/fax I have this ?

root@ptpbx4:/var/lib/vitalpbx/fax# ls -l
total 12
drwxrwsr-x+ 2 asterisk www-data 4096 Jan 28 12:00 recvd
drwxrwsr-x+ 2 asterisk www-data 4096 Feb 10 13:42 sent
drwxrwxr-x+ 2 www-data www-data 4096 Feb 10 13:42 tmp
root@ptpbx4:/var/lib/vitalpbx/fax#

You should share a call log using pastebin!

I sent you a PM as logs have numbers for customers

I got the email. We will check it!

Question, are you using tenant trunks?

No tenants on system

It’s like it can’t create the TIFF file in recvd, are these permissions correct. I don’t know what the “s” is

root@ptpbx4:/var/lib/vitalpbx/fax# ls -l
total 12
drwxrwsr-x+ 2 asterisk www-data 4096 Jan 28 12:00 recvd
drwxrwsr-x+ 2 asterisk www-data 4096 Feb 10 13:42 sent
drwxrwxr-x+ 2 www-data www-data 4096 Feb 10 13:42 tmp
root@ptpbx4:/var/lib/vitalpbx/fax#

If this is an issue unique to my build I can create a new server and move licenses to it.

I have moved the fax license and routing back to Vitalpbx V3 until there is a fix for this issue, this issue could be a mistake on my part I’m just unsure but need this working for my customers.

We did some testing and realized that this is an issue of the Virtual Faxes add-on. We will fix it in the next update!

2 Likes

This seems to be fixed. Thanks.

1 Like

This morning the fax stopped working, no incomming or outgoing. Is there a way to check if the service is running, I tried systemctl status fax.service but thats not correct.

Distro Debian GNU/Linux 11 (bullseye)
Kernel 5.10.0-26-amd64
PBX Engine 18.19.0
@xxxxxxxxx.com 4.0.5-1
PHP Version 8.1.11