Accessing AllStarLink from a SIP telephone

I managed to get my Western Electric rotary phone connected to ASL using an ATA.

I have been using a SHARI AllStarLink node for some time as a means to tinker and learn about AllStarLink (ASL) and to explore the wide web of nodes around the globe that are connected to this vast network.

ASL (HamVoIP being the flavor of it on my node) is based on Asterisk, an open source PBX system that is capable of handling the most complex telephony tasks and could conceivably be used to replicate or even replace nearly all voice switching capabilities of the public switched telephone network. On the K6TZ repeater system, we have configured the repeater node to handle phone patch requests over VoIP, eliminating the need for a copper line to offer radio to telephone network connectivity. This means that members can key in a code followed by a phone number on the 446.400 repeater to initiate a phone call to any number in the USA.

I had also heard that ASL could provide for direct access to radio linking through SIP connections, sort of a reverse autopatch, whereby one could dial into the node from a SIP telephone to access and link to nodes throughout the ASL network. In setting out to configure my own SHARI node for this, I ran across a few inconsistencies on how to accomplish this so I am writing up this article to document what worked for me.

The first place I turned was the official ASL wiki documentation. It is helpful but somewhat incomplete in its explanation. Below I’ll outline the steps and try to explain them in a bit more detail, adding some additional configuration to support multiple SIP extensions.

The first step is to locate and edit the /etc/asterisk/modules.conf file. I am including the full path to all files since it can be challenging for newbies and experienced users alike to find them, especially when tinkering in ASL is not a daily task.

We must edit the modules.conf to be sure the SIP module is loaded by ensuring that the following line is present:

load => chan_sip.so ; Session Initiation Protocol (SIP)

You may see this line in your file beginning with noload. Simple change it to load and save the file.

Next locate the /etc/asterisk/sip.conf file and open it in your favorite editor. In this file we will append the following code to add one new SIP extension to our node. Note that I am calling this extension 101. Conceivably you can use whatever extension number you wish. Note that anything after a semicolon on a line is a comment instructing you to change the particular contents to something that makes sense for your setup.

[101] ; Can be practically any extension number you wish
deny=0.0.0.0/0.0.0.0
secret=pass!!word ; set this to a SECRET PASSWORD you create
dtmfmode=rfc2833
canreinvite=no
context=sip-phones
host=dynamic
trustrpid=yes
sendrpid=no
type=friend
nat=no
port=5060
qualify=yes
qualifyfreq=60
transport=udp
encryption=no
callgroup=
pickupgroup=
dial=SIP/12345 ; Change to your assigned ASL node number
permit=0.0.0.0/0.0.0.0
callerid=Ham Shack ; pick your own Caller ID for this extension

You could add multiple SIP extensions with different numbers (for example: 102, 103, etc.) if you had more than one SIP handset or ATA.

Once you have completed editing the sip.conf file, save it and open /etc/asterisk/extensions.conf.

Here we will need to add a new “context” called sip-phones to define how these extensions will work. In this case, we want to dial our node number and be connected to our SHARI node via VoIP. We will also let the system know how to handle calls placed to these extensions. This will allow us to pick up one handset (e.g. 101) and dial another extension (e.g. 102) and have it ring.

Be sure to change 12345 to your node number in the lines below.

[sip-phones]
exten => 12345,1,Answer
exten => 12345,n,Wait(2)
exten => 12345,n,Playback(rpt/node)
exten => 12345,n,Playback(digits/1) ;say node digits one at a time
exten => 12345,n,Playback(digits/2)
exten => 12345,n,Playback(digits/3)
exten => 12345,n,Playback(digits/4)
exten => 12345,n,Playback(digits/5)
exten => 12345,n,Rpt,12345|P|${CALLERID(name)} ;

exten => 101,1,NoOp(SIP Phone 1)
exten => 101,n,Dial(SIP/101)

exten => 102,1,NoOp(SIP Phone 2) ; if you have a second extension, 
exten => 102,n,Dial(SIP/102) ; be sure to include these two lines.

Now that you have made the config file changes, we must restart the Asterisk Server on the node. ssh into your node and select menu item 13.

HamVoIP Main Menu Screen accessed via SSH

Example client configuration screen from a Grandstream SIP handset

The node is now ready to accept incoming connections from SIP handsets and ATAs. Configuration of your hardware will vary by vendor but basically you will want to name the SIPM account something like “AllStarLink” and point the SIP Server setting to the IP address of your node (this assumes you are on the same local area network as your node). The SIP Authentication ID is the extension number you defined in sip.conf. which in this case is 101. The Password will be whatever you changed it to (hopefully not pass!!word but it really doesn’t matter much if you are on your own network behind a firewall). If your phone or client asks for a SIP port, the default is 5060. That’s pretty much it. Your save the configuration and your SIP phone should register with your node as its PBX. You can dial into your ASL node by picking up the line and entering your node number. Once it is connected, you can dial around using the same DTMF commands you are used to, including *3 + node number to connect to outside nodes.

One important thing to note is that hanging up the line won’t disconnect links. It simply disconnects your SIP phone from your ASL node instance. If you pick the line back up and dial your node number again, your session is restored as you left it.

If you wish to dial another SIP phone extension on your new PBX, simply pick up the line and dial the extension number. In this example, picking up extension 101 and dialing 102 on the keypad will ring extension 102.

You can configure inexpensive SIP phones like the Grandstream GXP1620 (note that this particular model requires Ethernet and does not have WiFi capabilities), an ATA like the Cisco ATA 192 – for use with a standard landline phone, or even smartphone SIP apps like Zoiper (iOS / Android) as long as your phone is connected to the same network as your ASL node.

Bookmark the permalink.
K6LCM

About K6LCM

Levi is a member of the SBARC Board of Directors and is the K6TZ Trustee. He is also a Volunteer Examiner.

Leave a Reply