MCPcopy Index your code
hub / github.com/cloudwebrtc/go-sip-ua

github.com/cloudwebrtc/go-sip-ua @v1.1.6

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.1.6 ↗ · + Follow
263 symbols 665 edges 27 files 61 documented · 23%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

go-sip-ua

SIP UA library for client/b2bua using golang

Features

  • [x] Transports UDP/TCP/TLS/WS/WSS.
  • [x] Simple pure Go SIP Client.
  • [x] Simple pure Go B2BUA, support RFC8599, Google FCM/Apple PushKit.
  • [ ] RTP relay (UDP<-->UDP, WebRTC/ICE<->UDP)
  • [ ] WebRTC2SIP Gateway.

Running the examples

git clone https://github.com/cloudwebrtc/go-sip-ua
cd go-sip-ua

Client

# run client
go run examples/client/main.go

B2BUA

B2BUA is a minimal SIP call switch, it registers and calls, and supports UDP/TCP/TLS/WebSockets.

When you need a quick test for TLS/WSS, you can use mkcert to create a local self-signed certificate.

mkdir -p certs
mkcert -key-file certs/key.pem -cert-file certs/cert.pem  localhost 127.0.0.1 ::1 example.com

Run the mini b2bua.

# run b2bua
go run examples/b2bua/main.go -c

You can use dart-sip-ua or linphone or jssip to test call or registration, built-in test account 100~400

WebSocket: wss://127.0.0.1:5081
SIP URI: 100@127.0.0.1
Authorization User: 100
Password: 100
Display Name: Flutter SIP Client

Dependencies

Extension points exported contracts — how you extend this code

Registry (Interface)
Registry Address-of-Record registry [1 implementers]
examples/b2bua/registry/registry.go
Media (Interface)
Media interface
pkg/media/media.go
RequestHandler (FuncType)
RequestHandler is a callback that will be called on the incoming request of the certain method tx argument can be nil fo
pkg/stack/stack.go
InviteSessionHandler (FuncType)
InviteSessionHandler .
pkg/ua/ua.go
Authorizer (Interface)
(no doc) [1 implementers]
pkg/auth/client.go
RequestCallback (FuncType)
(no doc)
pkg/session/session.go
PushCallback (FuncType)
(no doc)
examples/b2bua/registry/rfc8599.go
Track (Interface)
(no doc) [1 implementers]
pkg/media/rtp.go

Core symbols most depended-on inside this repo

String
called by 23
pkg/auth/client.go
Log
called by 19
pkg/ua/ua.go
NewSessionKey
called by 17
pkg/ua/ua.go
Get
called by 17
examples/b2bua/registry/expire.go
md5Hex
called by 16
pkg/auth/server.go
String
called by 16
pkg/session/session.go
Respond
called by 14
pkg/stack/stack.go
SetState
called by 13
pkg/session/session.go

Shape

Method 163
Function 56
Struct 31
FuncType 7
Interface 4
TypeAlias 2

Languages

Go100%

Modules by API surface

pkg/session/session.go35 symbols
pkg/stack/stack.go31 symbols
pkg/ua/ua.go22 symbols
examples/b2bua/registry/expire.go19 symbols
examples/b2bua/b2bua/b2bua.go19 symbols
pkg/auth/client.go14 symbols
examples/b2bua/registry/rfc8599.go14 symbols
examples/b2bua/registry/registry.go12 symbols
pkg/auth/server.go11 symbols
examples/b2bua/registry/mem.go11 symbols
pkg/media/rtp/udp.go8 symbols
pkg/media/media.go8 symbols

For agents

$ claude mcp add go-sip-ua \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page