Yes nowadays you can tell it’s autumn because I start posting again, but leaving that aside, today’s post will be something a bit more software oriented.
See I had the occasion of fiddling with a xeon server rack to install asterisk as a SIP daemon and FreePBX to administer it. Now, I imagine that there aren’t that many people doing this kind of thing for fun, unless of course you want to call your friends from your computer without using skype, but if you do, you most likely ended up here because like me you’re having trouble making it start.
Skipping the obvious steps like download the code, run make, etc. after I installed asterisk, it just didn’t want to start, it just blurted a big red WARNING in console mode and died. In this case the problem was that there were two modules conflicting with each other, if you don’t want to have this problem then don’t install the addons, otherwise just blacklist them from modules configuration file in /etc/asterisk/.
Now onto the next step, I installed FreePBX, again leaving out that the install script requires you to run the sql scripts in the ./sql directory beforehand which made me think there was a problem with the asterisk install and convinced me that I have to start over, but still there I was thinking I was finally over when the damn webserver wouldn’t show me anything when I tried to connect to the portal via http on localhost, the response was 0 length. This was actually a two part problem, first a 403 because silly old me forgot to chmod +x the directories in the html location, but the other one, not that lucky. And so after spending 4 hours in total installing the software, it still wouldn’t work.
In any case, I thought, hey this has to be a database problem, I’ll just redo that part and hope it goes away when that didn’t work, I thought, hey maybe it has something to do with the html, I redid that step too, but no, it just wouldn’t go away. At this point I started hacking away at the code and what do you know, this portal keeps its’ database connection settings locked away in a obscure file hidden well in the system, which is totally fine I guess, but then it goes on and includes a fucking .php file with an absolute path, so if you are like me and change the directory of the install after running that script, it won’t work until you update freepbx.conf.
All in all it took me one whole day to make this thing run, but I guess in the end that just made me feel a whole lot better when it was finally over.