[Asterisk-bsd] Is there a good Asterisk webapp (candidate)?

Kurt Lidl lidl at pix.net
Wed Aug 3 09:05:35 CDT 2011


On Wed, Aug 03, 2011 at 08:32:24AM +0200, Ian FREISLICH wrote:
> Kurt Lidl wrote:
> > I've actually got FreePBX up and running on FreeBSD 8.2 (started
> > on 8.0, then 8.1).  I submitted a bunch of changes upstream to the
> > FreePBX people, most of those made it into their tree.  That was
> > probably a year ago or so.  The only thing that really rankles is this:
> > just give up about sticking the amportal.conf file anyplace other
> > than /etc/amportal.conf.
> > 
> > If you give up on that, you can configure everything else to live out of
> > /usr/local without serious issues.
> 
> What he said.
> 
> I have FreePBX running on many machines ranging from 8.0 to 9-CURRENT.
> It wasn't that hard to get working provided you're preapred to make
> the following compromises:
> 
> 1. Symlink /usr/local/etc/asterisk to /etc/asterisk
> 2. Symlink /usr/local/bin/php to /usr/bin/php
> 3. Put amportal.conf in /etc

I forgot about the /usr/bin/php symlink.  That too is really needed
for FreePBX on FreeBSD.

I'll post a few more details here, in the hopes that it is useful
to others that are attempting to get FreePBX working on FreeBSD.

If you stash the following in the /etc/amportal.conf file, I don't
think you need the symlink from /etc/asterisk to /usr/local/etc/asterisk

AMPBIN=/usr/local/freepbx/libexec
AMPSBIN=/usr/local/freepbx/sbin
AMPWEBROOT=/usr/local/freepbx/data
FOPWEBROOT=/usr/local/freepbx/data/panel
ASTETCDIR=/usr/local/etc/asterisk
ASTMODDIR=/usr/local/lib/asterisk/modules
ASTVARLIBDIR=/usr/local/share/asterisk
ASTAGIDIR=/usr/local/share/asterisk/agi-bin

One other annoyance with some of the scripts is they call out for
/bin/bash explicitly, even though they run just fine under /bin/sh.

So, install bash, or symlink /bin/bash to /bin/sh, or edit the
scripts.  The problem with editting the scripts is that you'll need
to do it again when you install an upgrade.  I don't think they
accepted the patch that moved all the simple scripts back to just
/bin/sh either...

> You will need to perform several post install chores:
> 1. Put your www user into group asterisk
> 2. Fix all the errors that reloading FreePBX shows when it reloads
>    and updates modules.  These will mostly be permission related.
> 
> I think the only module that doesn't install correctly is fw_langpacks
> (localization updates) because it uses the -u option to cp.  The
> linux cp man page says "copy only when the SOURCE file is newer
> than  the  destination file or when the destination file is missing"
> and our cp doesn't have an equivalent option.  I haven't had the
> time to produce a patch that uses install instead when the OS is
> FreeBSD or to make a compatibility patch to our cp.

The backups module is completely useless the way it is now.  They
hard-coded /bin/tar into the script, rather than just relying on
$PATH to find it.  Luckily, the flags they feed gnutar also just
happen to work with bsdtar, so that works.  But the backup script
doesn't deal with dahdi properly (or didn't when I played with it
extensively), it just wanted to backup the zaptel configuration.
I taught it to do both, but that patch never was accepted by the
freepbx people.

-Kurt 



More information about the Asterisk-BSD mailing list