How to access web Comedian mail?


#1

Hi,

Sorry for the newb question, but I installed asterisk and comedian looks to be included… it seems to give me my voicemail if I ask for it…

but where is the web portion of it? do you need to install another addon or it it hiding somewhere?? I’ve accessed the voicemail over the web with A@H…

I’ve tried something to this effect:

192.168.1.1/cgi-bin/vmail.cgi

but nothing there… thanks for your help.

rob


#2

Well, with Asterisk@home if you http to the servers IP address, you will be given a full menu of different things you can do (VM meetme etc, one of them being the voicemail system. This, however is only available on your local LAN. If you want to try and access it from the outside, you’ll have to use a publically accessible IP address that is routed to the IP address of your Asterisk box (of course lots of exceptions to that but generally speaking)


#3

Yeah, works great with A@H… but I’m using standalone asterisk now with all my configuration done manually …

I’m looking for the same kind of web access as with A@H … since Comedian is installed shouldn’t you be able to hit it on the web somehow???

Thanks

rob


#4

You need a webserver and have to install the cgi. Asterisk itself does not expose any http interface.
Have a look at http://www.voip-info.org/wiki/view/Asterisk+gui+vmail.cgi for further information.


#5

Thanks … that info totally helped. I have the webmail login coming up and I can log into my account.

I never see any messages even though they exist! Has anyone seen this problem and solved it?

I have a feeling that the vmail cgi script can’t access the files … I tried addressing the issues mentioned on the site but it didn’t help.

I do have SELinux enabled but it doesn’t look like it’s affecting httpd … or maybe it is … I don’t really know how it works:

[root@localhost asterisk]# ps axZ | grep httpd
root:system_r:unconfined_t 22239 ? S 0:00 /usr/local/apache2/bin/httpd -k start

Any Ideas? Thanks…

rob


#6

I have the same problem. I can log into the web voice mail, but I cannot see the messages. I know it is a permissions issue. The Wiki describes how to fix it, but it is a little over my head as I am fairly new to Linux.

Can someone please go into a little more detail? Thank you.


#7

Which bit of it are you having trouble understanding?


#8

Here is the bit of text for the WIKI that I think will solve the issue:

To make this work well, you should modify file.c and app_voicemail.c to write out the files with the same owner and group ID as the directories they are in.

You can do that after figuring out what the owner and group of the directory is or just chown the files to root:apache and chmod 660.

It can be a pain setting this up so it doesn’t get screwed up. You have to make sure that the directories created for new mailboxes are 770 as well as 660 for any files, modifying the copy and file writing files in file.c and where they are called(the mode parameter) in app_voicemail.c.

Too bad the Asterisk devs don’t have this built in or a configure option when compiling. Checking your voicemail from the web is very convenient.

My questions are:

Do I have to recompile Asterisk to get this to work?
Which files/folders does he want to me CHMOD/CHOWN
In the 3rd paragraph, does he want me to chmod it to 660 or 770?
How do you chown something to root:apache, aren’t they 2 different users?
Is there a more elegant solution? I am not keen on the idea of just chmod’ing files until eventually it works. This will be going into a production enviorment and I need the best/most elegant solution.

Thank you.


#9

[quote=“MattP”]Do I have to recompile Asterisk to get this to work?
[/quote]
Yes. If you modify c files, you have to recompile for that to affect the resulting binary, because the binary is built from the c files.

“the directories created for new mailboxes” - in other words /var/spool/asterisk/voicemail/*

[quote]In the 3rd paragraph, does he want me to chmod it to 660 or 770?
[/quote]
Chmod directories to 770 and the files in those directories to 660, i guess.

No. This means ‘root is the owner’ and ‘apache’ is the group. Just do chown root:apache

Once it’s done it’s done. If it works it will keep working. Chmod’ing and chown’ing are a fairly routine part of linux sysadmin.


#10

Running out for the day now, but thought I’d post a “placeholder”.

I’ve used a hack (also referenced on the Wiki, I believe) to avoid having to change asterisk source code. My problem with changing the source code is that it’s not really an “end-user/administrator friendly” thing to do. And you have to remember to re-apply the change every time you upgrade, which is a deal breaker for me.

So the hack I use is to plug in a little shell script (actually, I used a perl script) using externotify (I think that’s it – going from memory here) in voicemail.conf that chmod’s each voicemail file as it’s created. Pretty simple, and not TOO ugly. So far, it’s held up for me, but I’m only running a small home system, so it’s not really battle-tested for a production business system. But worth considering.


#11

Thanks for all the info.

When I asked if you need to recompile asterisk, I meant to say, is there a solution that doesn’t require you to recompile asterisk.

Instead of making scripts of changing source code, can’t I just chmod/chown the new voicemail folders everytime one is created?

EDIT:

I tried CHMODing and CHOWN’ing until I was blue the face. Can you just post the script that you wrote in your voicemail.conf file?

Thank you.