Skip to content
Jul 31 14

AstLinux Record Phone Calls to External USB Flash Drive Part 2

by Jon

In part 1 of this post I showed you how to format and mount an external USB drive. Next I will show you how to set up call recording for inbound and outbound phone calls in your Asterisk dialplan.

1. Open extensions.conf to edit and find in the dialplan where inbound calls are directed. I am going to use the example DID number of 8885551234 and use the mixmonitor Asterisk command. See the dialplan below to record an inbound phone call.

exten => 8885551234,1,Answer
exten => 8885551234,n,Set(CDR(userfield)=ib_${STRFTIME(${EPOCH},,%Y%m%d-%H%M%S)}_${EXTEN}_${CALLERID(num)})
exten => 8885551234,n,MixMonitor(ib_${STRFTIME(${EPOCH},,%Y%m%d-%H%M%S)}_${EXTEN}_${CALLERID(num)}.wav)
exten => 8885551234,n,Dial(SIP/100,24,trwW)
exten => 8885551234,n,Voicemail(100,su)
exten => 8885551234,n,Hangup

The most important step here is MixMonitor where you give the recording a filename and format. I choose to use the dialplan destination as well as the caller id number in the filename for future reference and stored it in a wave format.

2. Next let’s do call recording for outbound phone calls, now you need to find that section in the Asterisk dialplan.

exten => _NXXNXXXXXX,1,Set(CDR(userfield)=ob_${STRFTIME(${EPOCH},,%Y%m%d-%H%M%S)}_${EXTEN}_${CALLERID(num)})
exten => _NXXNXXXXXX,n,MixMonitor(ob_${STRFTIME(${EPOCH},,%Y%m%d-%H%M%S)}_${EXTEN}_${CALLERID(num)}.wav)
exten => _NXXNXXXXXX,n,Dial(SIP/${EXTEN}@sip-outbound,60,trwW)
exten => _NXXNXXXXXX,n,Hangup

Above you can see I used the same Asterisk command MixMonitor to create the recording. Again I urge you to check your local laws about recording phone calls.

Now that Asterisk is recording the phone calls we need to make sure the phone calls get stored on the USB drive. In the next part I will show you how to direct the recorded phone calls to the USB drive connected to the PBX.

Jun 22 14

AstLinux Record Phone Calls to External USB Flash Drive Part 1

by Jon

I use AstLinux running on an Alix board at home for my personal phone calls. Alix boards are small and lightweight so it works very well in a low call volume environment. The system has worked very well for me but I have wanted to add call recording to give me the ability to go back and listen to a call for a phone number or address something I may have missed. Of course if you are going to carry out this make sure you know the laws in your state about legal call recording.

With that disclaimer out-of-the-way let’s configure call recording to an external USB drive.

1. First plug your USB drive into an available port on the board. Don’t worry about the format of the file system just make sure you don’t have anything important on the drive because everything gets deleted.

2. Find out how to reference the USB key by doing the following command. # fdisk -l


3. Now here is the part we will delete everything on the drive. To do this we need the /dev/sXX from the prior command, in this instance I used # fdisk /dev/sdb you will then use the d key to delete until all partitions are deleted and w to write the changes.


4. The next step is to create a linux partition on the drive so we use the same # fdisk /dev/sdb command and then use n for new partition followed by the enter key a couple of times for the default options and w again to write the partition.


5. The drive has a partition on it but it has not been formatted so this step will format the drive to a readable format. # mke2fs -q -L ASTREC /dev/sdb1

6. Make a mounting directory like so. # mkdir /mnt/usb

7. Finally we can mount the usb disk. # mount -t ext2 /dev/sdb1 /mnt/usb/

8. Now you can see the new disk by doing a # df -h


In the next post I will show you how to do the call recording in the Asterisk dialplan.

May 25 14

Daily Inspirational Podcast Entrepreneur on Fire

by Jon

entrepreneur-on-fireAs an avid reader of entrepreneurial and business books I recently came across the website EntrepreneurOnFire which is a daily podcast interview of the great ideas and projects some world-renowned entrepreneurs are working on now. I started listening to these recently and it has been an amazing resource for information and motivation to carry out dreams and get started. I highly recommend following their progress and something very unique about this website is the public sharing of their current revenue from this project that started less than 2 years ago in September of 2012.

As posted on their website in March of 2014 the site generated over $180k, an amazing feat considering that it has only taken a year and a half to get to that point. This site has great stories of success and nuggets of information to help get your business off the ground.

Apr 7 14

Microsoft to Stop Supporting Windows XP Operating System April 8th

by Jon

As of this writing Microsoft is going to officially stop supporting the popular Windows XP operating system starting tomorrow, April 8th. Although this will not prevent users computers from running it will however create a flood of hackers targeting these legacy machines. Since announcing lack of support for XP Microsoft has entered into contracts with enterprises and governments for continued support giving these organizations extra time to migrate away from the long favored operating system.



According to some studies Windows XP still accounts for more than 30% of the operating system market which comes out to over 500 million computers. The numbers are pretty astonishing considering that Windows XP is 12 years old. Now these 500 million users have a choice of migrating to a newer Microsoft product like 7 or 8.1, Apples Mac OS X or even a Linux variant. I can imagine this is going to create a large influx of users who take the opportunity to jump ship over to Apple products since everyone is so familiar with iPhones, iPad’s and Apple TV’s it makes it an easier transition.

Apple has a fantastic opportunity to capitalize with Microsoft abandoning so many users. I for one transitioned to Apple years ago while working for a tech startup company. The first use of OS X came with a high learning curve but it was very rewarding once you reach a mid level of proficiency providing a very stable environment and fast responding applications.

So if you are one of the aging Windows XP users out there I would recommend taking a long look at the products coming out of Cupertino.



Mar 20 14

Update to Synology DSM 5.0 NAS OS DS213+

by Jon

I have a Synology DS213+ NAS I use to back up computers and files. Synology recently updated the DSM OS to version 5.0 which I wanted to try on my NAS. Updating a Synology NAS is very easy being just a one click update from the control panel. The update took around 5 minutes and came right back up even with the fact I was doing this all over a remote VPN client connection. Keep in mind there is a recent update to install after the version 5 upgrade is complete so this could take a total of 10-15 minutes.


Once the update was complete the GUI of the Synology was visually enhanced. I would compare it more along the lines of OSX and Apple UI’s.


Overall everything you can expect from Synology still works and a few more bells and whistles. One such feature is the QuickConnect setup which will configure remote management of your NAS automatically setting up port forwarding and a dynamic dns name. Since I have my NAS behind a Meraki MX60 this wouldn’t work for me so I skipped it. The update did not slow down the NAS interface at all it may even have sped it up.

Feb 24 14

IFTTT: If This Than That, Internet API Recipes

by Jon

If this then that is a web API service that has been around for a while now and since it has become very popular I decided it is time to give it a test. The webpage is where users are able to create recipes for internet services using things like Gmail, Belkin WeMo, Craiglist and many other third parties. To see all 87 channels at the time of this writing go to the IFTTT channels page These channels give users the ability to take data or triggers from 1 service to feed another.


A good example of that would be if it is going to rain today send me a txt message in the morning reminding me to bring an umbrella. Another great example is if there is traffic on a highway I take to work call my cell phone so I take a different route.

Some of the major API’s available at this time are from Google, Evernote, Facebook, Apple IOS, and Jawbone UP which are just some of the ones I like to use.

Jan 4 14

Meraki Cloud Managed MR Wireless Access Points

by Jon

I was recently introduced to the Cisco Meraki line of cloud managed network equipment and I was very impressed. The cloud based management of this equipment makes it amazingly easy to configure, deploy and manage. I got my first hands on with a Cisco Meraki MR12 wireless access point through their free online webinar series.


I received the MR12 AP a couple of weeks after attending the online webinar. Installation is as simple a plugging it into a PoE port or standard switch with the included power supply. Once the MR12 is up and has an ip address from your DHCP server the cloud takes over. Login to the Meraki dashboard and add the serial number to your network. Now open up the AP from the cloud control panel and start configuring. When I first go mine I had 2 SSID’s up and running within a matter of 10 minutes with one secure internal wireless network and a public nat’d wireless network including a splash page and 1 hour timeout.

Being able to roll out SSID changes so quickly from a single webpage was pretty amazing. This now gives me the ability to make changes when I am traveling or if I have to remotely do troubleshooting since I am the IT guy of my home network.

So far I really like the Meraki gear and I am looking forward to playing with the MX series security appliance and switches. Since I recently attended a Meraki CMNA certification class I will be getting a MX60 security appliance, 8 port switch and an additional wireless access point.


  • Expensive
  • Cloud interface takes a bit of getting used to


  • Easy to configure
  • Remote management via cloud
  • Detailed reporting included


Dec 10 13

How To: Install OpenVBX on CentOS Rackspace Could Server

by Jon

If you are like me and have a couple old mobile phone numbers that you may have ported to Google Voice or some other service then this post will be very useful. In prior posts I discussed Twilio, SaaS providing voice and sms capabilities, which I have used with my old mobile phone number to ensure I get all my phone calls and txt messages sent to those old numbers. Combining the power of Twilio and OpenVBX, an open source project for a virtual PBX like Grasshopper, I can route calls to my current mobile phone number and have voice mail’s transcribed to my email.

So to do this I had to port the phone numbers I wanted to use over to Twilio which is free and depending on the losing carrier can take 7 days to 30 days. I highly recommend being very thorough with your porting forms and sending in a copy of the bill this will help make sure the process does not get stopped due to the losing carrier.

Once you get an LOA that the numbers are going to port spin up a Rackspace Cloud Centos server to install OpenVBX on. I am a big fan of Rackspace Cloud servers over AWS due to their easy to use interface, number of options like load balancers and Rackspace’s phenomenal support. When I run into problems the support is a chat message away and they always go above and beyond their supported areas, like one instance where I was having problems compiling something with the default kernel they helped me find different kernel sources to get it working. Anyway on to the OpenVBX install.

Once your server is up and running it will require Apache, MySQL and a few dependencies. Use the yum command below to install required software.

yum install httpd php php-pecl-memcache php-pecl-apc-devel php-mysql mysql-server mysql-devel unzip

After the software finishes installing go ahead and reboot the server.

Now you will need to download the OpenVBX software to install on the server. Here is a link to the website and there is a download button on the home page or just do a wget to this url from github

To install the Open VBX app on your web server follow these commands below, this will download the app, put the site in the root of the web server and install the database.

cd /usr/src/
unzip master
mv OpenVBX-master/ /var/www/html/OpenVBX
cd /var/www/html/OpenVBX
service mysqld start
service httpd start
mysqladmin -u root password 'newpassword'
mysql -u root -p'newpassword'
 create database openvbxdb;
mysql -u root -p'newpassword' -D openvbxdb < openvbx.sql
chgrp apache OpenVBX/config/
chgrp apache audio-uploads/
chmod g+w OpenVBX/config/
chmod g+w audio-uploads/

When you are done with that there is a web installer to follow as seen below.

Step 1: Check for all the prerequisites. As you can see in the screenshot I did not setup the permissions correctly but if you followed my command line setup this will not be an issue.


Here you can see the checks all worked perfectly.


Step 2: Next it will ask you to enter in the database credentials as we used above, so in this example it would be as follows:
Username: root
Password: newpassword
Database: openvbxdb


Step 3: Now you need to enter your Twilio account credentials for the API to work correctly, you can find those at the top of the page once you login as highlighted in the screenshot.



Step 4: Enter in an email address you want the PBX notifications to come from.


Step 5: Create your user account to login and configure your virtual PBX and be able to buy DID numbers.


Step 6: All done the install is complete now you can login to your install by clicking the login button and using the username and password you created above.


Nov 18 13

Script to Install Asterisk 1.4.44 on CentOS 6.x Rackspace Cloud

by Jon

Asterisk version 1.4.x is a bit old and outdated but I still like to use that version when testing. Since most of my Asterisk install scripts were for CentOS 4.x I went ahead and updated my script to work on CentOS 6.x and made sure it worked on Rackspace cloud too. Below are the prerequisites and the script.

yum -y update
yum -y groupinstall base "Development tools" "MySQL Database client" "MySQL Database server"
yum -y install ncurses-devel

Once all the updates and prerequisites complete installing restart the server.

chmod 755 asterisk-install-script-1.4.txt


cd /usr/src/
tar zxf dahdi-linux-current.tar.gz
tar zxf dahdi-tools-current.tar.gz
tar zxf libpri-1.4-current.tar.gz
tar zxf asterisk-1.4.44.tar.gz
tar zxf asterisk-addons-1.4.13.tar.gz
cd /usr/src/dahdi-linux-*/
make install
echo "######### DAHDI Linux: Installed #############################"
cd /usr/src/dahdi-tools-*/
make install
make config
echo "######### DAHDI Tools: Installed ##############################"
cd /usr/src/libpri-*/
make install
echo "######### Libpri: Installed ##############################"
cd /usr/src/asterisk-1*/
make install
make samples
make config
chkconfig asterisk on
echo "######### Asterisk: Installed #############################"
cd /usr/src/asterisk-addons*/
make install
echo "######### Asterisk Addons: Installed #############################"
sed -i 's/enforcing/disabled/g' /etc/selinux/config
sed -i 's/permissive/disabled/g' /etc/selinux/config
cd /usr/src/
chkconfig mysqld on
service mysqld start
mysqladmin -u root password 'pick@p@$$w0rd'
mysql -u root -p'pick@p@$$w0rd' < asteriskdatabasefull.sql.txt rm -f /etc/asterisk/cdr_mysql.conf cp /usr/src/cdr_mysql.conf.txt /etc/asterisk/cdr_mysql.conf echo "######### Database Setup ############################" cp /usr/src/asterisk-*/contrib/init.d/rc.redhat.asterisk /etc/init.d/asterisk chmod 755 /etc/init.d/asterisk echo "######### Asterisk Installed as Service ############################" echo "date >> /var/log/server_restart.log " >> /etc/cron.weekly/hardreset
echo "echo reboot server >> /var/log/server_restart.log " >> /etc/cron.weekly/hardreset
echo "shutdown -r now " >> /etc/cron.weekly/hardreset
chmod 755 /etc/cron.weekly/hardreset
echo "######### Weekly Server Reboot ############################"

Oct 18 13

Samsung 11″ Chromebook Review

by Jon

I started traveling more often in the past couple of months which had me considering an ultra-portable laptop. While I was mostly only considering the Macbook Air, since I am an Apple fanboy, the Google Chromebook was always appealing to me. Less than a 7 second boot up time and simple auto update features make the Chromebook very attractive, not to mention the 100GB of free Google Drive storage for 2 years. After reviewing the many Chromebook models I decided to look at the most recent HP 11 model and a year old Samsung Chromebook.

HP 11 Chromebook Specs

As I reviewed specs on both the Samsung and new HP 11 I realized both models used the same processor. Due to this, and BestBuy’s rather large discount for old stock, I decided getting the year old Samsung model would be the best bet. Samsung’s 11” Chromebook msrp is $249 but with the extremely generous BestBuy discount of 40% I was able to get it for a little over $160 shipped. At that price the included 100GB Google Drive storage it paid for itself.

HP 11 Chromebook Screen

Trackpad does two finger scroll
Comfortable keyboard and customizable keys
Very lightweight
Long battery life

Keyboard not backlit
Performance is a little slow
Video performance sometimes choppy
Wifi only, no ethernet port

I was pleasantly surprised when I started using the Chromebook and it responded to the two finger scroll I was so used to with my Mac. I was a little disappointed with the alt and ctrl key placement but quickly found out those keys were customizable from the settings menu so I was able to configure in a more Mac like placement. The keyboard keys are a normal size not one of those compact keyboards typically used on small laptops so I do enjoy typing on it. My one disappointment with the keyboard is the lack of backlighting, as I’m sure most of you are aware it makes typing in dark places like planes a lot easier. But for the price I can overlook the missing backlit keyboard.

Samsung Chromebook Specs

Overall performance has been very good handling all web usage like email, many open internet tabs and general web surfing. The 1.7Ghz dual core processor is good but the laptop would benefit from having extra processing power. Video playback from YouTube and Netflix seemed to work relatively well but there were times when it would get choppy and buffer for a few seconds. Although to watch movies on a plane the laptop is perfect given the small form factor.

So far the battery life has been very good, once fully charged usage can go for 2 days with about 3-4 hours of mixed web browsing, email and video watching. I have yet to test it for a full day of use to see where it stacks up. The display is crisp enough for the light usage I plan on using the laptop for and changing the brightness is very easy for different ambient lighting.

Based on my experience and what I paid for the Samsung Chromebook I would recommend it as a secondary computer. It is not something I would want to use everyday but for the occasional trip where I don’t want to lug around a 15″ Macbook this does quite nicely.

Update 11/13/13: Glad I purchased the Samsung, retailers started pulling HP 11 Chromebook inventory of the shelf allegedly due to performance issues. Waiting to see what happens but there has been a lot of negative press about the processor and performance of the new HP model.