Documentation
¶
Overview ¶
Command pstn is a tiny "fake PSTN" service useful for exercising upstream SBCs / dialers. For every inbound SIP call it:
- Randomly chooses between sending 180 Ringing or 183 Session Progress as the provisional response. With the default SIP_AUTO_RINGING=false on the VoiceBlender side, VB only emits 100 Trying until something explicitly asks for 180 or 183.
- Holds the call in the resulting state (ringing or early_media) for RING_DURATION (default 3s).
- Answers the call (sends 200 OK).
- Keeps the call up for ANSWERED_DURATION (default 15s).
- Hangs up.
At any point a caller-side disconnect is detected and the goroutine exits cleanly without a redundant hangup.
Configuration (env):
VOICEBLENDER_URL default http://localhost:8080/v1 RING_DURATION default 3s — how long to ring before answering ANSWERED_DURATION default 15s — how long to keep the call up after answer
Like the other examples, pstn uses the WebSocket VSI feed for events; no HTTP webhook server is required.
Click to show internal directories.
Click to hide internal directories.