r/Asterisk • • 22h ago

My Asterisk Fax GUI is now a complete Linux fax machine – sending, receiving, and an address book

Thumbnail
gallery
25 Upvotes

Hi everyone,

A little update on my Asterisk fax project. What started as a simple Python GUI for sending faxes has now grown into a small Linux desktop fax machine. I've added fax reception, a keypad, and an address book. This is probably the final version for now.

What's new:

  • Sending: The original workflow is still there. Drag and drop a PDF (or select one), enter the fax number, and send it.
  • Keypad: A numeric keypad, just like on a telephone, makes entering numbers a little more convenient.
  • Receiving: Incoming faxes are automatically converted from TIFF to PDF and displayed in a list. New faxes are detected automatically, unread ones are highlighted, and double-clicking opens them in the default PDF viewer.
  • Address book: Names and fax numbers are stored in a simple JSON file. You can add, edit, and delete entries.

My setup:

  • Asterisk 20 on an Ubuntu MATE 24.04 desktop PC
  • Python + Tkinter for the GUI
  • Asterisk handles the actual fax transmission and reception
  • My main Asterisk server runs on a Raspberry Pi and connects to SIP providers and FritzBoxes via SIP and IAX2

Security and network configuration:

A word of warning: Setting up Asterisk for external connections is not quite that simple.

  • If your Asterisk server is accessible from the internet, you should protect it against SIP scanners and brute-force attacks. I recommend using Fail2Ban together with APIBAN.
  • If your Asterisk server is behind a router, you may need port forwarding for the required SIP and RTP ports, depending on your network setup.
  • You also need a publicly reachable IP address. This can be a static public IP address or a dynamic IP address combined with a DynDNS service.
  • Make sure you understand which ports are exposed to the internet and secure your Asterisk configuration accordingly. Never expose an Asterisk server without proper protection.

Remote access: WireGuard VPN and IAX2

If you want to send faxes from a Linux laptop while traveling, I would recommend a different approach:

Set up a WireGuard VPN connection to your own Asterisk server at home. You can then establish an IAX2 connection through the VPN tunnel. Your laptop communicates with your home Asterisk server, and that server handles the actual fax transmission through its SIP provider.

This way, you don't have to expose SIP or IAX2 directly to the internet. You only need to make your WireGuard endpoint reachable. For a typical home setup, this means forwarding the WireGuard UDP port on your router.

However, there is another potential problem: CGNAT.

A static public IP address is not essential. A dynamic public IP combined with DynDNS is usually sufficient. But DynDNS cannot solve the problem if your ISP uses Carrier-Grade NAT (CGNAT). In that case, your router does not have its own publicly reachable IPv4 address, and normal port forwarding will not work.

This is particularly relevant with Starlink, where standard residential connections commonly use CGNAT. Depending on your service plan and available options, you may need a public IP address or an alternative solution.

Possible alternatives include using IPv6, a VPN relay or a small VPS with a public IP address as an intermediary. These solutions require additional networking knowledge and configuration.

To be honest, getting remote faxing to work reliably can involve quite a bit of effort.

My practical advice: If you simply need to send a fax occasionally while traveling, using an existing online fax portal or an email-to-fax service is probably much easier. For receiving faxes, having them forwarded to your email is also a practical solution.

Sometimes you can overengineer things. Just because something is technically possible doesn't mean it's worth the effort!

A few more details:

The GUI must run on the same Linux machine as the Asterisk instance it controls. It accesses Asterisk through the local console and needs the appropriate file permissions and group membership. I've tested it only with my own setup.

I've also written a detailed step-by-step guide covering the additional packages, folder permissions, dialplan changes, the conversion script, and the complete Python program.

Full documentation and source code:

https://elektronikbasteln.pl7.de/building-a-linux-based-fax-machine-with-asterisk-and-python

For anyone who missed the first version, here's my original post about the fax-sending GUI:

https://www.reddit.com/r/Asterisk/comments/1y9xime/sending_faxes_from_a_python_gui_with_asterisk_20/

As before, this is a hobby project. I built and refined much of it with AI assistance, but there was quite a bit of testing and troubleshooting involved.

Feel free to have a look, copy it, improve it, or point out things that could be done better. Feedback is welcome!

73 from Sweden,
Volker (SM5ZBS)


r/Asterisk • • 6h ago

🖖Welcome to r/AiPBX — Open-Source Enterprise IP PBX & Unified Communications on Asterisk 22! 🚀

Thumbnail
reddit.com
1 Upvotes

r/Asterisk • • 12h ago

What would you log for a confirmed handoff in Asterisk?

1 Upvotes

I’m working on a screened handoff where the person answering hears a short private summary and presses 1 before the caller is connected. Carrier voicemail can answer the outbound leg without pressing anything. There’s also a case where a person presses 1 and the caller hangs up before the bridge forms. I’d like the call history to tell those outcomes apart.

My current flow uses Twilio and Vapi. For an Asterisk version, I’m looking at the U() option on Dial() for the callee-side prompt and CEL for bridge events. Would you log the keypad acceptance with CELGenUserEvent() and correlate it with both channels entering the same bridge by bridge_id, or is there a cleaner way to reconstruct the sequence?

I used ChatGPT to help draft this post.