Freepbx, recordings, voicemail problems

Hi,
I have installed asterisk, dahdi and freepbx.
Everything works great except, the following.
When There are no messages left for any extensions, I can go to the ARI interface, log in with the credentials, and it lets me in.
However, the moment there is a message left for any extension, and when I try to log in with the credentials of that extension with voicemail, this is what I get.

Warning: file(/var/spool/asterisk/voicemail/default/5001/INBOX/msg0000.txt) [function.file]: failed to open stream: Permission denied in /var/www/recordings/modules/voicemail.module on line 624

Warning: Invalid argument supplied for foreach() in /var/www/recordings/modules/voicemail.module on line 625

Warning: file(/var/spool/asterisk/voicemail/default/5001/INBOX/msg0000.txt) [function.file]: failed to open stream: Permission denied in /var/www/recordings/modules/voicemail.module on line 624

Warning: Invalid argument supplied for foreach() in /var/www/recordings/modules/voicemail.module on line 625

Warning: file(/var/spool/asterisk/voicemail/default/5001/INBOX/msg0000.txt) [function.file]: failed to open stream: Permission denied in /var/www/recordings/modules/voicemail.module on line 878

Warning: Invalid argument supplied for foreach() in /var/www/recordings/modules/voicemail.module on line 879

I looked at those lines, there is nothing unusual.
What is wrong?
Thanks in advance.

Based on Permission denied says it all… I a mere tadpole will make a guess…

Either something is pointing to a nonexistent directory. (My recordings are in these locations:
/usr/src/freepbx/amp_conf/htdocs/recordings
/usr/src/freepbx/amp_conf/htdocs/admin/modules/recordings
/var/www/html/recordings
/var/www/html/admin/modules/fw_langpacks/htdocs/recordings
/var/www/html/admin/modules/fw_langpacks/htdocs/admin/modules/recordings
/var/www/html/admin/modules/recordings
)

Or the owner is set wrong. Figure out who is the owner… (using ls -al in that directory) and change it using

chown new-owner somefile
Or to change the owner and the group recursively

chown –R Group:Owner /path/to/directory

I think that the owner needs to be asterisk…

Hi Cliffster
My recordings are in the following places.
./var/www/recordings
./var/www/admin/modules/recordings

./var/www/admin/modules/fw_langpacks/htdocs/recordings

./var/www/admin/modules/fw_langpacks/htdocs/admin/modules/recordings

./usr/src/freepbx-2.5.2/amp_conf/htdocs/recordings

./usr/src/freepbx-2.5.2/amp_conf/htdocs/admin/modules/recordings

You were right. There were rights issues. I fixed it and now it is working.
Thanks a lot.

glad to hear it.

well I don’t get any error upon trying to log in, but I still have no recordings. All my recordings seem to be own by user asterisk? I get Voice Mail just nothing for call monitoring even though is set to always record incoming and outgoing calls from within the settings as well as in the extensions setup from the FreePBX admin Panel.

It just wont record. Have been posting everywhere, this forum as well as the Asterisk Forum under AsteriskNOW support. Nothing! I get no feedback!

Any help would be greatly appreciated by anyone who has this feature setup and running.

Thanks in advance,
Joe

It makes sense that the recordings are owned by Asterisk. They were created by Asterisk, no?

1 question I have is where I would listen to these recordings if it creates them… I am going to try the WebMin File Manager, since that has root privs.

my recordings are in the /var/spool/asterisk/monitor directory but nothing appears within the ARI or the recording table for the asterisk database, nor am I getting anything at all within the Reports tab.

Also here is the output of this in debug mode:

Connected to Asterisk 1.4.27.1 currently running on asterisk002 (pid = 3716)
Verbosity is at least 5
– Starting simple switch on ‘DAHDI/5-1’
– Executing [[email protected]:1] Macro(“DAHDI/5-1”, “exten-vm|6920|6920”) in new stack
– Executing [[email protected]:1] Macro(“DAHDI/5-1”, “user-callerid”) in new stack
– Executing [[email protected]:1] Set(“DAHDI/5-1”, “AMPUSER=”) in new stack
– Executing [[email protected]:2] GotoIf(“DAHDI/5-1”, “0?report”) in new stack
– Executing [[email protected]:3] ExecIf(“DAHDI/5-1”, “1|Set|REALCALLERIDNUM=”) in new stack
– Executing [[email protected]:4] Set(“DAHDI/5-1”, “AMPUSER=”) in new stack
– Executing [[email protected]:5] Set(“DAHDI/5-1”, “AMPUSERCIDNAME=”) in new stack
– Executing [[email protected]:6] GotoIf(“DAHDI/5-1”, “1?report”) in new stack
– Goto (macro-user-callerid,s,9)
– Executing [[email protected]:9] GotoIf(“DAHDI/5-1”, “0?continue”) in new stack
– Executing [[email protected]:10] Set(“DAHDI/5-1”, “__TTL=64”) in new stack
– Executing [[email protected]:11] GotoIf(“DAHDI/5-1”, “1?continue”) in new stack
– Goto (macro-user-callerid,s,18)
– Executing [[email protected]:18] NoOp(“DAHDI/5-1”, “Using CallerID “Free For All Incorporated” <>”) in new stack
– Executing [[email protected]:2] Set(“DAHDI/5-1”, “RingGroupMethod=none”) in new stack
– Executing [[email protected]:3] Set(“DAHDI/5-1”, “VMBOX=6920”) in new stack
– Executing [[email protected]:4] Set(“DAHDI/5-1”, “EXTTOCALL=6920”) in new stack
– Executing [[email protected]:5] Set(“DAHDI/5-1”, “CFUEXT=”) in new stack
– Executing [[email protected]:6] Set(“DAHDI/5-1”, “CFBEXT=”) in new stack
– Executing [[email protected]:7] Set(“DAHDI/5-1”, “RT=15”) in new stack
– Executing [[email protected]:8] Macro(“DAHDI/5-1”, “record-enable|6920|IN”) in new stack
– Executing [[email protected]:1] GotoIf(“DAHDI/5-1”, “1?check”) in new stack
– Goto (macro-record-enable,s,4)
– Executing [[email protected]:4] AGI(“DAHDI/5-1”, “recordingcheck|20091216-142540|1260991534.6”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/recordingcheck
recordingcheck|20091216-142540|1260991534.6: Inbound recording enabled.
recordingcheck|20091216-142540|1260991534.6: CALLFILENAME=20091216-142540-1260991534.6
– AGI Script recordingcheck completed, returning 0
– Executing [[email protected]:999] MixMonitor(“DAHDI/5-1”, “/recordings20091216-142540-1260991534.6.wav||”) in new stack
– Executing [[email protected]:9] Macro(“DAHDI/5-1”, “dial|15|tr|6920”) in new stack
– Executing [[email protected]:1] GotoIf(“DAHDI/5-1”, “1?dial”) in new stack
– Goto (macro-dial,s,3)
– Executing [[email protected]:3] AGI(“DAHDI/5-1”, “dialparties.agi”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/dialparties.agi
== Begin MixMonitor Recording DAHDI/5-1
dialparties.agi: Starting New Dialparties.agi
== Parsing ‘/etc/asterisk/manager.conf’: Found
== Manager ‘admin’ logged on from 127.0.0.1
dialparties.agi: Caller ID name is ‘Free For All Incorporated’ number is 'unknown’
dialparties.agi: USE_CONFIRMATION: 'FALSE’
dialparties.agi: RINGGROUP_INDEX: ''
dialparties.agi: Methodology of ring is ‘none’
– dialparties.agi: Added extension 6920 to extension map
– dialparties.agi: Extension 6920 cf is disabled
– dialparties.agi: Extension 6920 do not disturb is disabled
> dialparties.agi: extnum 6920 has: cw: 1; hascfb: 0 [] hascfu: 0 []
dialparties.agi: ExtensionState: 4
– dialparties.agi: DbDel CALLTRACE/6920 - Caller ID is not defined
– dialparties.agi: Filtered ARG3: 6920
== Manager ‘admin’ logged off from 127.0.0.1
– AGI Script dialparties.agi completed, returning 0
– Executing [[email protected]:7] Dial(“DAHDI/5-1”, “DAHDI/6|15|tr”) in new stack
– Called 6>
– DAHDI/6-1 is ringing
– DAHDI/6-1 answered DAHDI/5-1
– Executing [[email protected]:1] Macro(“DAHDI/5-1”, “hangupcall”) in new stack
– Executing [[email protected]:1] GotoIf(“DAHDI/5-1”, “1?skiprg”) in new stack
– Goto (macro-hangupcall,s,4)
– Executing [[email protected]:4] GotoIf(“DAHDI/5-1”, “1?skipblkvm”) in new stack
– Goto (macro-hangupcall,s,7)
– Executing [[email protected]:7] GotoIf(“DAHDI/5-1”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,9)
– Executing [[email protected]:9] Hangup(“DAHDI/5-1”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 9) exited non-zero on ‘DAHDI/5-1’ in macro ‘hangupcall’
== Spawn h extension (macro-dial, h, 1) exited non-zero on ‘DAHDI/5-1’
– Hungup ‘DAHDI/6-1’
== Spawn extension (macro-dial, s, 7) exited non-zero on ‘DAHDI/5-1’ in macro ‘dial’
== Spawn extension (macro-exten-vm, s, 9) exited non-zero on ‘DAHDI/5-1’ in macro ‘exten-vm’
== Spawn extension (from-internal, 6920, 1) exited non-zero on ‘DAHDI/5-1’
– Hungup ‘DAHDI/5-1’
== End MixMonitor Recording DAHDI/5-1
– Starting simple switch on ‘DAHDI/5-1’
– Hungup ‘DAHDI/5-1’


Notice it says :-- Executing [[email protected]:8] Macro(“DAHDI/5-1”, “record-enable|6920|IN”)

also: == End MixMonitor Recording DAHDI/5-1
But it won’t record.

Well I got it to record after noticing the Debug output:

/recordings20091216-142540-1260991534.6.wav||"

I had to put a / after recordings

but still no way to access them from the ARI?

Has option to run after recording (my guess a script)

Does anyone know how to write the script to place these recordings to the appropriate call monitor box, or even the admin call monitor box, as well as within the recording table for the asterisk database So these can be searchable. Why did they release a half built app.? As I remember I had to create the database table for the reports, that doesn’t work either.

Hi

Sorry, I got busy on other stuff. When you say ARI are you referring to System Recording page of FreePBX?

I agree that you should be able to listen to recordings from there… but you can’t. It could use some work.

I found mine in /var/lib/asterisk/sounds/custom.

As for writing a script, I don’t have that ability today.

As for why did they release a half built app? I can only guess, but the whole FreePBX is a pretty big app, and it could have been overlooked or deemed good enough for now. It works. Not something you need regular. You can listen to the recording right after creating it by dialing *77. And you can test your IVR anytime by calling 7777.

As for your database table for the reports. I don’t do any, so I would recommend a new post for that, if it is an issue for you.