The Latest
Hamshack Hotline - Asterisk PBX
Posted by AG6QV Frank
Tags:

I've been using Asterisk PBX for a long time. It allows us to have multiple phone numbers, including a number in Denmark that all goes to the same phone system. When a fellow HAM pointed me to HamShack Hotline I wanted to expand my existing phone system and enable incoming and outgoing phone calls on the network to and from my HAM shack without adding any new hardware.

The process stared by requesting an new truck to be created on the HamShack Hotline network. This is done by creating a support ticket. The same process is used to obtain a number that can be used with a SIP phone.

A few days later I received an email with my new phone number, my secret password and the endpoint to connect my PBX to. Configuration of the system was to use the IAX protocol (or rather the IAX2 protocol) to connect my Asterisk PBX system to the system operated by HamShack Hotline. This sounds simple but since this was the first time I had to configure this type of connection I needed to do some research and as it turns out a bit of experimentation to get all the setting correct, especially since my PBX system is behind a firewall I needed to configure port forwarding to allow traffic originating from the outside to reach my server.

The first step was to enable port forwarding of the IAX2 protocol and to allow access to the same port from my internal network. The IAX2 protocol uses a single UDP port (4569) for all communication which makes the configuration simple. On the Linux server running the Asterisk PBX software I used these command to enable the port:

firewall.txt
sudo firewall-cmd --add-port=4569/udp --permanent sudo firewall-cmd --reload

Then it was time to configure the trunk and extensions. Asterisk use a number of different configuration files, all located in /etc/asterisk (the default directory for configuration files) In this case there are two files that require changes: iax.conf and extensions.conf. 

iax.conf
; HamShack Hotline Configuration ; Extension 12033 should be replaced with your extension ; Replace ***** with the secret provided by HamShack Hotline register => 12033:*****@hhus.wizworks.net [hamshack] type = friend host = hhus.wizworks.net trunk = yes username = 12033 secret = ***** context = hamshack auth = md5 disallow = all allow = ulaw allow = g726aal2 allow = gsm codecpriority = host transfer = no callerid = asreceived deny = 0.0.0.0/0.0.0.0 permit = 144.202.54.216/255.255.255.255

extensions.conf
; Configure this section to dial ; replace ##### with your extension ; replace <extension> with your own extension ; replace <voicemail> with your own voicemail address [hamshack] exten => #####,1,GotoIfTime(8:00-22:00,*,*,*?open) same => n,Voicemail(<voicemail>) same => n,Hangup() same => n(oepn),Dial(<extension>, 30) same => n,Hangup() ; This section configures asterisk to use HamShack for outgoing numbers ; but only for 4 and 5 digit numbers and 3 digit numbers starting with 3 ; replace "AG6QV" <12033> with your callsign and extension [outbound] ... exten => _XXXXX,1,Set(CALLERID(all)="AG6QV" <12033>) same => n,Dial(IAX2/hamshack/${EXTEN}) exten => _XXXX,1,Set(CALLERID(all)="AG6QV" <12033>) same => n,Dial(IAX2/hamshack/${EXTEN}) exten => _3XX,1,Set(CALLERID(all)="AG6QV" <12033>) same => n,Dial(IAX2/hamshack/${EXTEN})

After making these changes to the Asterisk configuration I was able to make calls to the HamShack Hotline system but I could not receive incoming calls. Instead of waiting on someone to call me I tried to call my own extension from another phone on my system. I got the same error but now had a way to debug the system. Enabling IAX debugging on the Asterisk console revealed the problem. As seen in the output below the incoming call was trying to connect to and extension called 's' and my system was only configured with the 12033 extension I was given by HamShack Hotline.

iax.debug.txt
Rx-Frame Retry[ No] -- OSeqno: 000 ISeqno: 000 Type: IAX Subclass: NEW Timestamp: 00082ms SCall: 06456 DCall: 00000 144.202.54.216:4569 VERSION : 2 CALLED NUMBER : s CODEC_PREFS : (ulaw|alaw|gsm) CALLING NUMBER : 12033 CALLING PRESNTN : 1 CALLING TYPEOFN : 0 CALLING TRANSIT : 0 CALLING NAME : AG6QV Trunk LANGUAGE : en FORMAT : 4 FORMAT2 : ulaw CAPABILITY : 14 CAPABILITY2 : Unknown ADSICPE : 2 DATE TIME : 2021-04-12 12:27:58 CALLTOKEN : 51 bytes

In order to fix this I added a new extension to my dial plan. This small change made incoming calls working. The hack works since I only have one extension on the HamShack Hotline network and there might be a better way of changing the configuration.

I created a support ticket with HamShack Hotline to verify if there was anything on their end that might fix the issue. I received phone calls from two different support engineers but they were not able to point me to a solution or to make any suggestions to changes I could make to my configuration. Since the system is able to bot make and receive phone calls I can live with the hack on using an extension called s. I'm not the only one with similar problems. I found this discussion about the topic but the suggested fix does now work and I already have that setting on my system.


HackRF One
Posted by AG6QV Frank

The November meeting in the PNW Microwave group was used to discuss Gnu Radio and HackRF One. We installed the Windows version of Gnu Radio (binaries can be found here). To verify the installations we used a flowgraph for a narrow band FM receiver.

After the meeting John (W7FU) was inspired to install the latest version of GNU radio and he created 3 flowgraphs. I modified these to be used with HackRF One by adding the OsmoSDR versions of sink and source. I disabled the UHD:USRP versions but left them in the flowgraph for reference.

SSB filter simulation 

This flow graph does not require any external hardware. This simulator visualize the USB, LSB or CW signal in the frequency domain. The first image below shows the flowgraph and the second is a screen shot of the output.

SSB filter simulation

SSB filter simulation output

Wide spectrum receiver 

This flowgraph generates a very simple receiver and show the frequency spectrum. The HackRF One is limited to a 10 MHz bandwidth but with the use of the variables and GUI controls it can be used to show the spectrum anywhere from 10 MHz to 6GHz. A handy little spectrum analyzer although the sensitivity of the HackRF device is not that great and my version is installed in a plastic box allowing RF to get injected anywhere on the circuit board. 

Wide spectrum receiver

Signal Generator

The signal generator is also very simple. It consists of a signal source and a sink (the component that communicate to the hardware. I tested this by tuning my handheld FM receiver to the same frequency and adjusting the drive until I was able to hear the signal. This can also be used on any frequency form 10 MHz to 6GHz with the HackRF One device.

Signal generator


10 MHz Filter
Posted by AG6QV Frank
Tags: |

I have a couple of different GPS Locked reference oscillators that are used to lock PLL oscillators in microwave equipment. Some of these have a nice sine wave output at 10 MHz and others have a square wave output causing harmonics of the base frequency to be present in the signal. This is a factor that will increase the phase noise of the PLL oscillator. Getting rid of the harmonics is relatively simple with the help of a low pass filter. W1GHZ, Paul Wade has a nice article about the design of such a filter for a 10 MHz reference oscillator. The article is linked on the small projects page of his web site.

Today I decided to build a version of this low pass filter using SMD components. I did not have the exact values of all components, but was able to get close enough. I started out by creating a NC file for my CNC router and cut out a small PCB as seen on the image below. The PCB is about 8x19mm. This only a small amount wider than the SMA connectors I used.

20200126_152729

The at the end I added some heat shrink tube to finish the project.

20200126_161955

As you can see I ended up making two filters to check how accurate they were. It turned out that the first one gave the best performance. One of the inductors I used was in a 0402 package and way too small to work with. I'm going to order some in 0603 package and create a few more to see if this can be repeated with similar performance.

The output of the 10 MHz reference without the filter looks like this:

20200126_160751

The 3rd harmonic is only about 10dB down from the 10 MHz signal and there is a substantial amount of harmonics. After adding the filter the output looks like this:

20200126_161039

Almost all of the harmonics are gone, indicating that the signal now is much closer to a sine wave. Using the spectrum analyzers tracking generator to show the filter response looks like this:

20200126_161021

This shows 40-45dB attenuation at the 3rd harmonic and almost no loss at the base frequency.