[Asterisk-bsd] FreePBX on FreeBSD

Doug Barton dougb at dougbarton.us
Thu Sep 22 20:31:16 CDT 2011


On 09/22/2011 09:52, Kurt Lidl wrote:
> On Wed, Sep 21, 2011 at 11:59:50PM -0700, Doug Barton wrote:
>> I'm working on a FreeBSD port of FreePBX. I've seen the posts from Kurt
>> and Ian about their success in getting it running, so I'm hopeful, but
>> I've run into a lot of problems.
>>
>> My approach so far has been massive amounts of sed to try and get the
>> paths in the various scripts to match what FreeBSD ports usually do.
> 
> Offhand, I'd think this is the wrong approach to try.
> See my comments below about a different way to fix the code.
>
>> I'm also curious if anyone who has this running sees serious flaws in
>> the approach described above, and/or would be willing to share the
>> approach they used to get it installed. I started off trying to go with
>> the defaults as much as possible, but given the large number of odd
>> paths and internal consistencies trying to make things consistent seemed
>> to be the lesser of various evils. However I'm curious if I'm going to
>> run into unexpected problems with this method down the road.
>>
>> Any help on this will be greatly appreciated.
> 
> Generically, the various FreePBX scripts just "source" or "." the
> /etc/amportal.conf file, which setups a bunch of environmental
> variables for binaries, libraries, spool files (e.g. voicemail),
> and the like.

Yes, that's generally true, and I'm relying on that whenever I can.
However even that bit isn't 100% consistent. :-/

> Anyplace you're busy sed'ing the contents of the files, you probably
> should be making sure that the configuration file is read in,
> and then just change the file to do something like the following:
> 	
> 	Original, hardcoded reference to /etc/asterisk/foo.conf :
> 	Change to ${ASTETCDIR}/foo.conf .
> 
> Nobody will argue that your change is incorrect, and it will "just work"
> on any platform, regardless of where the user has configured their
> asterisk installation.  It's important to get those fixes back to
> the FreePBX maintainers -- obvious fixes like this they will probably
> just include without too much effort.  Almost all the changes I
> fed to them just before 2.8 was released got into the 2.8 release.

Ok, I'll take another look at this, thanks for the suggestion. It's
really good to know that they devs are at least somewhat interested in
portability updates. FreeBSD has a fundamental principle of trying to
cooperate with upstream vendors.

> Now, I looked briefly at the FreePBX 2.9 code, and they've changed
> how it operates/bootstraps the various shell scripts a bit.  They
> augmented the /etc/amportal.conf file with an additional /etc/freepbx.conf
> file.  They've got a post about that here:
> 	http://www.freepbx.org/news/2011-02-28/version-2-9-amportal-conf-advanced-settings-im-confused

Yeah, that's been kind of fun.

> I haven't attempted to upgrade my 2.8.1 FreePBX running on one of
> my 32bit FreeBSD 8.2-RELEASE machines.  It works, and it's in production,
> so I'm probably not going to fool with it, but rather port the
> FreePBX 2.9 / FreePBX svn-trunk code to run on a different FreeBSD machine.

Thanks again for your response.


Doug

-- 

	Nothin' ever doesn't change, but nothin' changes much.
			-- OK Go

	Breadth of IT experience, and depth of knowledge in the DNS.
	Yours for the right price.  :)  http://SupersetSolutions.com/




More information about the Asterisk-BSD mailing list