sippycup

command module
v0.0.0-...-3438ddd Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 19, 2026 License: MIT Imports: 17 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Sippycup

Go Reference

Sippycup is a signaling and audio gateway for several telephony (and adjacent) protocols:

  • SIP + RTP
  • WebRTC via a bidirectional version of the WHIP/WHEP protocol
  • Asterisk's AudioSocket protocol and an extended version of such
  • The AudioSocket protocol over WebSockets
  • Regular applications with raw PCM over stdio

Sippycup removes the need for a heavyweight PBX like Asterisk; it's only capable of proxying media and routing connections using basic rules.

You can use it to accept incoming calls using SIP, operate a WebRTC-to-SIP gateway, and much more.

Quick Start

First, build Sippycup using Go 1.26 or newer:

go build -o sippycup .

Next, run the basic audio echo example:

# Note: this example requires cat(1)
./sippycup example > calls.hcl
./sippycup check --config calls.hcl
./sippycup serve --config calls.hcl

You can now visit http://127.0.0.1:8080/calls (WebRTC) or http://127.0.0.1:8080/audio (AudioSocket/WS) to initiate a call. Whatever you speak will be echoed back to you. Both pages provide microphone audio, a DTMF keypad, mute, and hangup. Please note microphone access requires a secure origin (HTTPS or localhost).

[!IMPORTANT] The examples listen on loopback. Configure addresses, authentication, and TLS before using them as shared services.

For a configuration-free AudioSocket echo server, you can also run:

./sippycup listen --protocol audiosocket --bind 127.0.0.1:9019 -- cat

Run ./sippycup help or ./sippycup <command> --help for command options.

Examples

All files in examples/config are embedded in the binary. Print one with sippycup example NAME > calls.hcl, edit it, and run check before starting the server.

Name Example
echo SIP-independent AudioSocket and WebRTC echo service. Requires cat.
sip-to-audiosocket Incoming SIP with caller username in AudioSocket metadata.
audiosocket-to-sip JSON destination extraction and per-call SIP credential passthrough.
gateway AudioSocket WebSocket-to-SIP gateway.
audiosocket-metadata Validate and forward selected JSON metadata.
sip-early-media Native early media between SIP and an extended AudioSocket application.
webrtc-early-media Answer WebRTC HTTP early while SIP dialing continues.

Documentation

Go Libraries

  • libsippycup: embed the gateway engine and its browser call pages.
  • audiosocket: use AudioSocket TCP/WS independently, including the JSON extensions.

Documentation

Overview

Command sippycup runs an HCL-configured audio gateway. Its reusable engine is in github.com/ronsor/sippycup/libsippycup. Run sippycup help for commands and sippycup example for configuration.

Directories

Path Synopsis
Package audiosocket implements Asterisk AudioSocket over TCP and WebSocket.
Package audiosocket implements Asterisk AudioSocket over TCP and WebSocket.
Package libsippycup routes calls between SIP, AudioSocket, WebRTC, subprocesses, and in-process Go applications.
Package libsippycup routes calls between SIP, AudioSocket, WebRTC, subprocesses, and in-process Go applications.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL