Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 99860 - ebuild for freePBX / Asterisk Management Portal (AMP)
Summary: ebuild for freePBX / Asterisk Management Portal (AMP)
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Default Assignee for New Packages
URL: http://www.freepbx.org
Whiteboard:
Keywords: EBUILD
: 133688 (view as bug list)
Depends on:
Blocks: 129966
  Show dependency tree
 
Reported: 2005-07-21 17:59 UTC by Tom Wolfe
Modified: 2023-04-21 18:43 UTC (History)
23 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
This is a working and tested first version of AMP ebuild. (AMP.tar.gz,4.81 KB, application/x-gzip-compressed)
2005-09-09 13:10 UTC, Pierre Colot
Details
This is a proposition for AMP 1.10.008 and 1.10.009 installation. (AMP.tar.gz,5.19 KB, application/x-gzip-compressed)
2005-09-16 13:21 UTC, Pierre Colot
Details
Improvement of ebuild 008 and 009 (AMP.tar.gz,6.34 KB, application/x-gzip-compressed)
2005-09-27 12:10 UTC, Pierre Colot
Details
Webapp version of amportal ebuild for 1.10.010 (amportal_portage.tgz,5.69 KB, application/x-gtar)
2006-04-02 23:45 UTC, Wade Fitzpatrick
Details
FreePBX 2.0.1 webapp ebuild (freepbx-2.0.1.ebuild,8.75 KB, text/plain)
2006-05-23 03:36 UTC, Wade Fitzpatrick
Details
FOP init script (fop_initd,497 bytes, text/plain)
2006-05-23 03:38 UTC, Wade Fitzpatrick
Details
Gentoo config patch for ebuild (gentoo_conf-2.0.1.patch,4.70 KB, text/plain)
2006-05-23 03:40 UTC, Wade Fitzpatrick
Details
SQL to grant default privs to tables (grant_privs.sql,228 bytes, text/plain)
2006-05-23 03:41 UTC, Wade Fitzpatrick
Details
Patch install_amp to not touch ANY files (install_amp_really_no_files-2.0.1.patch,1.69 KB, patch)
2006-05-23 03:43 UTC, Wade Fitzpatrick
Details | Diff
Post install text (english) (postinstall-en.txt,1.14 KB, text/plain)
2006-05-23 03:44 UTC, Wade Fitzpatrick
Details
Script to reconfigure after a new vhost is added (reconfig.sh,810 bytes, text/plain)
2006-05-23 03:47 UTC, Wade Fitzpatrick
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Wolfe 2005-07-21 17:59:14 UTC
AMP is a free tool to help with setting up/managing asterisk.  An ebuild would be very nice.

Reproducible: Always
Steps to Reproduce:
Comment 1 Stefan Knoblich (RETIRED) gentoo-dev 2005-07-22 17:44:58 UTC
work in progress 
Comment 2 Pierre Colot 2005-09-09 13:10:15 UTC
Created attachment 68060 [details]
This is a working and tested first version of AMP ebuild. 


This ebuild follows the AMP installation procedure.

Lot of improvements are needed:

This ebuild installs the web site under /var/www/localhost/htdocs
This ebuild contains a NOT AUTOMATICALLY INSTALLED review of
/etc/init.d/asterisk
to set permission at run-time
This ebuild expects the apache http server to be configured with
User asterisk, Group asterisk and to support -D PHP4
This ebuild supposes mysql is used, deployed and admits user root without
password
This ebuild suppose asterisk use ALSA module and not OSS module
This ebuild resulting configuration has to be merged in /etc/asterisk

No use of apache.ebuild is done.


I hope it could help somebody.
Comment 3 Stefan Knoblich (RETIRED) gentoo-dev 2005-09-14 18:42:07 UTC
I'm going to test your ebuild tomorrow.
(After finishing some short term items on my todo list)
Comment 4 Pierre Colot 2005-09-16 13:21:39 UTC
Created attachment 68615 [details]
This is a proposition for AMP 1.10.008 and 1.10.009 installation.
Comment 5 Pierre Colot 2005-09-27 12:10:47 UTC
Created attachment 69363 [details]
Improvement of ebuild 008 and 009
Comment 6 Pierre Colot 2005-09-27 12:42:58 UTC
Improvements:

- This ebuild use the new apache2 
- This ebuild installs the web site under /var/www/amp.__dnsdomainname__/
  accessible thru http://amp. ... or has default and only site on server IP
  address
- This ebuild use the default asterisk init.d
- This installation restrict amp ressources access to only apache and asterisk

Assumptions:

- AMP http server and asterisk server located on the same server
- Alsa is available. Kernel or Module enabled
- Apache2 has PHP4 enabled at startup
- Apache2 Virtual Host are not disabled
- Mysql is used, deployed and admits user root without password

Last words:

As usual, don t forget to etc-update your config file.
Reload thru the AMP application your config.
Use AMP to define :
 * incoming trunk to receive from external sites
 * outgoing trunk to transmit to external sites
 * internal extension to assign extension to your IP equipment

Remainings improvements to be integrated to zaptel ebuild:

- automatize Zaptel config with 2 ISDN cards and FXO/FXS equipment
- autodetect equipment like in the other distributions
- check if dubbel zaptel definition in rules 10 and 50 is safe
- resolve UDEV issue not creating zaptel device right in time at boot time
  but creating it later if udevstart is invoked.  

Those ebuilds are my first one, be warned. External tests and QA reviews
should be applied.

Good Luck
Comment 7 Ed Wildgoose 2005-10-17 13:50:59 UTC
This is great work.  I started working on this months ago and got sidetracked.

My first instinct was to suggest that you use the webapp-config stuff to track
the web files and the DB files, and move the Db stuff into the post config
phase.  However, the setup for this app is just so darn complicated that I can
see why you did what you did.

There appears to be a small typo at one spot, line 181 of the 009 ebuild says:
-e "s:/ \$AMPWEBROT/: ${D}:g" \

Also just eyeballing the ebuild you repeat a large chunk of the applyconf.sh
stuff in the ebuild? Is there a reason for this?  It looks like your regexp
should have already sorted this?

This looks really nice though.  I hope you can get some more testing and
feedback from people
Comment 8 Pierre Colot 2005-10-18 05:46:32 UTC
I discover 3 issues on the ebuild.

- First, manager service has to be enabled with the expected username/password
defined inside /etc/amportal.conf, unless the installation abort without error
code. 

- Secondly, I had authentification problem during voicemail login. Finnally,
I tracked back to a tricky config. If you activate asterisk USE flag related to 
voicemail database usage, user/password are stored in file but authentification 
schema check against the DataBase. 

- Thirdly, I have corrected the typo you descibe and patch the upgrade 
procedure.

I'm going to check if some part of the ebuild is not usefull anymore, 
to do as many tests as possible, and reinstall my 2 IP/PBX.

I'm working on using catalyst to build a livecd Asterisk IP-PBX + AMP. 
Is anybody interested in ? Having specific requests or ideas ?
I'm in the early stage of development. I now am able to build the minimal
and generic livecd and to twice loop-mount the resulting image to brose th 
result.

Thanks for your review 

    
Comment 9 Pierre Colot 2005-10-18 05:51:41 UTC
For your information, 

 - manager config has to be enabled in /etc/asterisk/manager.conf.
 - in the next ebuild review, I duplicate voicemail info inside 
   the mysql database.
Comment 10 solar (RETIRED) gentoo-dev 2005-10-18 06:38:02 UTC
Add in FOP please to your livecd if not already there.
Comment 11 Ed Wildgoose 2005-11-02 03:26:26 UTC
I don't know if you already did, but I think it would be worth pushing for some
changes upstream to make the installation easier.  I just posted a tiny appeal
to their mailing list.  Can see what happens..

Possibly the latest beta is heading in the right direction.  I'm not sure if
Asterisk 1.20 will make things easier by allowing more config to be stored in
the DB?
Comment 12 Ed Wildgoose 2005-11-29 16:14:18 UTC
The new AMP version at least removes all the sound files....  Still has a rather
nasty install script though.

Did you have any time to look at tweaking your ebuild?

Good luck

Ed W
Comment 13 Christophe PEREZ 2005-11-29 23:10:55 UTC
Just to be in CC
I'm very interested by this ebuild and by livecd IPBX.
Comment 14 Triffid Hunter 2006-01-13 17:47:21 UTC
another vote of interest..

I agree that their install script is ugly! pity really..
Comment 15 Rajiv Aaron Manglani (RETIRED) gentoo-dev 2006-03-26 09:40:27 UTC
the name of AMP has been changed to freePBX.

http://coalescentsystems.ca/index.php?page=freePBX_AMP

some comments on the ebuild 009:
- thanks for starting this!
- please rework the ebuild to install with the webapp eclass. then you will not have to do all the setup of /var/www/amp.`dnsdomainname`. http://www.gentoo.org/proj/en/webapps/webapp-eclass.xml
- use 'dodir' instead of 'mkdir ${D}/foo'. use 'insinto' and 'doins' instead of 'cp' http://www.gentoo.org/proj/en/devrel/handbook/handbook.xml?part=2&chap=1 describes the helpers available in an ebuild.
- the ebuild should not modify or overwrite existing files such as /etc/asterisk/modules.conf, /etc/asterisk/features.conf, any of the php.ini files, or 70_mod_php.conf. tell the user to do that and/or put those command into pkg_config.
- do not overwrite /etc/init.d/asterisk. instead create /etc/init.d/freepbx



Comment 16 Wade Fitzpatrick 2006-03-26 16:06:29 UTC
(In reply to comment #15)
> the name of AMP has been changed to freePBX.
> 
> http://coalescentsystems.ca/index.php?page=freePBX_AMP
> 
> some comments on the ebuild 009:
> - thanks for starting this!
> - please rework the ebuild to install with the webapp eclass. then you will not

I have already finished most of this for 1.10.010. Having problems deciding what to do with file permissions as I couldn't get suPHP or suexec working to run it as the asterisk user. Considering using extended ACLs to allow the apache user to write to /etc/amportal/*
Comment 17 Wade Fitzpatrick 2006-04-02 23:45:24 UTC
Created attachment 83788 [details]
Webapp version of amportal ebuild for 1.10.010

This is a webapp version of AMP/amportal/freePBX. Things to note:
- ebuild is 'www-apps/amportal' not 'www-apps/AMP' as amportal is more consistently used throughout the webapp
- /etc/amportal.conf has moved to /etc/conf.d/amportal
- upgrade from the 1.10.008 or 1.10.009 ebuilds _should_ be possible, but is untested
- postinstall instructions - read them!

Since we need to write to files in /etc/asterisk/* we cannot install this as a pure webapp. This is a hybrid webapp, therefore the postinstall_hook script disables the sandbox. If you try to install more than one vhost you will overwrite the old configs with the new one.

Much effort (weeks) has gone into making sure "it just works" in "the Gentoo Way", however I have not done extensive testing of actually running the app. Changing the names to freePBX should be fairly trivial. I will try and get an ebuild out for v2.0.1 soon too.
Comment 18 Jakub Moc (RETIRED) gentoo-dev 2006-05-18 07:03:51 UTC
*** Bug 133688 has been marked as a duplicate of this bug. ***
Comment 19 Wade Fitzpatrick 2006-05-23 03:36:44 UTC
Created attachment 87305 [details]
FreePBX 2.0.1 webapp ebuild

Fairly major changes in the way this works. Both ebuild and application are not well tested. The ebuild should install okay but not sure it covers everything necessary. Includes a modified upgrade script so upgrading from any version should be possible. I'm particularly interested in finding out how well upgrade works and any weird things you have to do manually (like touch a file somewhere).
Comment 20 Wade Fitzpatrick 2006-05-23 03:38:47 UTC
Created attachment 87306 [details]
FOP init script

Script for /etc/init.d/freepbx which starts the Flash Operator Panel
Comment 21 Wade Fitzpatrick 2006-05-23 03:40:48 UTC
Created attachment 87307 [details]
Gentoo config patch for ebuild

Gentoo config patch to keep config in /etc/conf.d/freepbx
Comment 22 Wade Fitzpatrick 2006-05-23 03:41:59 UTC
Created attachment 87308 [details]
SQL to grant default privs to tables
Comment 23 Wade Fitzpatrick 2006-05-23 03:43:15 UTC
Created attachment 87309 [details, diff]
Patch install_amp to not touch ANY files
Comment 24 Wade Fitzpatrick 2006-05-23 03:44:40 UTC
Created attachment 87310 [details]
Post install text (english)

Talks about how this is different to a normal webapp and displays the next steps
Comment 25 Wade Fitzpatrick 2006-05-23 03:47:01 UTC
Created attachment 87311 [details]
Script to reconfigure after a new vhost is added

Handles file permissions etc when a new vhost is added
Comment 26 Ed Wildgoose 2006-05-29 12:00:48 UTC
Very encouraging patch in FreePBX (added to enable FreeBSD ports system)

http://www.freepbx.org/ticket/761

Hopefully this will make it possible to get a FreePBX 2.2 into a decent shape for an ebuild!
Comment 28 Kevin Bowling 2007-03-17 11:04:54 UTC
BUMP for status check.  Any chance this can be merged into the voip overlay for greater testing/exposure?
Comment 29 Vadim Efimov 2007-04-12 15:14:55 UTC
(In reply to comment #28)
> BUMP for status check.  Any chance this can be merged into the voip overlay for
> greater testing/exposure?
> 

+1
Comment 30 Stefan Schweizer (RETIRED) gentoo-dev 2007-04-13 20:24:01 UTC
If someone is interested in helping to get this in I can set him up with access to the voip overlay. I can also mentor in order to gain gentoo tree cvs access and maintain it there.

Just email me or talk to me in irc to move this :) Just saying "+1" wont change anything - doing the work will.
Comment 31 Kevin Bowling 2007-04-15 07:06:44 UTC
(In reply to comment #30)
> If someone is interested in helping to get this in I can set him up with access
> to the voip overlay. I can also mentor in order to gain gentoo tree cvs access
> and maintain it there.

Count me in.  What outstanding issues are there with this package?  What needs to be done before it can be added to the overlay and tree?

> Just email me or talk to me in irc to move this :) Just saying "+1" wont change
> anything - doing the work will.

Neither will going into hiding for months on end.  As you can see, there is demand for this package.  Thanks for finally letting us know the situation so we can assist.  IMHO Gentoo needs an official dev. blog server so users can be kept up to date on things like this.
Comment 32 Stefan Schweizer (RETIRED) gentoo-dev 2007-04-15 09:15:29 UTC
> ------- Comment #31 from kevin 2007-04-15 07:06 0000 -------
> Count me in.  What outstanding issues are there with this package?  What needs
> to be done before it can be added to the overlay and tree?

You tell me :)
What username do you want for the overlay?
Then we can talk about the ebuild and improve it. For the tree either you need to become a developer or I can commit it :)

> > Just email me or talk to me in irc to move this :) Just saying "+1" wont change
> > anything - doing the work will.
> 
> Neither will going into hiding for months on end.
Eh I was not hiding, I was always available in the usual irc channels and by email - just no one with repo access had interest in this bug and no one without it wanted to gain repo access to commit it.

> As you can see, there is
> demand for this package. 
Yeah that is why I put such a request for help on it.

> Thanks for finally letting us know the situation so
> we can assist. 
pleasure :)

> IMHO Gentoo needs an official dev. blog server so users can be
> kept up to date on things like this.
We have an official dev blog:
planet.gentoo.org
Comment 33 Vadim Efimov 2007-09-05 16:11:14 UTC
Free PBX 2.3.0 Released
and he wrote:

"Contribute Your Favorite Distribution's Package Format 
Are you a packaging master? We'd like to start adding RPMs, DEBs, and ports to this page for various distributions. email info @ freepbx.org to help!"

sorry - i'm non dev, but can be tester... 
Comment 34 Christopher W. Baran 2009-03-06 01:31:55 UTC
FYI if someone picks this back up: http://blog.chrisbaran.net/2009/03/04/freepbx-on-gentoo/

I've laid out all the Gentoo changes required for FreePBX.
Comment 35 Mounir Lamouri (volkmar) (RETIRED) gentoo-dev 2009-07-07 12:57:21 UTC
They are still people who want this package ?
If someone want to maintain it, I can proxy.
Comment 36 Ed Wildgoose 2009-07-07 13:22:07 UTC
I for one would love to ditch my elastix distro and get back to gentoo on my PBX box.  Freepbx just seems to be build without any regards to being easy to package... I think the solution has to be to push many of the required changes upstream - in particular the desire to have Apache run as the same user as Asterisk is just bad...

I have no capacity to work on this right now, but hope that it won't completely die...
Comment 37 Jaco Kroon 2019-11-14 12:35:08 UTC
Busy looking at asterisk updates ...

This is not one I'm overly interested in ... can we please let this one die?

Last comments on this has been a decade ago.

If not, can a possible maintainer please step forward?
Comment 38 Jaco Kroon 2020-12-23 10:11:44 UTC
No one indicated interest after my last response.  Resolving as WONTFIX.
Comment 39 Vladimir B. Vinogradov 2023-04-20 11:24:47 UTC
I'm trying to install FreePBX on gentoo with systemd. Later I'll provide a result of my experiments. The goal - obtain working copy with non-commercial modules of FreePBX-16 with asterisk-20.
Comment 40 Vladimir B. Vinogradov 2023-04-21 11:55:43 UTC
Update.

I installed latest FreePBX-16 on gentoo with a few simple patches to install script. The FreePBX installed "empty". So I have to install needed modules manually. It seems to me that it is impossible to include such option to ebuild.
in a few days I'll test new installation...
Comment 41 Vladimir B. Vinogradov 2023-04-21 18:43:27 UTC
I can't install Freepbx repo official CD with custom instillation. It seems to thaere is no way to use rather than mysql to install. so in e week or so i'll provide updated ebuil for freepbx on systemd/gentoo linux with minimal modules insytall. up to f few days - I can't obtain  commercial modules working (as a sample  -systemdamin modyle rquires ioncube 10.4.5 which is not compatible with 'non freepbx ative install". i can't up to now understad such a behavior of on installation. maybe later ...