Building on my previous dial-up blog post, I combined my SPA122 and a SPA8000 voice gateways to create a dial-up over VoIP system.

The plan

My previous setup for the Cisco 2620 dial-up server worked well enough, but I was effectively tethering my old computer to the Cisco 2620, which was a bit loud and not particularly appealing to look at. After I grabbed the SPA122 off the disposal pile at work, I noticed there was SPA8000 8-port phone gateway underneath it. After doing some research, I grabbed it the day after.

My plan was to have the Cisco 2620 and the SPA8000 sitting somewhere out of the way, and the old computer will be "out and about" with the SPA122 accompanying it. This means that instead of needing a phone line to connect the two, I only need IP connectivity.

A simple diagram showing "computer" connecting to "modem", to "SPA122", to "IP Network", to SPA8000, to "NM-8AM", to "2620". The SPAs and IP Network are within a box called "VoIP", the VoIP box, modem and NM-8AM in a box called "Voice", and all in a box called "IP over PPP"

  1. The computer sets up the modem.
  2. The modem dials the magic number the SPA122 has pre-loaded.
  3. The SPA122 recognises this phone number that's been set in the "dial plan", and starts a "call" with the SPA8000, over the IP / Ethernet network.
  4. The SPA8000 sees the call to a valid "User ID", and rings one of the free analogue phone ports.
  5. The NM-8AM sees a ringing line, picks it up, and starts the negotiation with the computer's modem.
  6. Once the modems decide on an agreed communications method, the computer and 2620 begin the PPP negotiation.

How?

In this case, most of the parts of the above "chain" are just translating between particular protocols, so they are reasonably interchangeable.

You'll need:

  • Two devices to convert between normal phone lines to VoIP (one to convert to VoIP, one to convert back) (Virtual Phone Network)
    • The SPA122 is taking a "normal phone call" from the modem, and turning it into a VoIP call.
    • The SPA8000 is receiving the VoIP call and converting it back to an analogue call.
    • If you're going to be doing Dial-Up with this, you'll need to make sure it's capable of not messing up the signal too much.
  • A retro computer with a modem that you want to connect to the network / internet.
  • A way of "terminating" an incoming connection from a modem to a network connection (Network Access Server)
    • You can use a computer and a modem for this, but in this case the Cisco 2620 with the NM-8AM is performing this task.

The Network Access Server

If you need to setup one of these, either refer to the numerous online posts about using a Windows Server with RRAS and a dial-up card, or Linux with getty and PPPD. If you have a Cisco 2600- or 3600-series router, with a NM-8AM or NM-16AM card, have a look at my previous post.

The "Virtual Phone Network"

Heh, "VPN".

As opposed to CRD's ATA Dial-Through guide which either uses one ATA122 to connect to itself, or two ATA122s to connect to each other, I'm going to use the aforementioned SPA8000, because it's what I have. But it's also got 8 ports, and my 2620 has 8 ports, sooo...

Like my previous post, and CRD's, the SPA(s) are acting as the phone network. They're performing both the electrical (supply 48V, supply more when ringing etc.) and functional emulation (accept digits, ring the remote end, connect audio) of a legacy phone network or PBX.

In order for them to talk to each other over the network, we have to find some way of getting the SPA122 to connect to the SPA8000 when a certain number is dialled.

Enter the SPA's Dial Plans.

Dial Plans

Dial plans (on these systems at least) are essentially just regex. Using regex-style patterns, they allow:

  • Substitution of digits
  • Setting "timeouts" like the inter-digit timeout (the time it waits for you to press another digit)

That's it! But, this is actually surprisingly powerful once you connect it up into context.

For example:

  • 000S0: This accepts three zeros, then sets the intra-digit timeout (S) to 0, essentially stopping the handpiece from dialling any further. This means that if you dial 000, the SPA122 will dial 000 as soon as the third 0 is entered.
    • For context, 000 is the Australian emergency services number, and I believe it's (approximately, I'm not a laywer) a legal requirement for any phone to be able to dial it.
  • *xx.: This accepts a * (which is an dialable digit, remember!) and then two digits, where the last one can repeat as many times as needed. On the SPA122 and SPA8000, this is used for the built-in voice prompt menus.
  • 1[38]00xxxxxxS0: Allows you to dial a 1300- or 1800- number, and once you enter the right number of digits it fires off the call.
  • <9095551010:101>S0<:@127.0.0.1:5061>: This accepts 9095551010, replaces it with 101, stops accepting digits (S0), and then appends @127.0.0.1:5061 and dials it.
    • This means the SPA122 is "dialling" 101@127.0.0.1:5061, which is a SIP URI!

Using this, I made the following dial plan:

(*xx.|<0894206900:100>S0<:@SPA8000:5080>|<94206900:100>S0<:@SPA8000:5080>|<0894206999:101>S0<:@127.0.0.1:5060>|<94206999:101>S0<:@127.0.0.1:5060>)

This is actually five different rules, so let's split them up:

*xx.
<0894206900:100>S0<:@SPA8000:5080>
<94206900:100>S0<:@SPA8000:5080>
<0894206999:101>S0<:@127.0.0.1:5060>
<94206999:101>S0<:@127.0.0.1:5060>

Breaking this down:

  • Accept IVR calls.
  • Accept 08 9420 6900 (which is an Inter-state formatted number), replace that whole number wth 100, and append @SPA8000:5080.
  • Same as the last one, but locally formatted (without the 08 state code)
  • Accept the inter-state version of 9420 6999, and connect it to the other port on this SPA122.
  • Local version of the above.

For further reading, please refer to the Cisco Small Business Configuring Dial Plans document.

We can set these dial plans on both the SPA122 and the SPA8000, so if we wanted to we could reverse them, or set up dial-out from the 2620, or just use them as a VoIP network. What a thought!

However, we may have just put the cart in front of the horse for a moment here, so let's see what's going on when we "dial" a ""number"" that looks suspiciously like an email address.

SIP URIs

I'm not too familiar with SIP myself, so this'll just be a quick summary.

SIP is actually only one part of VoIP. It's an acronym for "Session Initiation Protocol", as it's only responsible for the set-up of the call. SIP is used to get the call started, by negotiating a UDP RTP connection where the audio is actually carried.

Larger IP Phone systems operate using this system underneath it all, but instead of having users dial "email addresses", they dial phone numbers. These phone numbers are then translated to a SIP URI (as we're doing above) on the phone system itself, either to go to another device, or just funnelled over a default "Trunk" to a provider or another phone system. In some cases, the phone system just facilitates the call (rather than proxying the call), so your IP Phone is actually directly connected to the other IP Phone you're speaking to.

That means that almost all "VoIP" devices, assuming they're not non-standard VoIP like Teams or Skype, should support SIP, and therefore, support calls into them using a SIP URI.

SIP URIs are pretty simple, they consist of a "User ID", a host and an optional port.

For example, 100@127.0.0.1:5060 is user 100, on host 127.0.0.1, at port 5060.

If the port isn't specified, it's presumed to be 5060.

If you install something like MicroSIP (which also works under WINE), you can dial a SIP URI to initiate a call.

Since these SPAs are proper SIP devices, they support being "direct dialled" but only if they're registered. After changing a config option, you're able to dial directly into the device and start a call with a real phone port:

Screenshot of MicroSIP, an application that resembles a "candybar" phone with a dial pad, over wireshark showing the network packets involved with an active call.

In that screenshot, you can see MicroSIP in the bottom right hand corner is in an active call with "100" (we actually dialled 100@SPA8000:5080). Wireshark has been scrolled up to see the first few packets my laptop exchanged with the SPA8000.

Walking down this, we can see:

  • MicroSIP sending an INVITE, essentially asking to create the call.
  • The SPA8000 is responding with 100 Trying.
    • If you dial the wrong User ID, you'll get a familiar 404 Not Found error
    • If the SPA is set up wrong, you'd see other errors in response to the invite (e.g. busy).
  • The SPA8000 has started ringing the port / phone and updates the caller with 180 Ringing.
  • The 2620's modems pick up almost instantly and we get a 200 OK. This packet contains information on the RTP connection, including the remote host (which could be different in the case of a phone system), port and codec used.
  • MicroSIP then sends two RTCP (RTP Control) packets (both are the same, not sure why two are sent) to start the audio stream.
  • The SPA8000 then sends the first packet of the audio stream.

SPA8000 setup

Now that we understand what we're trying to do, we now need to set up the SPA8000 to allow the Dial Plan on the SPA122 to connect to it.

Gaining Access

The SPA8000 is a bit of a weird beast - it's got an "Ethernet" and "Aux" port. The Ethernet port is what's used for VoIP, and management, and the Aux port is actually a connection to an internal switch. The internal switch has the management web UI on it as well, and several more IPs. The reason being, is that SPA8000 is actually four smaller ATAs in one big trenchcoat:

A photo of the SPA8000's system board, showing four "pillars" going from the front of the board to the rear, all made up of the same sets of components. Each has one big chip down the bottom, a medium sized on above, and then a bunch of analogue components towards the rear, nearer to the phone ports.

The official way to get into the SPA8000 is to plug the network into the Ethernet port, a phone into voice port one or two and dial **** to get into the menu. Once you're in the menu, you dial 110 to get the IP address of the device, on the Ethernet Port.

The default host name of the SPA8000 is sipuraspa, so if you're able to look at your DHCP leases list, it might show up there.

Once you have the IP, you connect to it in a web browser and you go from there.

The other way is to plug a computer into the Aux port, let your computer get an address from DHCP, and go to http://192.168.0.1 (it should be the default gateway, or the DHCP server that your computer sees).

Either way, once the page has loaded, you should be met with something that looks like this:

Screenshot of an early 2000's WebUI, designed for older low-resolution screens. Text is small, and very dense.

However, my SPA8000 was pre-loaded with a config from a Telecom. My front page looked basically the same, but I was missing the Admin Login link in the top right. Since I needed that, I needed to plug a phone in, and dial a magic number (73738#) to trigger a system config wipe. [1]

Now I could get into it and configure it.

Network and Voice Config

The SPA8000 has two types of "users" - 8 users for each line, and 4 "trunks".

To start with, I just set up each user / line, but setting up a trunk as a ring group or dial in pool is just as easy, so I'll cover that as well.

My ideal setup is pretty simple:

  • Each port has it's own user number and port, and you can dial into a specific port directly.
  • All ports are also a member of a call group / ring group, allowing me to call one particular number, and have it ring any of the 8 ports that aren't busy. This would mean I could share this number with up to 8 sessions at the same time.

I would like to say that's possible, but the two seem to be mutually exclusive. If you have a line set as a member of a trunk, you're not able to dial directly into it. Well, I've not found a way to do it, without perhaps using a "proper" phone system like Asterisk.

Here's the important parts of the config that I've got set:

  1. Connect to the IP address of the SPA8000
  2. Click the Admin Login link in the top right
  3. Click the advanced link next to it
  4. (Optional) Under Network > Wan Status
    1. Set your desired static IP in > Internet Connection Settings > Connection Type
    2. Set the hostname in Optional Settings
      • This will mean that the name you set here gets recorded in the DHCP leases list (if you use DHCP) and in dynamic DNS (if you use it)
    3. Enable configuration via the Ethernet port, if you're not already logged in that way: Remote Management > Enable WAN Web Server
    4. I also disabled CDP here, since I don't use it. Doesn't harm anything either way, really.
  5. (Optional) Under Voice > System
    1. Set up your syslog server in Miscellaneous Settings > Syslog Server and Debug Server
      • Note that using host:port here doesn't work, it will always go to udp/514
      • Also I think that the Debug Server only applies if Debug Level is 3 (Debug)
    2. Enable Web Admin Access: yes - I suspect this is what was blocking the "Admin Login" link originally for me, but it was set to yes by default.
  6. Under Voice > SIP
    • I didn't change anything here, but you can see the list of ports that the SPA8000 will use, particularly SIP Parameters > SIP TCP Port Min / Max, and RTP Parameters > RTP Port Min / Max
  7. (Optional) Under Voice > Provisioning
    1. Stop the SPA from provisioning, since you won't need it: Provision Enable: no
  8. (Optional) Under Voice > Regional
    1. You can set your regional variations of dial tones, line impedance and such here
    2. The timezone is an option under Miscellaneous > Time Zone
  9. Under each individual line (Voice > L1/2/3/4/5/6/7/8)
    1. Line Enable: yes
    2. (As desired) Trunk Group: 1 - this will "register" this user to an internal proxy, in order for the trunks to work. If you want to be able to dial this line directly, leave this as none
    3. If you're leaving this out of a trunk, note the SIP Settings > SIP Port value here. This will form part of your dial plan.
      • Note: Because each pair of ports is actually a separate system, you can only share a port between the same members of a pair (1 and 2, 3 and 4, 5 and 6, 7 and 8). If you connect to group 1 asking for a User ID from group 2, you'll get "404 Not Found".
    4. Network Settings > Network Jitter Level: extremely high (This will ensure that the call has sufficient headway in case you do get jitter)
    5. Network Settings > Jitter Buffer Adjustment: disable (Disables adjusting buffer depth in response to jitter - as the modems won't like things being shifted out of sync)
    6. Proxy and Registration > Make Call Without Reg: yes (if you'd like this line to be able to dial out)
    7. Proxy and Registration > Ans Call Without Reg: yes (if this line is going to be accepting calls)
    8. Note the Subscriber Information > User ID. Like the port, you'll need this soon. If it is blank, set it to something like 101 for L1, 102 for L2 etc.
    9. Audio Configuration:
      1. Preferred Codec: G711u (plain PCM)
      2. Use Pref Codec Only: yes
      3. Silence Supp Enable: no
      4. Echo Canc Enable: no
      5. (Maybe) Echo Canc Adapt Enable: no
      6. (Maybe) Echo Supp Enable: no
      7. (Maybe) Any "Gnnn Enable" where Gnnn is not G711: no
      8. (Probably) All "Fax" options: no, 0 or none
    10. Dial Plan > Dial Plan: Leave this alone, unless this line is dialling out.
  10. Under each of the four trunks that you want to use (Voice > T1/2/3/4)
    1. Line Enable: yes
    2. Note the SIP Settings > SIP Port here. It'll probably start at 5080 instead of 5060, but as before, if you're going to use the trunk, take note of it.
    3. Also note the Subscriber Information > User ID. As before, set this as desired, if you're going to use it in the dial plan. It seems like this isn't actually paid attention to, you can use any "User ID" on the trunk port to dial into the trunk.
    4. Proxy and Registration > Ans Call Without Reg: yes

As an aside, you can back up the config by running wget http://spa8000/spacfg.xml. If you have a password set, you might need to do this using a browser once it's logged in. Apparently this xml can be used for provisioning, but I've not found another way to "restore" the config from an XML. [2]

Now that you've got your lines configured, lets test it.

Voice Testing

Using MicroSIP, or any application that you can dial a SIP URI, call any of the non-trunked lines, or trunks you've set up:

userID@hostname:port, e.g. 100@sipuraspa:5060

The call should connect and start ringing. If it gives you an error, double check everything. This part alone should be pretty bulletproof, unless you've got a port number or user ID messed up.

If you get "Busy Here" on a trunk line, it means that there are no free lines. Double check that you have assigned lines to trunk, under the line settings.

If you have an analogue phone, you can connect it to a port and when you ring the port you should be able to hear that real phone ring!

At this point, the SPA8000 should be ready to go.

SPA122 setup

The SPA122 is much easier to configure.

I was able to get into my SPA122 without having to factory reset it, but I believe the method is the same or similar as the SPA8000, if you need to do it. There is a reset hole, but it can be disabled in the configuration.

Once you're logged in, it should start on a Quick Setup page. Skip this for now, and proceed to the Network Setup tab.

Network

Nothing too crazy here, I set it up as a Bridge so that both ethernet ports were the same:

  1. Basic Setup
    1. Network Service
      1. Networking Service: Bridge. By default, the SPA122 also acts as a router and performs NAT, which I don't need.
      2. Monitor Network Drop on WAN Port Only: OFF. I don't know what this does exactly, but I suspect that it tries to be clever in some way, depending on the status of the WAN port.
    2. Internet Settings
      1. Internet Connection Type: Set this however you need, I used DHCP.
      2. (Optional) Optional Settings > Host Name: I set this to "SPA122", as with the SPA8000 this will show in DHCP and dynamic DNS.
      3. (Optional) Optional Settings > Domain Name: Whatever domain name you want the SPA to fit under.
      4. (Optional) Optional Settings > DNS Server Order: DHCP-Manual - since I won't be setting any pre-configured DNS servers, and want to rely on DHCP only.
    3. Time Settings
      1. I set the SPA to use my NTP server and set the local time zone.
  2. Advanced Settings
    1. You can leave this section alone, unless you want to turn off CDP like I did.
Voice

Fairly similar to the SPA8000 here:

  1. Provisioning
    1. Provision Enable: no
  2. Regional
    1. (Optional) As bef0re, any adjustments to the default phone tones and such.
  3. Line 1 / 2
    1. General > Line Enable: yes
    2. Network Settings
      1. Network Jitter Level: extremely high
      2. Jitter Buffer Adjustment: no
    3. SIP Transport
      1. (Optional) SIP Port: 5060. Since this is all on the same chip / system, you can use the same port for both lines here.
    4. Proxy and Registration
      1. Make Call Without Reg: yes (If this is to call out)
      2. Ans Call Without Reg: yes (If this is to accept calls)
    5. Subscriber Information
      1. (As desired) User ID: 100 (Make sure each line is different)
    6. Audio Configuration
      1. Preferred Codec: G711u
      2. Use Pref Codec Only: yes
      3. Silence Supp Enable: no
      4. Echo Canc Enable: no
      5. All "Fax" options: no, 0 or none
      6. Modem Line: yes
    7. Dial Plan
      1. Paste in your dial plan here: (*xx.|<0894206900:100>S0<:@SPA8000:5080>|<94206900:100>S0<:@SPA8000:5080>|<0894206999:101>S0<:@127.0.0.1:5060>|<94206999:101>S0<:@127.0.0.1:5060>)
      2. If you have a "dial the other port" rule in the dial plan, make sure the port number and user ID is updated to match the other port on the SPA.
Administration

I won't go in depth here, but here you can set a syslog server, save and restore the config, and trigger a firmware update.

Testing

If your SPA122 is on the "computer" side of the chain (remember how long ago we mentioned that?), and only dialling out to the SPA8000, the easiest way to test it is by dialling out.

You can use an analogue phone, or your retro computer to dial your Dial Plan number and see if it rings. If it rings, then you got everything perfect! Plug it into your modem on the server side and give it a shot!

With this setup I'm able to get 31.2 Kbps. Note that the NM-8AM is only capable of 33.6 Kbps. In order to get 56K, I'd need the NM-8AM-v2. Two "normal" modems won't ever achieve 56K point to point, as that was the result of some fancy trickery on the exchange's side.

[1]https://web.archive.org/web/20230227133003/https://community.cisco.com/t5/voice-systems-and-accessories-small-business/spa8000-user-and-password/td-p/1914812
[2]https://web.archive.org/web/20230313090519/https://community.cisco.com/t5/voice-systems-and-accessories-small-business/spa8000-configuration-backup/td-p/1866993