PlugPBX Forums
May 19, 2012, 03:08:05 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: New Version under way... sorta  (Read 2796 times)
PlugPBX Admin
Administrator
Sr. Member
*****
Posts: 426



« on: February 11, 2010, 08:31:57 PM »

A generous donation of an 4GB SD card has me starting out on a new PlugPBX build in my rare spare time...

I’m going to toy with the latest debian provided Asterisk via apt first to see if it might best a compiled version, so im playing… Maybe I'll also look at building from apt-source or something so its cleaner from a package management point of view then building from tarballs.

Looking to incorporate everything learned from the Beta1,2,3 releases and some of the tweaks after that. My own setup dies now after 2 days, a reboot and some fsck’s bring it back, but something is wanky with partitioning or possibly the media card, or the kernel (looking to try a newer more up to date version perhaps?)

Going to try a few things differently, and also leave some spare space for a ’survivable’ partition perhaps in the future.  I'm also leaving things like a swap partition out on purpose (but spare space for one to be added if needed...

Maybe I’ll also try and move towards Asterisk 1.6.2 and FreePBX 2.6 since some have asked about it, not sure what the benefits or risks are at this point though.

POST if you have any requests.

POST if you can tell me that Asterisk 1.6.2 and FreePBX 2.6 are risky or not?

UPDATE: I'm playing with flashybrid (very slick) debian package, this could all but eliminate SD card woes and reliability long term!
« Last Edit: February 16, 2010, 07:36:55 PM by PlugPBX Admin » Logged

-Greg
TenOfZero
Newbie
*
Posts: 17



« Reply #1 on: February 13, 2010, 10:51:09 AM »

My old set-up was running on a cheap HP netbook and I had the latest versions of freePBX and asterisk, and I ahd no issues at all.

The favorite new feature for me what a plug-in that allows me to select/deselect codecs, and set nat options right from the free PBX interface.

I look forward to a new version coming out, but I do not look forward to having to reset-up everything from scratch.

Once again, thank-you for all your hard work :-)
Logged
regloh
Guest
« Reply #2 on: February 14, 2010, 03:59:16 AM »

Hi,

The favorite new feature for me what a plug-in that allows me to select/deselect codecs, and set nat options right from the free PBX interface.
You can select/deselect codecs from the FreePBX interface already:
 - extensions aka phones: go to extensions and select a extension you want to modify. The modifications you are searching for is in the section "device options" (allow, disallow and nat)
-  trunks: go to trunks and select a sip trunk. Go to peer details and add here e.g.:
   disallow=all
   allow=gsm
   allow=ulaw
   allow=alaw
   qualify=yes
   nat=no

Quote
I look forward to a new version coming out, but I do not look forward to having to reset-up everything from scratch.
you can backup and restore your configs with the backup and restore module of FreePBX and two simple scripts.
e.g. I use tftpd for phone deployment and the backup/restore module to backup my config to a ftp-server in my network.
A new plug can be initialized by inserting the sd-card, booting the plug, ssh to the plug, getting the script from the ftp-server, executing the script,
installing the backup and restore module via freepbx, executing the restore feature of the module and being back in the business after 10 minutes.

plugpbx-config
Code:
#!/bin/bash
## script to configure a plugpbx standard installation
## usage: plugpbx-config
##
## tasks performed by the script
## regenerating the ssh keys, because the installed ones are identical on every system
## configuring locals and timezone
## opt: installing tftpd for device deployment
## opt: preparing FreePBX to make backups to a ftp-Server
##                                
## Copyright (C) 2010 Holger Imbery code@imbery.de
## This program is free software; you can redistribute it and/or modify it
## under the terms of the GNU General Public License as published
## by the Free Software Foundation; either version 3 of the License,
## or (at your option) any later version.
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
## or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
## You should have received a copy of the GNU General Public License along with this program;
## if not, see <http://www.gnu.org/licenses/>.


### config section
FTPBACKUP=yes
FTPUSER=$$$$$$$
FTPPASSWORD=$$$$$$$$
FTPSUBDIR=/mnt/DroboShares/Drobo/plugpbx/backup
FTPRESTORE=/ConnectedDrobos/Drobo/plugpbx/backup
FTPSERVER=192.168.10.4
### end of config


# yes/no function for script interaction

function promptyn ()
{
        echo -n "$1 [y/N]? "
        read ANSWER
if [ ! -z $ANSWER ]
then
       if [ $ANSWER = Y ] || [ $ANSWER = y ]
       then
                 ANSWER=Y
         else
                 ANSWER=N
         fi
else
ANSWER=N
fi
}

clear
# startup question
echo "plugpbx-config"
promptyn "Do you have configured the script?"
        if [ "$ANSWER" = "N" ] ; then
                echo "open the script with an editor and edit the config section"
                exit;        
 else  echo "Great"
        fi

# regenerate SSH keys
echo  "regenerating ssh keys"
rm /etc/ssh/ssh_host*
ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key -N ""
ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N ""


# setup locales and timezone
dpkg-reconfigure tzdata
dpkg-reconfigure locales

# install tftpd
echo "Preparing to install a tftp server for phone deployment."
promptyn "Would you like to install the tftp Server?"
if [ "$ANSWER" = "N" ] ; then
echo "tftp server will NOT be installed, press enter to continue" ;read input

         else apt-get update
             apt-get install -y tftpd
fi
# install ftp backup for freepbx backup and restore module
echo "Preparing to install the ftpbackup method for the backup/restore module of freepbx."
promptyn "Would you like to install it?"
        if [ "$ANSWER" = "N" ] ; then
                echo "ftpbackup will NOT be installed, press enter to continue" ;read input
         else  echo "Please check the variables:"
               echo "ftp username: $FTPUSER"
               echo "ftp password: $FTPPASSWORD"
               echo "ftp server ip: $FTPSERVER"
               echo "ftp server subdirectory: $FTPSUBDIR"
promptyn "Is this correct ?"
        if [ "$ANSWER" = "N" ] ; then
                echo "Please edit the config section of this script and restart, press enter to exit" ;read input
                exit;
         else  sed -i "s/# FTPBACKUP=yes/FTPBACKUP=yes/" /etc/amportal.conf
               sed -i "s/#FTPUSER=asterisk/FTPUSER=${FTPUSER}/" /etc/amportal.conf
               sed -i "s/#FTPPASSWORD=password/FTPPASSWORD=${FTPPASSWORD}/" /etc/amportal.conf
               sed -r -i "s|#FTPSUBDIR=mybackupfolder|FTPSUBDIR=${FTPSUBDIR}|" /etc/amportal.conf
               sed -i "s/#FTPSERVER=myftpserver/FTPSERVER=${FTPSERVER}/" /etc/amportal.conf
               sed -r -i "s|#AMPPROVROOT=/var/ftp /tftpboot|AMPPROVROOT=/tftpboot/|" /etc/amportal.conf
               echo  "FreePBX configuration is patched. Please install backup and restore module and configure a backup set"

fi

        fi


plugpbx-recover
Code:
#!/bin/bash
## script to recover plugpbx from a previous saved state on a ftp-server
## usage: plugpbx-recover
##                                
## Copyright (C) 2010 Holger Imbery code@imbery.de
## This program is free software; you can redistribute it and/or modify it
## under the terms of the GNU General Public License as published
## by the Free Software Foundation; either version 3 of the License,
## or (at your option) any later version.
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
## or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
## You should have received a copy of the GNU General Public License along with this program;
## if not, see <http://www.gnu.org/licenses/>.


### config section
FTPBACKUP=yes
FTPUSER=$$$$$$$$$$$
FTPPASSWORD=$$$$$$$$$$$
FTPSUBDIR=/mnt/DroboShares/Drobo/plugpbx/backup
FTPRESTORE=/ConnectedDrobos/Drobo/plugpbx/backup
FTPSERVER=192.168.10.4
### end of config


# yes/no function for script interaction

function promptyn ()
{
        echo -n "$1 [y/N]? "
        read ANSWER
if [ ! -z $ANSWER ]
then
       if [ $ANSWER = Y ] || [ $ANSWER = y ]
       then
                 ANSWER=Y
         else
                 ANSWER=N
         fi
else
ANSWER=N
fi
}

clear
# startup question
echo "plugpbx-recover"
promptyn "Do you have configured the script?"
        if [ "$ANSWER" = "N" ] ; then
                echo "open the script with an editor and edit the config section"
                exit;
        else  echo "Great"
        fi
#  restore a new system
echo "Preparing to restore your configuration."
promptyn "Would you like to restore your plugpbx to a previous saved state?"
        if [ "$ANSWER" = "N" ] ; then
                echo "plugpbx will NOT be restored, press enter to continue"
         else  mkdir /var/lib/asterisk/backups
               mkdir /var/lib/asterisk/backups/Full
               cd /var/lib/asterisk/backups/Full
               wget  --ftp-user=$FTPUSER --ftp-password=$FTPPASSWORD ftp://$FTPSERVER$FTPRESTORE/*
               chown -R asterisk:asterisk /var/lib/asterisk/backups
      echo "Please install the backup and restore module via FreePBX module manager and perform a restore"
fi


EDIT 20100215: splitted the script in two scripts and did a little debugging
You can grab the latest version of the scripts at: www.himbeerfrosch.com

Holger
« Last Edit: February 15, 2010, 01:16:06 PM by regloh » Logged
PlugPBX Admin
Administrator
Sr. Member
*****
Posts: 426



« Reply #3 on: February 14, 2010, 07:06:28 AM »

Very cool!
Logged

-Greg
TenOfZero
Newbie
*
Posts: 17



« Reply #4 on: February 15, 2010, 04:40:19 PM »

you can backup and restore your configs with the backup and restore module of FreePBX and two simple scripts.
e.g. I use tftpd for phone deployment and the backup/restore module to backup my config to a ftp-server in my network.
A new plug can be initialized by inserting the sd-card, booting the plug, ssh to the plug, getting the script from the ftp-server, executing the script,
installing the backup and restore module via freepbx, executing the restore feature of the module and being back in the business after 10 minutes.

Wow sweet, thx for all the info.

Will this work intra version?
Logged
regloh
Guest
« Reply #5 on: February 16, 2010, 01:44:08 AM »

Quote
Will this work intra version?

The backup/restore module is NOT backwards/forwards compatible (FreePBX has to be on the same version), but there is no reason for not upgrading FreePBX to the latest release version with the upgrade tool (via module Admin) on the SheevaPlug.
My Plug is running FreePBX 2.6.0.1 and the configuration was done by a restore (with the script) from my old elastix setup.
 

There is a way for restoring a config from an older FreePBX version to a new version of FreePBX, but this is a bumpy road, but it is doable.


Holger





« Last Edit: February 16, 2010, 10:43:51 AM by regloh » Logged
PlugPBX Admin
Administrator
Sr. Member
*****
Posts: 426



« Reply #6 on: February 26, 2010, 05:39:37 AM »

Just a quick update, so far the ram drive / flashybrid is working past SD card deaths I usually have with my crappy test SD cards. Usage stable, and I've been able to update things and 'commit' them to flash. The process is manual, but a few scripts sudo'd to a web interface and its ready for prime time.

I'm going to let what I have run another week or two yet, and if continues to be flat lined, ill start cooking a new image based on what I've learned thus far. Components will be same version so people will be able to backup and restore their setups - and for those who don't want the ram disk scheme, you'll be able to turn off the entire thing with a single configuration file.

All the little bugs and issues (and fixes) offered so far by everyone is great, and I'll be sure to include those in the next image generated!

Stay tuned!
Logged

-Greg
remon
Newbie
*
Posts: 1


« Reply #7 on: March 21, 2010, 12:38:45 AM »

Hi to all

first, i would like to say thank you very much for your great job!

do you have any idea, when the new image will be released?
Logged
PlugPBX Admin
Administrator
Sr. Member
*****
Posts: 426



« Reply #8 on: March 21, 2010, 02:00:33 PM »

When Its done its done Wink

So far I've got 15 days uptime. I want to see at least a month of stable usage before I push out a major update. You can understand the need to test stability.

Code:
PlugPBX:~# uptime
 16:58:57 up 15 days, 16:59,  1 user,  load average: 0.00, 0.00, 0.00

The more people who apply the flashybrid setup and test, the more testers, the longer run-time, the greater my comfort level sitting down and building a new release.

I'd project in the next 4-6 weeks, likely less unless it crashes and burns in my own lab before then. So far, so good!
Logged

-Greg
PlugPBX Admin
Administrator
Sr. Member
*****
Posts: 426



« Reply #9 on: May 11, 2010, 03:23:59 PM »

I ordered a third SheevaPlug, as the first two in my house run our own PlugPBX and another side project. Taking either down for testing gets the other house hold occupants 'angry'. So its slowed down my work, BUT once it arrives I can tinker alot more freely again - including building new binaries etc easily (I'm lazy, I'll just use a Sheeva to build native binaries and test)

ETA 2-4 weeks and I can get chugging away again!
Logged

-Greg
PlugPBX Admin
Administrator
Sr. Member
*****
Posts: 426



« Reply #10 on: July 07, 2010, 06:10:57 PM »

mattmc97 has gotten asterisk working with FreePBX WITHOUT having to compile asterisk from source.

This is very cool, since when I built PlugPBX 1.00 waaaay back around xmas, I could only get a compiled version to work with FreePBX.

Sounds like mattmc97's progress is good, so we're hoping to build on top of that for the next release. Allows people to apt-get install and update Asterisk at will hopefully and eliminate all that compiling stuff.

It also means once a working install 'sequence' is known, you can easily build your own with a single script running all the apt-get commands, which would allow anyone to 'roll' their own PlugPBX. Would be cool to see versions that include add-ons, whatever people want (home automation, torrent/newsgroups down-loaders, upnp server, mp3 streamer) etc etc.

Aaaaanyways, my new SheevaPlug is on my desk, and once mattmc97 gets a little bit further i'll have to image his progress on an SD card (or mirror his efforts) and see what it all comes out to.

This also will allow us to have the serial console work again on the newer rev devices (since mine is too). I suspect its something in the vmlinux boot image, but have not had the time to find out what.

It's cool to see other people starting to tinker along side myself. I always wanted to get a small community rallying around this neat little 3 watt hobby Wink

Keep Plugging away fellow geeks. More are slowly discovering PlugPBX every day and the exciting home-brew PlugComputer hobby. Embedded is not just for the big guys anymore.

Anyone can build a server, but it takes a real man (or woman) to cram it down into a 3 watt box the size of a drinking box Tongue

Logged

-Greg
PlugPBX Admin
Administrator
Sr. Member
*****
Posts: 426



« Reply #11 on: September 12, 2010, 08:30:20 PM »

..Still alive. Summer is sadly slipping away here at home. The harsh winter comes, so indoors I'll soon withdraw, more time to spare, tinker and get this little hobby going again. Given the summer fun and holidays, I'd rather be out there then slaving away on a computer so Tongue

I know I've dragged my butt and not produced anything new to release for awhile (but have been running an iteration of it for many months in my own home, testing it both here and some close friends houses) so fret not....

I like the Debian philosophy, we'll release it when we're good and ready and not a minute sooner. I may promise the world and then renege. Meh.

I'm 95 days away from a full year ago, when I registered this domain name and fired up this website, enough donations have come in to pay my hosting costs for the past year, and a little bit into the next year, so if you have a few bucks to spare, as always, thanks!

I'm looking forward to taking all the lessons learned, tips, feedback and my own problems solved from the first iteration of PlugPBX, along with what I've got running in house now (flashybrid setup) and make it available for the masses in time...

To the countless people out there who've contributed to these forums, posted ideas, problems, help, advice, scripts - thank you. The jewel of any website is its forums, its community, its users - namely, you - who's reading this. I'm glad I setup the forum!
Logged

-Greg
PlugPBX Admin
Administrator
Sr. Member
*****
Posts: 426



« Reply #12 on: December 21, 2010, 08:11:31 PM »

Well I finished my office (almost)

on my desk sits a newer generation SheevaPlug, and while I type this debian is happily running a net-install. Over the next little while I'll pour over all our lessons learned, and play around with various ways of installing Asterisk (and hoping i can avoid dhadi hell) ... Its been a year, and i think its time to collect the lessons learned here, all the hard work of others - and pour it into the next major version. Its winter, its cold - and its warm in my office. Hence - what better time to hack and modernize PlugPBX 2.0.

It begins...
Logged

-Greg
snowtr
Newbie
*
Posts: 16


Email
« Reply #13 on: December 27, 2010, 11:36:11 PM »

If possible could you see about playing with FreePBX 2.8?

I know of various issues in 2.6 I think would be good to skip over in PlugPBX 2.0.

Thanks a lot dude !
Logged
PlugPBX Admin
Administrator
Sr. Member
*****
Posts: 426



« Reply #14 on: December 28, 2010, 08:28:20 AM »

Asterisk 1.8.x and FreePBX 2.8 - the prototype build script has setup/installed them, but I just have to solve the Asterisk compile and/or media/codec issues with the test build.

I Agree that we should be at FreePBX 2.8.
Logged

-Greg
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.13 | SMF © 2006-2011, Simple Machines LLC Install SimpleMachinesForum web hosting Valid XHTML 1.0! Valid CSS!