Menu

How Do You Turn a Windows PC into the Handset for a PTCL Landline with an FXO Gateway and C#?
📰

How Do You Turn a Windows PC into the Handset for a PTCL Landline with an FXO Gateway and C#?

DEV Community: dotnet·Muhammad Afzal Kalwar·2 days ago
#n2nrhtOy
#devtodotnet#devto#dev#call#gateway
Long article (1679 words) — no AI summary yet.
Reading 0:00
15s threshold

Short answer

To make a Windows PC the handset for a PTCL landline, put a one-line SIP FXO gateway between the PC and the modem's phone jack, and write a small SIP client that sends a direct INVITE to the gateway. The gateway goes off-hook on the landline and dials the number; the PC handles the microphone, speaker, mute, keypad tones and hang-up. In PTCL Dialer that client is about 550 lines of C# on top of SIPSorcery, and the part that decides what the app does is a separate, hardware-free core: number normalisation, a call state machine, and a SQLite history. Because the SIP line sits behind an interface, the same window also runs against a simulated line before any gateway is plugged in.

This post explains that split, with the real numbers-in, numbers-out table from the code and what the 23 tests in the repository do and don't prove.

What is the setup?

The audience is a person at a Windows PC whose PTCL connection includes a phone jack.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.