Documentation
¶
Index ¶
Constants ¶
const ( JanusEventTypeSession int = 1 << iota JanusEventTypeHandle JanusEventTypeExternal JanusEventTypeJSep JanusEventTypeWebRTC JanusEventTypeMedia JanusEventTypePlugin JanusEventTypeTransport JanusEventTypeCore )
Constants for the Janus events
const JanusSIPPlugin = "janus.plugin.sip"
JanusSIPPlugin is the name of the SIP plugin in Janus
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BeginTransaction ¶
type BeginTransaction struct {
Request BeginTransactionRequest `json:"request"`
}
BeginTransaction is the begin transaction message
type BeginTransactionRequest ¶
type BeginTransactionRequest struct {
Tenant string `json:"tenant"`
TransactionTag string `json:"transaction_tag"`
AccountTag string `json:"account_tag"`
DestinationAccountTag string `json:"destination_account_tag"`
Source string `json:"source"`
Destination string `json:"destination"`
TimestampBegin string `json:"timestamp_begin"`
}
BeginTransactionRequest is the begin transaction request object
type Call ¶
type Call struct {
Tenant string `json:"tenant"`
TransactionTag string `json:"transaction_tag"`
AccountTag string `json:"account_tag"`
DestinationAccountTag string `json:"destination_account_tag"`
Source string `json:"source"`
Destination string `json:"destination"`
CSeq string `json:"cseq"`
TimestampInvite time.Time `json:"timestamp_begin"`
TimestampAck time.Time `json:"timestamp_ack"`
TimestampBye time.Time `json:"timestamp_bye"`
}
Call stores the status of a call in the state manager
type EndTransaction ¶
type EndTransaction struct {
Request EndTransactionRequest `json:"request"`
}
EndTransaction is the begin transaction message
type EndTransactionRequest ¶
type EndTransactionRequest struct {
Tenant string `json:"tenant"`
TransactionTag string `json:"transaction_tag"`
AccountTag string `json:"account_tag"`
DestinationAccountTag string `json:"destination_account_tag"`
TimestampEnd string `json:"timestamp_end"`
}
EndTransactionRequest is the begin transaction request object
type Event ¶
type Event struct {
Emitter string `json:"emitter,omitempty"`
Type int `json:"type"`
Timestamp int64 `json:"timestamp"`
SessionID int64 `json:"session_id"`
HandleID int64 `json:"handle_id"`
OpaqueID string `json:"opaque_id,omitempty"`
Event map[string]interface{} `json:"event"`
}
Event stores the event received from a Janus Gateway instance
type EventPlugin ¶
EventPlugin stores the details of an event from a plugin
type EventPluginSIP ¶
EventPluginSIP stores the data of a SIP event from the janus.plugin.sip plugin
type SIPMessage ¶
type SIPMessage struct {
*sipparser.SipMsg
AccountTag string
DestinationAccountTag string
Timestamp time.Time
}
SIPMessage represents a SIP message
func SIPMessageFromString ¶
func SIPMessageFromString(payload string) *SIPMessage
SIPMessageFromString returns a SIPMessage from a string