Asterisk and the Mystery of the Asterisk.pid File
Submitted by Chadarius on Mon, 2008-09-22 11:10.
I've been fighting with Asterisk the last few days. I think now I have almost tamed the beast though. At first I was running into problems with the web interface. However, at the time I was running the packages that come with Ubuntu 8.04 server. I decided that it would just be better to just compile the latest stable version on my own.
This is fine except that the latest stable version's config files don't actually work. When I started Asterisk I would get an error about how it could not create /var/run/assterisk.pid. This, inspite of the fact that after looking at /etc/init.d/asterisk, it was telling asterisk to create the file in /var/run/asterisk where the asterisk user and group had full rights. Bizaar.
After leaving it for the weekend (My family went to go visit Grandma at her new house) I took a fresh crack at it this morning. It sfunny how when you leave something for a few days you get a whole fresh new look at things.
I decided that even with hacking the /etc/init.d/asterisk file to hard code the startup command to ensure it was passing the right parameters and getting no where, that the /etc/asterisk/asterisk.conf file must be the culprit.
In the asterisk.conf file that the make command creates, it just housed one section called [global] with a number of directives for where Asterisk should find and create files.
Well it turns out that this is horribly wrong, and people know about it. Lovely.
I changed the file to look like this instead:
[directories] astetcdir => /etc/asterisk astmoddir => /usr/lib/asterisk/modules astvarlibdir => /var/lib/asterisk astagidir => /usr/share/asterisk/agi-bin astspooldir => /var/spool/asterisk astrundir => /var/run/asterisk astlogdir => /var/log/asterisk [files] astctlpermissions => 700 astctlowner => asterisk astctlgroup => asterisk astctl => /var/run/asterisk/asterisk.ctl [options] runuser => asterisk rungroup => asterisk
Amazing what happens when config files are actually correct. Sometimes I'm amazed at how things like that get out of testing and into production.
Now that my Asterisk install is actually functioning properly I'm going to start messing around with Ekiga and my Asterisk server. Once I know its working properly I'm going to put in my Digium card so I can bridge things over to my 4 set wireless phones and switch from Vonage to Broadvoice and save some more cash!
»
- Chadarius's blog
- Login to post comments
- 739 reads

