image_pdfimage_print

Audio Recording on AllStar Link node

Audio Recording on AllStar Link nodes.

In rpt.conf there are stanzas that start with the node number, such as:

[28174] ; Change this to your assigned node number
rxchannel=Radio/usb
;rxchannel=Simpleusb/usb
duplex=0
~
archivedir=/media/USB

If it contains the “archivedir=<some recording location>” as shown above, then the audio passing through the radio will be recorded. In my case the recording location is a USB stick formatted as an ext4 file system identified by the system as /dev/sda1. So edit the file /etc/fstab and add a line as shown in bold below:

#
# /etc/fstab: static file system information
#
# <file system> <dir> <type> <options> <dump> <pass>
/dev/mmcblk0p1 /boot vfat defaults 0 0
tmpfs /var/log tmpfs nodev,nosuid,size=50M 0 0
/dev/sda1 /media/USB ext4 errors=remount-ro 0 1

Reboot and the drive should be mounted. We can check that the USB is in fact mounted at the location /media/USB with the df command.

[root@AllStar-KA7U USB]# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/root 3762048 1323764 2227464 38% /
devtmpfs 493436 0 493436 0% /dev
tmpfs 497712 0 497712 0% /dev/shm
tmpfs 497712 12860 484852 3% /run
tmpfs 497712 0 497712 0% /sys/fs/cgroup
tmpfs 497712 108 497604 1% /tmp
tmpfs 51200 272 50928 1% /var/log
/dev/mmcblk0p1 102182 14104 88078 14% /boot
/dev/sda1 7561896 19996 7134732 1% /media/USB
tmpfs 99544 0 99544 0% /run/user/0
[root@AllStar-KA7U USB]#

The AllStarLink system will add the node number to the directory structure, so when you navigate to the saved audio files, you will do something like this:

[root@AllStar-KA7U /]# cd /media/USB/28174
[root@AllStar-KA7U 28174]# ls -l
total 1188
-rw------- 1 root root 6154 Mar 15 21:22 20160315.txt
-rw------- 1 root root 12800 Mar 15 20:51 20160315205145.WAV
-rw------- 1 root root 5455 Mar 15 20:51 20160315205153.WAV
-rw------- 1 root root 5130 Mar 15 20:52 20160315205159.WAV
.... snip...

As you can see above the system has been busy recording audio files in the mounted USB stick. To use these files, we need to copy them to a computer capable of playing them. In this case the Raspberry PI is connected to another Linux computer by SSH, so we will copy the desired files to the connected computer with the SCP command issued from the connecting computer in the directory we wish the files to be copied to. Note: there is a space between *.WAV and ./ , don’t forget the space. 🙂

ron@linux-zdyj:~/wave> scp root@allstar-ka7u:/media/USB/28174/*.WAV ./
root@allstar-ka7u's password: 
20160315205145.WAV                                                 100% 13KB 12.5KB/s 00:00 
20160315205153.WAV                                                 100% 5455 5.3KB/s 00:00 
20160315205159.WAV                                                 100% 5130 5.0KB/s 00:00 
20160315205202.WAV                                                 100% 1685 1.7KB/s 00:00 
20160315210008.WAV                                                 100% 4155 4.1KB/s 00:00 
20160315210157.WAV                                                 100% 4480 4.4KB/s 00:00
... snip....

From here we can play the files one by one in a player of choice, such as Audacity, or we can concatenate them into one or more files using SOX. Without our intervention, SOX will concatenate the files in the correct date and time order with the simplest command.

ron@linux-zdyj:~/wave> sox *.WAV test.wav
ron@linux-zdyj:~/wave> ls -l test.wav
-rw-r--r-- 1 ron users 1034926 Mar 15 21:42 test.wav
ron@linux-zdyj:~/wave>

Notice in the above that a new file “test.wav” now exists. Also note that the AllStarlink system uses a naming convention on the audio files using capital letters WAV. Audacity has the ability to further edit the file and change from wav to other codecs such as mpg. This screenshot shows the presentation of this audio file in Audacity.Audacity

test.wav

The file is linked above, if you would like to listen to it or work with it. This recording is quite useful in as much as one of the radios has an intermittent connection problem and one of the radios is over modulated. The picture in Audacity is worth a thousand words, and being able to listen to the audio more than once, makes it much easier to determine how things sound.

If the radio is breaking squelch to often, the recordings of that will be plentiful. So if we plan to record, the squelch should be sufficient to silence the radio until a signal appears.
Ron Morell
KA7U

Asterisk and AllStar “How To Do Stuff”

This post will list links to useful documents and web-sites.

 

Configuration Files for Asterisk v.13 and AllStar Link

Having the AllStarLink Radio controller installed and having the Asterisk ver. 13 installed, I needed to configure the two units to make a radio telephone system. I wanted the system to work over a HSMM-MESH network and the configuration files reflect this in as much as the addresses are using Host Names instead of static IP addresses. Changing from Host Name to static IP should be about the only thing needed to use these files over a standard LAN network. These configurations result in a radio telephone system with the following provisions:

  • AllStar Node 28174 controls a Yaesu FT-7800R simplex transceiver
  • The AllStar Node accepts incoming IAX calls from the WAN or LAN
  • The AllStar Node registers SIP Telephones on the LAN
  • The AllStar Node is linked with a SIP bridge to the Asterisk v.13 PBX
  • The AllStar Node has Auto-Patch and Reverse Auto-Patch to the simplex radio
  • The Asterisk v.13 PBX is linked with a SIP bridge to the AllStar Node
  • The Asterisk v.13 PBX is registered with http://voip.ms for inbound and outbound calls to the PSTN
  • The Dial Plan provides all telephones and radio Auto-Patch outbound calls to the PSTN
  • The Dial Plan only provides inbound telephone calls from the PSTN to 1 extension which is a DECT phone cluster
  • The Asterisk v.13 PBX is providing Voice Mail to the radio telephone system

The relevant AllStar files are:

The relevant Asterisk ver.13 files are:

Ron – KA7U
March 4, 2016

Asterisk ver.13 on the Raspberry Pi2

When I needed to install Asterisk on the RPi2 I searched google and found this “how to”:
http://www.klaverstyn.com.au/david/wiki/index.php?title=Asterisk_Install_on_Debian
Never wanting to reinvent the wheel and noting that this install provides many useful options, I followed the recipe there. For my archive I have copied the instruction set below.

The configurations that bridge this PBX with my AllStar Link system will follow in the next post.
Ron – KA7U
March 3, 2016

To install Asterisk on a Rapsberry Pi with a Debian based system.

Dependencies

apt-get -y install libv4l-dev ffmpeg libx264-130
cd /usr/src
wget http://www.libsdl.org/release/SDL2-2.0.4.tar.gz
tar xvf SDL2-2.0.4.tar.gz
rm -f SDL2-2.0.4.tar.gz
cd SDL2-2.0.4
./configure
make
make install
cd /usr/src
wget http://www.pjsip.org/release/2.4.5/pjproject-2.4.5.tar.bz2
tar xvf pjproject-2.4.5.tar.bz2
rm -f pjproject-2.4.5.tar.bz2
cd pjproject-2.4.5
./configure --enable-shared
make dep
make
make install
cd /usr/src/
wget http://www.digip.org/jansson/releases/jansson-2.7.tar.gz
tar xvf jansson-2.7.tar.gz
rm -f jansson-2.7.tar.gz
cd jansson-2.7
./configure
make
make install
make check
apt-get -y install libtiff5-dev
echo /usr/local/lib/ >> /etc/ld.so.conf
cd /usr/src
wget http://www.soft-switch.org/downloads/spandsp/spandsp-0.0.6.tar.gz
tar xvf spandsp-0.0.6.tar.gz
rm -f spandsp-0.0.6.tar.gz
cd spandsp-0.0.6
./configure
make
make install
ldconfig

Asterisk Prerequisite

apt-get -y install subversion libspeexdsp-dev libmyodbc unixodbc-dev libmysqlclient-dev libnewt-dev libncurses5-dev uuid-dev libxml2-dev libsqlite3-dev libssl-dev portaudio19-dev

Install Asterisk

cd /usr/src
wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-13-current.tar.gz
tar xvf asterisk-13-current.tar.gz
rm -f asterisk-13-current.tar.gz
cd asterisk-13.7.0
./configure
./contrib/scripts/get_mp3_source.sh
make menuselect
make
make install
make config
make samples

Debian Cleanup

apt-get -y autoclean
apt-get -y autoremove

AllStar Link on the RPI2

After a few attempts to configure a Raspberry PI 2 to be an AllStar Link node, I finally settled on using the ARCH version that is discussed here:
http://crompton.com/hamradio/BeagleBoneBlackAllstar/

There is a group reflector that supports the users of this version of the AllStar Link system and it is found here:
http://lists.hamvoip.org/pipermail/arm-allstar/

KB4FXC and WA3DSP seem to be the active developers of this ARCH Linux AllStar Link system for the Raspberry PI 2. They have modified the app_rpt.so module to correct certain issues that seem common to other Raspberry PI and ARM processor implimentations of the software.

If you decided to install the AllStar Link software on a Raspberry PI 2 or BBB, and having successfully installed it, then if you are interested in some of my configurations read on.

The ARCH image is minimal as it is delivered. Everything you need for the service is there and then some, but if you want something else, well then it might be a problem because if you update the repositories you will bring in dependencies that are not compatible and will break the software. For example I wanted the terminal shell called “Screen”. If you use Screen you know why, if you don’t well then it might not matter, but the example of how I installed it will be useful to you for other things you might want to add. There are archived repositories available for ARCH and you can find the appropriate versions of software to match with the ARCH image you are using.
http://fraggod.net/static/mirror/packages/archlinuxarm/armv7h/  This link should take you to the program archives that contain useful programs for the RPi2_VER1.0_ALLSTAR.zip image, if that is the one you have installed. If not, you will need to ask on the reflector for the correct archive… Next you need to try to determine which program version will work with the dependencies already installed on your system.  I guessed by checking version and date info on gcc.
[root@AllStar-KA7U ~]# gcc –version
gcc (GCC) 4.9.2 20141224 (prerelease)
Then a scan of the gcc versions available in the archive led me to believe the install package dated around Nov-Dec of 2014. Then scanning the Screen versions I found one that was created in that time frame and took a chance that it was good in the system. I found this one: screen-4.2.1-3-armv7h.pkg.tar.xz 12-Nov-2014 03:37 , and so it would be installed using:
pacman -U http://fraggod.net/static/mirror/packages/archlinuxarm/armv7h/screen-4.2.1-3-armv7h.pkg.tar.xz 
and that worked just fine.

Once the AllStar Link system is installed and configured with the first boot and login, I wanted to configure a telephone system to work with it. The AllStar Link system is an Asterisk PBX and functions for that purpose, but newer versions of Asterisk (ver.13 at this time) offer better security and NAT traversal without port forwarding, as well as voice mail and all the other modern features of telephone systems, so I decided to setup another Raspberry Pi2 running Asterisk ver.13 and use a SIP bridge to connect them. This configuration is involved and will be covered in another post.

Ron – KA7U
March 3, 2016