I have ported the current 2.8-ish trunk code to mostly run on FreeBSD 8.0.
Attached is a patch file that has all the enhancements.
One of the things about running Asterisk on FreeBSD is that the configuration
isn't located in /etc/asterisk, as it is on Linux machines. It's in
/usr/local/etc/asterisk. Also, the binaries for Asterisk are installed
in various places under /usr/local, not in /usr/sbin.
Finally, the shell on FreeBSD is not Bash, but another Bourne-like shell.
I've converted the bash scripts to be just /bin/sh -- which should work equally
well under Bash, or any of the other "Bourne like" shells in existance.
I've had to find a few places where the /etc/asterisk directory was still
hard-coded into the code, rather than looking it up from the amp_conf array.
Any finally, a note about the sed invocations in the apply_conf.sh script.
These were changed at some to handle whitespace around the equals sign, but
use a perl-style regular expression for whitespace (\s). The sed on FreeBSD
doesn't accept perl-style regexs, so I changed that code to just use the
basic regex notation for spaces and tabs. I also changed this to be a
single sed invocation, so it creates a single .bak file, rather than 3 .bak
files in quick succession.
I hope this can make it in before the 2.8 release. It would be very nice if
it could be evaluated for that release.