PIONEERS Living the Ubuntu Dream

jeff.h

Guru
Joined
Dec 1, 2010
Messages
502
Reaction score
71
End of day three and there hasn't been one complaint from anyone, nor have I had any problems with anything. I even played around with putting it on a Foxconn box. I couldn't believe how much faster it boots than Cent or SL (6.5 or 7 ).
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,201
Reaction score
5,221
BuByxkwCMAA2cn-.jpg:large
 

tm1000

Schmoozecom INC/FreePBX
Joined
Dec 1, 2009
Messages
1,360
Reaction score
78
Some pointers (please do not take these the wrong way, I am mearly trying to help):

  1. Please remove the option "--no-create-home" when using adduser to add the Asterisk user. This option may cause issues with FreePBX 12. (I've said this once before in this thread but it was overlooked)
  2. In FreePBX 12, there is no need to run "mysql -u root -p${ADMIN_PASS} asterisk < SQL/newinstall.sql" and "mysql -u root -p${ADMIN_PASS} asteriskcdrdb < SQL/cdr_mysql_table.sql" if you are also sending the option "--installdb", running both of those is essentially a duplicated command. However in FreePBX 2.11 you should just omit the "--installdb" command. So basically use "--installdb" in FreePBX 12, don't use it in FreePBX 2.11 and in FreePBX 12 don't run the extra "mysql -u root -p${ADMIN_PASS} asterisk < SQL/newinstall.sql" and "mysql -u root -p${ADMIN_PASS} asteriskcdrdb < SQL/cdr_mysql_table.sql" they are uneeded.
  3. You don't need to run "update admin set value='true' where variable="need_reload";" if you are going to run "amportal a r" right after it, it's essentially a wasted command, just run "amportal a r" and remove "update admin set value='true' where variable="need_reload";"
  4. Running this command "update sip set data="$ext701" where id="701" and keyword="secret";" won't do anything as you never added the randomized extension to begin with. Therefore you are updating a row that doesn't even exist.
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,201
Reaction score
5,221
Thanks, tm1000. Always appreciate your tips and didn't take any of them the wrong way. As usual, your tips are an enormous help. #4 works for us because we load a FreePBX image that includes the 701 extension before we run the command. If there were a documented way to add an extension, a trunk, an inbound route, and an outbound route, THAT would be immensely helpful to many of us.

Will work on addressing the other points which all seem to go to eliminating redundancy which is a good thing and a clear sign that we don't quite know how all the FreePBX pieces fit together.

THANKS for grading my paper. That's what open source is all about!! And it's good to be back in school again. :smartass:
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,201
Reaction score
5,221
Just a heads up that Digital Ocean does NOT create a swap file or swap partition as part of their builds. You will want one, or you may experience problems when you run out of RAM... especially on the 512MB droplets. Here's how:
Code:
dd if=/dev/zero of=/swapfile bs=1024 count=1024k
chown root:root /swapfile
chmod 0600 /swapfile
mkswap /swapfile
swapon /swapfile
echo "/swapfile      none    swap    sw      0      0" >> /etc/fstab
echo 10 | sudo tee /proc/sys/vm/swappiness
echo vm.swappiness = 10 | sudo tee -a /etc/sysctl.conf
free -h
 

w1ve

Guru
Joined
Nov 15, 2007
Messages
819
Reaction score
218
Hey Ward -- Was reading the latest article. When I go to my developer page at Google, and I look at APIs and AUTH, there is no entry for Speech. Has this changed again?

BTW, on another box I'm using the googletts.agi script and it seems to work fine.

Installed on a DO Droplet and flawless so far...

Gerry
 

jeff.h

Guru
Joined
Dec 1, 2010
Messages
502
Reaction score
71
One thing I have noticed is that when I do a full backup of the system using the backup and restore module I cannot do an actual restore. However, if I set the backup to only do the configs and CDRs it will restore just fine and even restore on another Ubuntu based PIAF PBX. I then tried adding in the system audio and voice mail options and it worked as well.

There were a few settings that didn't restore in either scenario like voice mail is disabled on all extensions, you have to manually enable and reconfigure each extension. I also change the from string and email body message in voice mail admin, those settings didn't survive either and I had to manually copy them to the new box.

Using incredible backup I am able to do a full restore as long as its on the same platform. For example, I was able to restore a backup from one DO droplet to another, but I was not able to restore to my Foxconn box. It says that it ran, but nothing was there.
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,201
Reaction score
5,221
Hey Ward -- Was reading the latest article. When I go to my developer page at Google, and I look at APIs and AUTH, there is no entry for Speech. Has this changed again?

BTW, on another box I'm using the googletts.agi script and it seems to work fine.

Installed on a DO Droplet and flawless so far...

Gerry


I just set one up on another account and it worked fine. Are you sure you joined the Chrome-Dev group first??
 

tm1000

Schmoozecom INC/FreePBX
Joined
Dec 1, 2009
Messages
1,360
Reaction score
78
If there were a documented way to add an extension, a trunk, an inbound route, and an outbound route, THAT would be immensely helpful to many of us.

I feel your pain there. I plan to document that fully in 13 if that's any consolation. (it is partially changed in 12, but not where I want it to be and will probably be changing)
 

zhando

Guru
Joined
Aug 7, 2014
Messages
22
Reaction score
11
Hello all,

Nice to join you folks. As I stated in the latest Ubuntu thread on NV, I've been endeavoring to "live the ubuntu dream" on a Cubox-i2ex. For those who don't know, Cubox-i2ex is a dual core imx6 ARM box, a cute little black cube about 2 inches square manufactured by a scrappy little company in Israel. I bought a 4 core model to use for XBMC and a 2 core model to serve files to it.

That was back in April.. Put it all together and ho hum.. Things were going ok. But at same time I was getting pretty tired of my PIAF x86 box running CentOS. Something Ward wrote in NV created a new itch: use the small boxes like raspi for your SOHO pbx.. CentOS was just bothering me to no end. I had to try something different with my 2 core Cubox than serve files - I could use the x86 box for that and run other services (dns, dhcp) with webmin as a front end..

This new Ubuntu installation script arrived just in time. Some intrepid souls in the Cubox community hacked together an image of Ubuntu trusty by marrying a cubox kernel from archlinuxarm.org with a debootstrapped minimal trusty installation. I had to run with it! Another feature of interest: the dual core and 4 core cubox models have a functional esata port - I had to try running a mirror/raid1 of /var through a port multiplier. Hosting /var on flash memory to me called out for something better.

Which brings us to right now. I've worked through the installation script and made some notes:

I mentioned previously on NV that knockd is available from the Ubuntu Trusty Universe repos.. No need to download from the Debian repos..

I've also noticed that adding the python-dev package allows a C-extension to be compiled for simplejson which I believe is something needed for pygooglevoice. simplejson will work without the c-extension but C is faster right?

Some things peculiar to Cubox:

Linux kernel headers are not available for the Cubox Trusty image. Headers are needed for dahdi and dahdi doesn't make sense on this box. I adjusted the script to install the dahdi include files, compile/install the dahdi tools - all so libpri could be compiled and installed. I don't know if libpri makes any sense either - but did it for grins anyway.

Some grub adjustments were commented out.. Again no grub on this little box.

The neorouter client install was commented out. It's not available from the Ubuntu arm repos or neorouter.com for all I know. It will have to be installed from source.

So it's up and running and ready for migration from my x86 box. Iptables/Asterisk/Mysql - everything seems to be running. I did make a typescript of the install for further study.

Time to try out incredible backup/restore.
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,201
Reaction score
5,221
zhando: Once you get it working, please share the script/image. Would love to try it and publish it on Nerd Vittles. Thanks.

Would this build also work with CuBox-i4Pro??
 

jeff.h

Guru
Joined
Dec 1, 2010
Messages
502
Reaction score
71
Should I be worried about this error email?

Subject: Cron <root@pbx> test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )

Body: /etc/cron.daily/logrotate:
error: error running shared postrotate script for '/var/log/mysql.log /var/log/mysql/mysql.log /var/log/mysql/mysql-slow.log /var/log/mysql/error.log '
run-parts: /etc/cron.daily/logrotate exited with return code 1
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,201
Reaction score
5,221
jeff.h Scratch that. All of this should have been handled with the #142 patch. Has it been run on this server?? ls -all /etc/pbx will tell you.

If it has been run, try deleting /etc/pbx/.update-ubuntu142 and then log out and back in to be sure everything got updated correctly.
 

jeff.h

Guru
Joined
Dec 1, 2010
Messages
502
Reaction score
71
jeff.h Scratch that. All of this should have been handled with the #142 patch. Has it been run on this server?? ls -all /etc/pbx will tell you.

Looks like it has already ben run.

root@pbx:~# ls -all /etc/pbx
total 20
drwxr-xr-x 2 root root 4096 Aug 9 14:40 .
drwxr-xr-x 110 root root 4096 Aug 12 08:12 ..
-rw-r--r-- 1 root root 0 Aug 9 13:50 .incredible
-rw-r--r-- 1 root root 36 Aug 9 14:39 .update-ubuntu141
-rw-r--r-- 1 root root 24 Aug 9 14:40 .update-ubuntu142
-rw-r--r-- 1 root root 8 Aug 9 13:53 .version
root@pbx:~#
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,201
Reaction score
5,221
There may be a mismatch with the encrypted vs. plain-text password for the debian-sys-maint user account. Try creating and running the following script and let me know if this problem goes away. If so, we'll push out another patch. Thanks.
Code:
amportal stop
export ADMIN_PASS=passw0rd
DEBCONFPASSWORD=`awk '/^password/ { if (NR<7) print $3;}' /etc/mysql/debian.cnf`
echo "Updating debian-sys-maint MySQL user password to plain text..."
mysql -u root -p${ADMIN_PASS} -e "UPDATE mysql.user SET Password = '${DEBCONFPASSWORD}' WHERE  user.User='debian-sys-maint';"
mysql -u root -p${ADMIN_PASS} -e "GRANT ALL PRIVILEGES ON *.* TO 'debian-sys-maint'@'localhost' IDENTIFIED BY '${DEBCONFPASSWORD}';"
echo "Flushing MySQL privileges..."
mysql -u root -p${ADMIN_PASS} -e "FLUSH PRIVILEGES;"
echo "Killing MySQL server the hard way..."
sleep 5
killall mysqld
echo "Resting for a second before restarting  MySQL..."
sleep 10
/etc/init.d/mysql start
amportal start

If that doesn't fix it, then we'll try adjusting it again using the hash value of the password with the IDENTIFIED BY PASSWORD '${DEBCONFPASSWORD}' with the encrypted flavor.
 

jeff.h

Guru
Joined
Dec 1, 2010
Messages
502
Reaction score
71
Looks like that did the trick :thumbsup:

root@pbx:~# mysqladmin --defaults-file=/etc/mysql/debian.cnf ping
mysqld is alive
root@pbx:~#
 

Members online

Forum statistics

Threads
25,812
Messages
167,764
Members
19,241
Latest member
bellabos
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top