I cannot download recordings

Hi!

All my system is by default. My Freepbx version is: 2.5.1.5. Everything is working fine but I can’t download recordings. I get 404 Not found!

any idea? thanks.

Hi guys!

I’m still having this problem.

I cant download recordings (call monitor and voicemail). When I doing click in DOWNLOAD link, it redirect me to http://xx.xx.xx.xx/recordings/misc/audio.php?recindex=8

And it gives me 404 ERROR!

permissions are OK.
asterisk:/var/spool/asterisk# ls -l
total 32
drwxrwxr-x 2 asterisk asterisk 4096 may 19 04:00 dictate
drwxrw-r-- 2 asterisk asterisk 4096 may 19 04:25 fax
drwxrwxr-x 2 asterisk asterisk 4096 may 19 04:00 meetme
drwxrwxr-x 2 asterisk asterisk 4096 may 27 11:21 monitor
drwx-w---- 2 asterisk asterisk 4096 may 19 04:05 outgoing
drwxrwxr-x 2 asterisk asterisk 4096 may 19 04:00 system
drwxrwxr-x 2 asterisk asterisk 4096 may 19 04:00 tmp
drwxrwxr-x 4 asterisk asterisk 4096 may 19 04:25 voicemail

asterisk:/var/www/html/recordings/modules# ls -l
total 148
-rw-rw-r-- 1 asterisk asterisk 22140 may 19 04:29 callmonitor.module
-rw-rw-r-- 1 asterisk asterisk 3234 may 19 04:29 featurecodes.module
-rw-rw-r-- 1 asterisk asterisk 21002 may 19 04:29 followme.module
-rw-rw-r-- 1 asterisk asterisk 15577 may 19 04:29 phonefeatures.module
-rw-rw-r-- 1 asterisk asterisk 25669 may 19 04:29 settings.module
-rw-rw-r-- 1 asterisk asterisk 21200 may 19 04:29 VmX.module
-rw-rw-r-- 1 asterisk asterisk 27257 may 19 04:29 voicemail.module

Why???

S.O: Debian Lenny.

thanks

Well with the second posting you did provide some details that will help versus the lack of them in the first posting. But many details are still needed…

Is asterisk running as the user asterisk?
Is Apache running as the user asterisk?

What set of directions did you follow to build this Debian box? when you build on a non standard OS you really need to be prepared for fully supporting it as 95% of all installs of asterisk are targeted for CentOS/RedHat structures.

Somewhere on this site was a debian checklist for things you need to be aware to change from a default standard install. as there are some directory structure changes.

I don’t do debian so except for remembering that it is covered on the site I’m of little use at this point. But if you also reviewed the apache error logs I’m sure it will also help point you to the reasons you are getting 404 errors. (like requested file /var/www/…/xxxx does not exist).

Thanks fskrotzki!

Is asterisk running as the user asterisk?

  • YES
    I have the correct permissions I think:
    chown -R asterisk:asterisk /var/www/
    chmod -R 775 /var/www
    chown -R asterisk:asterisk /var/log/asterisk
    chmod -R 775 /var/log/asterisk
    chown -R asterisk:asterisk /var/lib/asterisk
    chmod -R 775 /var/lib/asterisk
    chown -R asterisk:asterisk /usr/lib/asterisk
    chmod -R 775 /usr/lib/asterisk
    chown -R asterisk:asterisk /etc/asterisk
    chmod -R 775 /etc/asterisk

Is Apache running as the user asterisk?

  • YES

nano /etc/apache2/envvars

export APACHE_RUN_USER=asterisk
export APACHE_RUN_GROUP=asterisk
export APACHE_PID_FILE=/var/run/apache2.pid

asterisk:/var/log/apache2# nano access.log

[28/May/2009:11:02:51 -0400] “GET /recordings/misc/audio.php?recindex=8 HTTP/1.1” 404 276 “http://xx.xx.xx.xx/html/recordings/index.php?m=Callmonitor&f=display” “Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/525.19 (KHTML,like Gecko) Chrome/1.0.154.65 Safari/525.19”

As you see, I’m using Chrome.

Hi everybody!

I’m still with this… I cant find the answer, it must be a installation problem, but I don’t see the error.

it’s pretty simple. Apache does not have access to /var/www/html/recordings/misc/audio.php

Check this please:

test04:/var/www/html/recordings/misc# ls -l
-rwxrwxrwx 1 asterisk asterisk 1419 Jun 1 09:15 audio.php
-rwxrwxrwx 1 asterisk asterisk 2332 Jun 1 09:15 callme_page.php
-rwxrwxrwx 1 asterisk asterisk 865 Jun 1 09:15 play_page.php
-rwxrwxrwx 1 asterisk asterisk 114 May 29 13:47 popup.css
-rwxrwxrwx 1 asterisk asterisk 1173 May 29 13:47 recording_popup.php

test04:/var/www/html/recordings# ls -l
-rwxrwxrwx 1 asterisk asterisk 11672 Jun 1 09:15 CHANGE.log
-rwxrwxrwx 1 asterisk asterisk 18018 Jun 1 09:15 LICENSE.txt
-rwxrwxrwx 1 asterisk asterisk 2391 Jun 1 09:15 README.txt
drwxrwxrwx 2 asterisk asterisk 4096 Jun 1 09:15 includes
-rwxrwxrwx 1 asterisk asterisk 165 Jun 1 09:15 index.php
drwxrwxrwx 15 asterisk asterisk 4096 Jun 1 09:15 locale
drwxrwxrwx 2 asterisk asterisk 4096 Jun 1 09:15 misc
drwxrwxrwx 2 asterisk asterisk 4096 May 29 13:47 modules
drwxrwxrwx 3 asterisk asterisk 4096 May 29 13:47 theme
-rwxrwxrwx 1 asterisk asterisk 70 Jun 1 09:15 version.php

is this ok?

[list=1]
[*]Make sure all the directories below /var/spool/asterisk/voicemail are also owned by asterisk.

[*]Make sure that Apache has full access to the session files and that they are not being pruned too quickly.

[*]Make sure you are not running the Suhosin extension for Apache setup in such a way that it randomizes session IDs or otherwise blocks normal operation of sessions or cookies.
[/list]

See http://freepbx.org/forum/freepbx/users/keep-getting-kicked-out-of-ari-after-upgrade-to-fw-ari-2-5-2-1 for additional background information.

—Make sure all the directories below /var/spool/asterisk/voicemail are also owned by asterisk.
test04:/var/spool/asterisk# ls -l
total 32
drwxrwxr-x 2 asterisk asterisk 4096 May 29 13:28 dictate
drwxrwxr-x 2 asterisk asterisk 4096 May 29 13:47 fax
drwxrwxr-x 2 asterisk asterisk 4096 May 29 13:28 meetme
drwxrwxr-x 2 asterisk asterisk 4096 Jun 1 09:13 monitor
drwxrwxr-x 2 asterisk asterisk 4096 May 29 13:31 outgoing
drwxrwxr-x 2 asterisk asterisk 4096 May 29 13:28 system
drwxrwxr-x 2 asterisk asterisk 4096 May 29 13:28 tmp
drwxrwxr-x 4 asterisk asterisk 4096 May 29 13:47 voicemail

—Make sure that Apache has full access to the session files and that they are not being pruned too quickly.
How can I do that?

—Make sure you are not running the Suhosin extension for Apache setup in such a way that it randomizes session IDs or otherwise blocks normal operation of sessions or cookies.
No, I’m not running Suhosin.


I didn’t found "/var/lib/php/session"
why?
I installed apache2 php5

Any idea guys?

thanks!

Hi guys…

I’m still with the same problem… I’m thinking… I have a firewall in front Asterisk. This firewall is blocking everything at least 5060 port and some rtp ports…

For downloading recordings… do I need some enable port??

thanks!

I had the same problem, checked the permissions on the php/session and added “usermod -a -G apache asterisk”(add the asterisk user to the apache group) upgrades on apache overrides the permissions every time. Hope it helps.

ll -d /var/lib/php/session/
drwxrwx— 2 root apache 4096 Jul 13 13:43 /var/lib/php/session/

I dont have “session” folder.

I have installed php5 and apache2. All I have is:

test:/var/lib/php5# ls -l
-rw------- 1 asterisk asterisk 397 2009-07-23 06:37 sess_2b3061e6f4c5298593eae1a65103dbaa
-rw------- 1 asterisk asterisk 13716 2009-07-23 06:27 sess_8f8464498c3eb32ebf76cadf130ee1568a1f8cb4

test:/etc/php5# ls -l
drwxr-xr-x 2 root root 4096 2009-07-22 08:33 apache2
drwxr-xr-x 2 root root 4096 2009-07-22 08:33 cli
drwxr-xr-x 2 root root 4096 2009-07-23 05:54 conf.d

AH! I dont have the group “apache”.

Hi guys… any idea?