Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Version = "0.0.0"
Version is the current gosip package version
Functions ¶
This section is empty.
Types ¶
type RequestHandler ¶
type RequestHandler func(req sip.Request, tx sip.ServerTransaction)
RequestHandler is a callback that will be called on the incoming request of the certain method tx argument can be nil for 2xx ACK request
type RequestWithContextOption ¶
type RequestWithContextOption interface {
ApplyRequestWithContext(options *RequestWithContextOptions)
}
func WithAuthorizer ¶
func WithAuthorizer(authorizer sip.Authorizer) RequestWithContextOption
func WithResponseHandler ¶
func WithResponseHandler(handler func(res sip.Response, request sip.Request)) RequestWithContextOption
type Server ¶
type Server interface { Shutdown() Listen(network, addr string, options ...transport.ListenOption) error Send(msg sip.Message) error Request(req sip.Request) (sip.ClientTransaction, error) RequestWithContext( ctx context.Context, request sip.Request, options ...RequestWithContextOption, ) (sip.Response, error) OnRequest(method sip.RequestMethod, handler RequestHandler) error Respond(res sip.Response) (sip.ServerTransaction, error) RespondOnRequest( request sip.Request, status sip.StatusCode, reason, body string, headers []sip.Header, ) (sip.ServerTransaction, error) }
func NewServer ¶
func NewServer( config ServerConfig, tpFactory TransportLayerFactory, txFactory TransactionLayerFactory, logger log.Logger, ) Server
NewServer creates new instance of SIP server.
type ServerConfig ¶
type ServerConfig struct { // Public IP address or domain name, if empty auto resolved IP will be used. Host string // Dns is an address of the public DNS server to use in SRV lookup. Dns string Extensions []string MsgMapper sip.MessageMapper UserAgent string }
ServerConfig describes available options
type TransactionLayerFactory ¶
Directories ¶
Path | Synopsis |
---|---|
examples
|
|
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 |
Click to show internal directories.
Click to hide internal directories.