Building a Home SS7 Lab with Asterisk and SigTrans Libraries
Australia's telecom sector has long punched above its weight. From the copper and microwave links stitching Perth to Sydney together, to today's IP-based infrastructure carrying most voice traffic, engineers down under stay fluent in both legacy and next-generation protocols. Whether you support NBN voice services or research signalling security at a Group of Eight university, hands-on exposure to SS7 remains a marketable skill.
Asterisk is the go-to open source softswitch for learning telephony without licence fees. Paired with the SigTrans stack, which adapts SS7 layers onto IP using SCTP, the combination becomes a credible platform for simulating real carrier behaviour from a desk in Brisbane. The trick is wiring everything up correctly so that point codes and linksets behave the way they would in a live Telstra exchange.
This walkthrough covers a practical lab build using free components. You will configure MTP2 and MTP3 over SCTP, bring up ISUP circuits, and finish with TCAP and MAP dialogue testing, all from a Linux workstation or a pair of VMs.
Planning Your Lab Environment
Before downloading anything, sketch the topology. A minimal setup needs two nodes: one as the signalling endpoint and the other as the signalling transfer point. Many Australian engineers run Proxmox on a mid-range server, or two Ubuntu Server VMs on a 16GB laptop.
Decide on point codes early. Australia uses the ITU 24-bit variant, so allocate ranges that mimic real carrier allocations. Using 0-0-1 and 0-0-2 keeps things readable in Wireshark traces. Make sure both ends agree on the network indicator, service indicator octet, and signalling link code, because mismatches here cascade into baffling failures later.
For pure IP signalling using M3UA, a free-running clock works fine. Real digital spans need stable timing references, which is harder in regional areas with jittery upstream connections. Hosting the lab on local VLANs avoids that problem entirely.
Installing Asterisk with SS7 Support
Asterisk's SS7 support lives in chan_dahdi and libss7. On Ubuntu 22.04, compile from source so you can enable the SS7 patches cleanly. Install the dahdi and libpri development packages, grab the tarball, and run ./configure with the right flags.
The chan_dahdi.conf file holds most SS7 configuration. Define the signalling group, link set, point code, and adjacency parameters here. A typical entry sets ss7type=itu, pointcode=1, adjpointcode=2, and the network indicator to national. Map a signalling channel group to a span and timeslot, and set the ISUP variant to the Australian profile if you want to interwork with local testbeds.
Reload Asterisk and watch the CLI with verbosity raised to level 5. The MTP layer should come up and link alignment messages will appear. If alignment fails, suspect mismatched SLC values or a firewall blocking SCTP on port 2904 between nodes.
Bringing Up the SigTrans Stack
SigTrans adapts MTP layers onto SCTP. The libsigtran library provides user-space daemons that speak M2PA, M3UA, or SUA directly to Asterisk. Most Australian labs favour M3UA because it matches what carriers like Optus operate in their IP backbones.
Configuration involves defining the local IP, remote IP, SCTP port, and routing context. Each routing context typically maps to a particular point code, so daemons can demultiplex incoming messages to the right application server. Double-check that m3ua.conf uses the same point codes and network indicators as Asterisk, otherwise the ASP will never reach the active state.
Run a packet capture on the SCTP association during bring-up. Wireshark dissects M3UA natively, so you can confirm the SCTP INIT handshake completes and the first ASP-UP message reaches its peer. Repeated retransmissions without progress usually point to a routing issue or ACL problem on the lab network.
Testing ISUP Call Setup
With MTP and SigTrans running, verify ISUP using the Asterisk CLI to place a call across the SS7 link. A successful IAM, ACM, and ANM exchange should appear in both the CLI output and your Wireshark captures.
Watch the called and calling party number fields carefully. Australian numbers follow E.164 with country code 61, so your dialplan must strip the leading zero and prefix 61 before placing calls onto the network. Unfamiliar release causes usually mean consulting the ISUP cause codes table and tracing the message back to the right layer.
Validating TCAP and MAP Dialogues
Once voice calls work, the lab becomes far more interesting with TCAP and MAP. The open source ss7map daemon can trigger MAP invoke operations against a remote endpoint, and you can watch dialogue and component sub-layers open and close in Wireshark.
When working with TCAP timeouts and retransmission strategies for MAP invoke responses, remember that timer values differ between ITU and ANSI variants. A dialog that hangs without response usually points to an invoke ID mismatch or an SLLA waiting indefinitely for an SLD.
Australian operators lean on the ITU variant traditionally, but interconnects with global roaming partners bring ANSI elements into play. A robust lab lets you swap variants with one config change and observe how state machines differ across each profile.
Troubleshooting Common Failures
Most lab builders hit the same handful of issues. Ubuntu's default firewall blocks SCTP, so install explicit allow rules for relevant ports. Time synchronisation matters for TCAP timers, so run chrony or ntpd pointed at a reliable source such as an Australian university NTP mirror.
Hardware virtualisation can introduce jitter that confuses SS7 state machines. If your lab runs inside ESXi or KVM, pin SCTP traffic to a dedicated virtual NIC and disable checksum offloading that might mangle packets. Keep a rolling log of every config change, because debugging at 2am is much easier when you can diff yesterday's working config against today's broken one.
Comparing Lab Architecture Options
| Option | Cost | Realism | Setup Complexity | Best For |
|---|---|---|---|---|
| Two VMs on one host | Free | Medium | Low | Beginners |
| VMs plus Sangoma card | $400-$800 | High | Medium | Hardware realism |
| Cloud VMs across regions | $30-$100/mo | Medium | Medium | Geographic testing |
| Bare metal with TDM spans | $1500+ | Very high | High | Carrier-grade practice |
Two local VMs strike the right balance between realism and manageability for most engineers starting out. As requirements grow, layering in hardware or geo-distributed nodes lets you explore failure modes that single-host labs cannot reproduce.
The deepest learning happens when you debug real protocol exchanges against your own configuration. Once your M3UA association is active and your first ISUP call clears end-to-end, you will have built the kind of intuition that classroom material simply cannot deliver.