Bug 95279

Summary: (New Port) FreeBPX: a web gui to the asterisk PBX
Product: Ports & Packages Reporter: Phillip N. <pneumann>
Component: Individual Port(s)Assignee: Gabor Kovesdan <gabor>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
freebpx.shar
none
backup.diff
none
freepbx.shar
none
freepbx.shar
none
freepbx.shar none

Description Phillip N. 2006-04-03 20:10:14 UTC

FreePBX is a standardized implementation of Asterisk that includes a web-based
configuration interface and other tool.

good luck!
Comment 1 Phillip N. 2006-04-12 03:33:59 UTC
Make a backup of the original asterisk config's, becouse it overrides
them...
Comment 2 Phillip Neumann 2006-06-04 02:37:29 UTC
FreePBX 2.1.0 was out, with much changes

Here is the updated port, im ataching it as a new shar file, becouse its
quite different than the first one...

Its has been working just fine with asterisk, sufring on zaptel svn
drivers over a digium TE card.

Tinderbox seems to be building the package fine too.


good luck!!


KillFill.

Comment 3 Boris B.Samorodov 2006-09-28 20:32:18 UTC
Hi!


Thanks for submitting a new port.

Can you please investigate the error:

-----
===>  Patching for freepbx-2.1.0
===>   freepbx-2.1.0 depends on file: /usr/local/bin/perl5.8.8 - found
===>  Applying FreeBSD patches for freepbx-2.1.0
1 out of 1 hunks failed--saving rejects to SQL/newinstall.sql.rej
=> Patch patch-newinstall.sql failed to apply cleanly.
=> Patch(es) patch-apply_conf.sh patch-bounce_op.sh patch-cdr_mysql_table.sql patch-install_amp applied cleanly.
*** Error code 1

Stop in /a/ports/net/freepbx.
================================================================
build of /usr/ports/net/freepbx ended at Thu Sep 28 19:24:36 UTC 2006
-----

Here is the full log:
https://tinderbox.amd64.ipt.ru/tb/errors/6-bsam-exp/freepbx-2.1.0.log


WBR
-- 
bsam
Comment 4 Boris Samorodov freebsd_committer freebsd_triage 2006-09-30 19:41:11 UTC
State Changed
From-To: open->feedback

Awaiting for a feedback.
Comment 5 Marcelo Araujo 2006-10-30 03:20:07 UTC
Hi,
I have conclusion to port, I developed new script to apply a clean 
and functional installation.
Make a simple install.pl for very fine installation.
I send this message very happy, FreePBX function inside FreeBSD OS.

File shar attached.


Atenciosamente.

-- Araujo <araujo@fug.com.br>
http://experience.bsdnetwork.org
http://www.fug.com.br


-- 
_______________________________________________
Get your free email from http://bsdmail.com
Comment 6 Boris B.Samorodov 2006-11-08 23:28:37 UTC
Hello,

It's me again -- your nightmare. ;-)

It's a little bit better now. Here are some notes:

1. You have a directory structure at the files directory. That's
   wrong. I don't know if those patches should be applied or not but
   either move all of them to the "files" directory or remove them.
2. Seems that CATEGORIES should be "www net" not "misc www net".
3. WEBPATH should be ${PREFIX}/FreePBX but not the apache's directory
   (yes, earlier we used to do so, but now this method is deprecated,
   those ports are transitting to PREFIX now. And, finally, let the
   port use it's own directory). ;-)
4. An error is occured while testing the package:
-----
===>  Checking if misc/freepbx already installed
Backing up your asterisk configuration...
mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/tmp/mysql.sock' exists!
Checking for PEAR DB..OK
Checking for PEAR Console::Getopt..OK
Using username: asteriskuser
Using password: ******
Using remote database server at localhost
Using fop at /usr/local/www/data/FreePBX/panel
Using Webroot at /usr/local/www/data/FreePBX
Using CGI-BIN at /usr/local/www/cgi-bin
Using bin at /usr/local/bin
Using sbin ar /usr/local/sbin
Using Asterisk user AsteriskUser
Using asteriskpass ************
Using system config at /usr/local/etc
Checking user..OK
Checking for /usr/local/etc/amportal.conf..This is a new instalation. Copyng default /usr/local/etc/amportal.conf and creating the databases...
/usr/local/etc/amportal.conf does not exist, copying default
Creating new /usr/local/etc/amportal.conf
Created /usr/local/www/data/FreePBX
Created /usr/local/www/data/FreePBX/panel
/usr/local/etc/amportal.conf written OK
Reading /usr/local/etc/amportal.conf..OK
Checking for /usr/local/etc/asterisk/asterisk.conf..OK
Reading /usr/local/etc/asterisk/asterisk.conf..OK
Checking for Asterisk 1.2..OK
Checking for selinux..selinuxenabled: not found
OK
Connecting to database..FAILED
Try running ./install_amp --username=user --password=pass  (using your own user and pass)
[FATAL] Cannot connect to database
*** Error code 1

Stop in /a/ports/net/freepbx.
================================================================
build of /usr/ports/net/freepbx ended at Wed Nov  8 22:50:18 UTC 2006
-----

The full log is here:
https://tinderbox.amd64.ipt.ru/tb/errors/6-bsam-exp/freepbx-2.1.3.log

Seems that you test the port at a system with installed MySQL. That
won't do a good testing. ;-) 'cause the package will be tested/created
at a system without one.

Well, the port is very near to committing now, just some extra
work/testing is needed. Thanks, the port is great.


WBR
-- 
bsam
Comment 7 Boris B.Samorodov 2006-11-09 12:21:59 UTC
Hi,

just one more note.

The port is using bash as a run-time dependency. It will be great if
you can remove that.

Thanks.

WBR
-- 
bsam
Comment 8 Marcelo Araujo 2006-11-12 12:39:59 UTC
Hi Boris,
Please, update my mail address, I dont received your feed-back....
I read your notes and execute this task, I make different check
inside Makefile and update install.pl.
Well, function install and deinstall this OK..
Please your search any other problems contact-me .
This shar is finally installation...    I fix bugs description in
port conform your NOTE.



Best Regards.

-- Araujo <araujo@fug.com.br>
http://experience.bsdnetwork.org
http://www.fug.com.br


-- 
_______________________________________________
Get your free email from http://bsdmail.com
Comment 9 Boris B.Samorodov 2006-11-12 22:03:41 UTC
On Sun, 12 Nov 2006 09:39:59 -0300 M. Araujo wrote:

> Hi Boris,

Hello,

it's a good sing that you didn't call me "Hi My Nightmare"! ;-)

> Please, update my mail address, I dont received your feed-back....

OK, Which one I should use? I have a choice between that from a "To"
field ("M. Araujo" <araujo@bsdmail.org>) and from the bottom of your
letter (Araujo <araujo@fug.com.br>).

> I read your notes and execute this task, I make different check
> inside Makefile and update install.pl.
> Well, function install and deinstall this OK..
> Please your search any other problems contact-me .
> This shar is finally installation...    I fix bugs description in
> port conform your NOTE.

Great, if nobody beats me at it, I'll do some testing at theis
weekend.


WBR
-- 
Boris Samorodov (bsam)
Research Engineer, http://www.ipt.ru Telephone & Internet SP
FreeBSD committer, http://www.FreeBSD.org The Power To Serve
Comment 10 Boris B.Samorodov 2006-11-22 18:12:52 UTC
On Sun, 12 Nov 2006 09:39:59 -0300 M. Araujo wrote:

> I read your notes and execute this task, I make different check
> inside Makefile and update install.pl.
> Well, function install and deinstall this OK..
> Please your search any other problems contact-me .
> This shar is finally installation...    I fix bugs description in
> port conform your NOTE.

There is a good tool for testing a new port: sysutils/portlint.
Please, install it, run and try to change your port so this command
doesn't complain. If you have any questions feel free to contact me by
email.

So far ther are too many fatal errors portlint is showing up and I
don't have much time to look at them. Sorry.


WBR
-- 
bsam
Comment 11 Gabor Kovesdan 2006-12-20 00:14:55 UTC
Dear Submitter,

are you still interested in fixing this port so that it can be committed,
or can we close this problem report? I'm looking forward to
your answer. Thank you for your time on contributing to FreeBSD.

Regards,
Gabor Kovesdan
Comment 12 Marcelo Araujo 2006-12-20 01:20:25 UTC
Hi,
I obtained to finish this today port, I will go to repass the email that I =
sent for &#8220;Boris Samorodov&#8221; has little time behind.

Port finished: http://server3.bon.matrix.com.br/araujo//pub/freepbx/freepbx=
.shar

Best regards.

> ----- Original Message -----
> From: "K=F6vesd=E1n G=E1bor" <gabor.kovesdan@t-hosting.hu>
> To: bug-followup@FreeBSD.org, araujo@bsdmail.org
> Subject: Re: ports/95279: (New Port) FreeBPX: a web gui to the asterisk P=
BX
> Date: Wed, 20 Dec 2006 01:14:55 +0100
>=20
>=20
> Dear Submitter,
>=20
> are you still interested in fixing this port so that it can be committed,
> or can we close this problem report? I'm looking forward to
> your answer. Thank you for your time on contributing to FreeBSD.
>=20
> Regards,
> Gabor Kovesdan

>




Atenciosamente.

-- Araujo <araujo@fug.com.br>
http://experience.bsdnetwork.org
http://www.fug.com.br


--=20
_______________________________________________
Get your free email from http://bsdmail.com
Comment 13 Marcelo Araujo 2006-12-20 01:20:33 UTC
Hi,
I obtained to finish this today port, I will go to repass the email that I =
sent for &#8220;Boris Samorodov&#8221; has little time behind.

Port finished: http://server3.bon.matrix.com.br/araujo/pub/freepbx/freepbx.=
shar

Best regards.

> ----- Original Message -----
> From: "K=F6vesd=E1n G=E1bor" <gabor.kovesdan@t-hosting.hu>
> To: bug-followup@FreeBSD.org, araujo@bsdmail.org
> Subject: Re: ports/95279: (New Port) FreeBPX: a web gui to the asterisk P=
BX
> Date: Wed, 20 Dec 2006 01:14:55 +0100
>=20
>=20
> Dear Submitter,
>=20
> are you still interested in fixing this port so that it can be committed,
> or can we close this problem report? I'm looking forward to
> your answer. Thank you for your time on contributing to FreeBSD.
>=20
> Regards,
> Gabor Kovesdan

>




Atenciosamente.

-- Araujo <araujo@fug.com.br>
http://experience.bsdnetwork.org
http://www.fug.com.br


--=20
_______________________________________________
Get your free email from http://bsdmail.com
Comment 14 Gabor Kovesdan freebsd_committer freebsd_triage 2006-12-20 21:54:40 UTC
State Changed
From-To: feedback->open

Feedback received. 


Comment 15 Gabor Kovesdan freebsd_committer freebsd_triage 2006-12-20 21:54:40 UTC
Responsible Changed
From-To: freebsd-ports-bugs->gabor

Take.
Comment 16 Gabor Kovesdan freebsd_committer freebsd_triage 2006-12-22 14:00:22 UTC
State Changed
From-To: open->feedback

The packing list is wrong. Could you fix it, please? 
A build log is available here: 
http://people.freebsd.org/~gabor/logs/freepbx-2.1.3.log 

Regards, 
Gabor
Comment 17 Gabor Kovesdan freebsd_committer freebsd_triage 2007-01-02 17:32:51 UTC
Please always keep CC'ing bug-followup@FreeBSD.org when replying, so 
that GNATS can record your answers. The patch you sent in private mail 
is still wrong, the following files/directories aren't deleted when 
removing the port:

1144606       84 -rw-r--r--    1 root             wheel               
41396 Jan  2 16:34 usr/local/etc/php.ini
1144605       84 -rw-r--r--    1 root             wheel               
41379 Jan  2 16:34 usr/local/etc/php.ini.bak
1141740        8 drwxr-xr-x    2 root             wheel                
2560 Jan  2 16:35 usr/local/etc/asterisk
1141755        4 -r--r--r--    1 root             wheel                 
190 Jan  2 16:35 usr/local/etc/asterisk/dmsmgr.conf
3622912        4 drwxr-xr-x    3 root             wheel                 
512 Jan  2 16:35 usr/local/share/asterisk
295588       12 drwxr-xr-x    3 root             wheel                
5632 Jan  2 16:35 usr/local/share/asterisk/sounds
3704457        4 drwxr-xr-x    2 root             wheel                 
512 Jan  2 16:35 usr/local/share/asterisk/sounds/custom
1142781        4 drwxr-xr-x    3 root             wheel                
1024 Jan  2 16:35 usr/local/www/data-dist
1732312        4 drwxr-xr-x    3 root             wheel                 
512 Jan  2 16:35 usr/local/www/data-dist/FreePBX
1733321        4 drwxr-xr-x    2 root             wheel                 
512 Jan  2 16:35 usr/local/www/data-dist/FreePBX/panel
1730767        4 drwxr-xr-x    2 root             wheel                 
512 Jan  2 16:35 usr/local/freepbx


Regards,
Gabor
Comment 18 jsilberberg 2007-01-30 15:31:25 UTC

         Well I am attempting to build this port on FreeBSD 6.2 used 
the code from 12-19-2006 Posting..
         <http://server3.bon.matrix.com.br/araujo//pub/freepbx/freepbx=>http://server3.bon.matrix.com.br/araujo//pub/freepbx/freepbx.shar

         But I am seeing the issue reported earlier, am I using the 
latest version of this port ??

         TIA,
         JMS

         asterisk# cd /usr/ports/misc/freepbx
         asterisk# make
         ===>  Patching for freepbx-2.1.0
         ===>   freepbx-2.1.0 depends on file: /usr/local/bin/perl5.8.8 - found
         ===>  Applying FreeBSD patches for freepbx-2.1.0
         Ignoring previously applied (or reversed) patch.
         2 out of 2 hunks ignored--saving rejects to apply_conf.sh.rej
         => Patch patch-apply_conf.sh failed to apply cleanly.
         *** Error code 1

         Stop in /usr/ports/misc/freepbx.
         asterisk#

asterisk# cat work/freepbx-2.1.0/apply_conf.sh.rej
***************
*** 1,4 ****
- #!/bin/bash
   if [ "$1" == "-h" ]
   then
--- 1,4 ----
+ #!/usr/bin/env bash
   if [ "$1" == "-h" ]
   then
***************
*** 29,59 ****
   echo "Updating configuration..."
- echo "/etc/asterisk/cdr_mysql.conf"
- sed -r -i "s/user=[a-zA-Z0-9]*/user=$AMPDBUSER/" 
/etc/asterisk/cdr_mysql.conf
- sed -r -i "s/password=[a-zA-Z0-9]*/password=$AMPDBPASS/" 
/etc/asterisk/cdr_mysql.conf
- sed -r -i "s/hostname=[a-zA-Z0-9.-]*/hostname=$AMPDBHOST/" 
/etc/asterisk/cdr_mysql.conf
-
- echo "/etc/asterisk/manager.conf"
- sed -r -i "s/secret = [a-zA-Z0-9]*/secret = $AMPMGRPASS/" 
/etc/asterisk/manager.conf
- sed -r -i "/\[general\]/!s/\[[a-zA-Z0-9]+\]/[$AMPMGRUSER]/" 
/etc/asterisk/manager.conf

   if [ -e $AMPWEBROOT"/panel/op_server.cfg" ]; then
         echo $AMPWEBROOT"/panel/op_server.cfg"
-       sed -r -i 
"s/manager_user=[a-zA-Z0-9]*/manager_user=$AMPMGRUSER/" 
$FOPWEBROOT/op_server.cfg
-       sed -r -i 
"s/manager_secret=[a-zA-Z0-9]*/manager_secret=$AMPMGRPASS/" 
$FOPWEBROOT/op_server.cfg
-       sed -r -i 
"s/web_hostname=[a-zA-Z0-9_.-]*/web_hostname=$AMPWEBADDRESS/" 
$FOPWEBROOT/op_server.cfg
-       sed -r -i 
"s/security_code=[a-zA-Z0-9]*/security_code=$FOPPASSWORD/" 
$FOPWEBROOT/op_server.cfg
-       sed -r -i 
"s!flash_dir=[a-zA-Z0-9_./\-]*!flash_dir=$FOPWEBROOT!" 
$FOPWEBROOT/op_server.cfg
-       sed -r -i 
"s!web_hostname=[a-zA-Z0-9.-]*!web_hostname=$AMPWEBADDRESS!" 
$FOPWEBROOT/op_server.cfg
-       sed -r -i 
"s!web_hostname=[a-zA-Z0-9.-]*!web_hostname=$AMPWEBADDRESS!" 
$FOPWEBROOT/op_server.cfg
   fi

- echo "/etc/asterisk/vm_email.inc"
   if [ "xx$AMPWEBADDRESS" = "xx" ]; then
         echo "You might need to modify /etc/asterisk/vm_email.inc manually"
   else
-       sed -r -i 
"s!<http://.*/recordings!http://$AMPWEBADDRESS/recordings!> 
/etc/asterisk/vm_email.inc
   fi


--- 29,59 ----
   echo "Updating configuration..."
+ echo "$ASTETCDIR/cdr_mysql.conf"
+ sed -i.bak "s/user=[a-zA-Z0-9]*/user=$AMPDBUSER/" $ASTETCDIR/cdr_mysql.conf
+ sed -i.bak "s/password=[a-zA-Z0-9]*/password=$AMPDBPASS/" 
$ASTETCDIR/cdr_mysql.conf
+ sed -i.bak "s/hostname=[a-zA-Z0-9.-]*/hostname=$AMPDBHOST/" 
$ASTETCDIR/cdr_mysql.conf
+
+ echo "$ASTETCDIR/manager.conf"
+ sed -i.bak "s/secret = [a-zA-Z0-9]*/secret = $AMPMGRPASS/" 
$ASTETCDIR/manager.conf
+ sed -i.bak "/\[general\]/!s/\[.*\]/\[$AMPMGRUSER\]/" $ASTETCDIR/manager.conf

   if [ -e $AMPWEBROOT"/panel/op_server.cfg" ]; then
         echo $AMPWEBROOT"/panel/op_server.cfg"
+       sed -i.bak 
"s/manager_user=[a-zA-Z0-9]*/manager_user=$AMPMGRUSER/" 
$FOPWEBROOT/op_server.cfg
+       sed -i.bak 
"s/manager_secret=[a-zA-Z0-9]*/manager_secret=$AMPMGRPASS/" 
$FOPWEBROOT/op_server.cfg
+       sed -i.bak 
"s/web_hostname=[a-zA-Z0-9_.-]*/web_hostname=$AMPWEBADDRESS/" 
$FOPWEBROOT/op_server.cfg
+       sed -i.bak 
"s/security_code=[a-zA-Z0-9]*/security_code=$FOPPASSWORD/" 
$FOPWEBROOT/op_server.cfg
+       sed -i.bak 
"s!flash_dir=[a-zA-Z0-9_./\-]*!flash_dir=$FOPWEBROOT!" 
$FOPWEBROOT/op_server.cfg
+       sed -i.bak 
"s!web_hostname=[a-zA-Z0-9.-]*!web_hostname=$AMPWEBADDRESS!" 
$FOPWEBROOT/op_server.cfg
+       sed -i.bak 
"s!web_hostname=[a-zA-Z0-9.-]*!web_hostname=$AMPWEBADDRESS!" 
$FOPWEBROOT/op_server.cfg
   fi

+ echo "$ASTETCDIR/vm_email.inc"
   if [ "xx$AMPWEBADDRESS" = "xx" ]; then
         echo "You might need to modify /etc/asterisk/vm_email.inc manually"
   else
+       sed -i.bak 
"s!<http://.*/recordings!http://$AMPWEBADDRESS/recordings!> 
$ASTETCDIR/vm_email.inc
   fi


asterisk#



Jeffrey Silberberg
CompuDesigns, Inc.
Atlanta, GA. 30350
Comment 19 Phillip N. 2007-05-29 01:31:05 UTC
Please close this pr, as the port is obsolete, and noboady seem to care
about it.

Anyway, FreePBX2.2 should be used, as it works with asterisk 1.4..
I guess it should be a totally different port.

thanks!
Comment 20 Gabor Kovesdan freebsd_committer freebsd_triage 2007-05-31 00:14:46 UTC
State Changed
From-To: feedback->closed

Closing per submitter's request, since this PR is obsolete and got stalled. 
(Also discussed with araujo@, who was involved before, too.)