gosip

package module
v0.0.0-...-a579d18 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2019 License: BSD-2-Clause Imports: 9 Imported by: 0

README

gosip

SIP stack in Go (RFC 3261)

Build Status Coverage Status

PROJECT IS UNDER DEVELOPMENT

Inspired by:

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Version = "0.0.0"

Version is the current gosip package version

Functions

func Listen

func Listen(network string, listenAddr string) error

Listen starts SIP stack

Types

type RequestHandler

type RequestHandler func(req sip.Request)

RequestHandler is a callback that will be called on the incoming request of the certain method

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server is a SIP server

func DefaultServer

func DefaultServer() *Server

DefaultServer returns auto created default SIP server

func NewServer

func NewServer(config *ServerConfig) *Server

NewServer creates new instance of SIP server.

func (*Server) Listen

func (srv *Server) Listen(network string, listenAddr string) error

ListenAndServe starts serving listeners on the provided address

func (*Server) OnRequest

func (srv *Server) OnRequest(method sip.RequestMethod, handler RequestHandler) error

OnRequest registers new request callback

func (*Server) Request

func (srv *Server) Request(req sip.Request) (<-chan sip.Response, error)

Send SIP message

func (*Server) Respond

func (srv *Server) Respond(res sip.Response) (<-chan sip.Request, error)

func (*Server) Shutdown

func (srv *Server) Shutdown()

Shutdown gracefully shutdowns SIP server

type ServerConfig

type ServerConfig struct {
	HostAddr   string
	Extensions []string
}

ServerConfig describes available options

Directories

Path Synopsis
sip
parser
Forked from github.com/StefanKopieczek/gossip by @StefanKopieczek
Forked from github.com/StefanKopieczek/gossip by @StefanKopieczek
Forked from github.com/StefanKopieczek/gossip by @StefanKopieczek
Forked from github.com/StefanKopieczek/gossip by @StefanKopieczek
transaction package implements SIP Transaction Layer
transaction package implements SIP Transaction Layer
transport package implements SIP transport layer.
transport package implements SIP transport layer.
Forked from github.com/StefanKopieczek/gossip by @StefanKopieczek
Forked from github.com/StefanKopieczek/gossip by @StefanKopieczek

Jump to

Keyboard shortcuts

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