Documentation ¶
Index ¶
- Constants
- type CCEvent
- type CallController
- type CallMap
- type Challenge
- type ClientTransaction
- type MsgBody
- type OnConnectListener
- type OnDeadListener
- type OnDisconnectListener
- type OnFailureListener
- type OnLocalSdpChange
- type OnRemoteSdpChange
- type OnRingingListener
- type RequestReceiver
- type ResponseReceiver
- type RtpProxyClient
- type RtpProxyClientOpts
- type RtpProxyUpdateResult
- type Sdp
- type ServerTransaction
- type SipMsg
- type SipRequest
- type SipResponse
- type SipTransactionManager
- type StatefulProxy
- type UA
- type UaContext
- type UaState
- type UaStateID
Constants ¶
View Source
const ( UA_STATE_NONE = UaStateID(iota) UAS_STATE_IDLE UAS_STATE_TRYING UAS_STATE_RINGING UAS_STATE_UPDATING UAS_STATE_PRE_CONNECT UAC_STATE_IDLE UAC_STATE_TRYING UAC_STATE_RINGING UAC_STATE_UPDATING UAC_STATE_CANCELLING UA_STATE_CONNECTED UA_STATE_DISCONNECTED UA_STATE_FAILED UA_STATE_DEAD )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CCEvent ¶
type CCEvent interface { GetBody() MsgBody GetSeq() int64 GetRtime() *sippy_time.MonoTime GetOrigin() string GetExtraHeaders() []sippy_header.SipHeader GetMaxForwards() *sippy_header.SipMaxForwards SetReason(*sippy_header.SipReason) GetReason() *sippy_header.SipReason String() string AppendExtraHeader(sippy_header.SipHeader) }
type CallController ¶
type CallMap ¶
type CallMap interface {
OnNewDialog(SipRequest, ServerTransaction) (UA, RequestReceiver, SipResponse)
}
type ClientTransaction ¶
type ClientTransaction interface { IncomingResponse(resp SipResponse, checksum string) SetOutboundProxy(*sippy_net.HostPort) SetAckRparams(*sippy_net.HostPort, *sippy_header.SipURL, []*sippy_header.SipRoute) Cancel(...sippy_header.SipHeader) GetACK() SipRequest SendACK() SetUAck(bool) BeforeRequestSent(SipRequest) TransmitData() SetOnSendComplete(func()) CheckRSeq(*sippy_header.SipRSeq) bool SetTxnHeaders([]sippy_header.SipHeader) GetReqExtraHeaders() []sippy_header.SipHeader // contains filtered or unexported methods }
type OnConnectListener ¶
type OnConnectListener func(*sippy_time.MonoTime, string)
type OnDeadListener ¶
type OnDeadListener func()
type OnDisconnectListener ¶
type OnDisconnectListener func(*sippy_time.MonoTime, string, int, SipRequest)
type OnFailureListener ¶
type OnLocalSdpChange ¶
type OnRemoteSdpChange ¶
type OnRingingListener ¶
type RequestReceiver ¶
type RequestReceiver interface {
RecvRequest(SipRequest, ServerTransaction) *UaContext
}
type ResponseReceiver ¶
type ResponseReceiver interface {
RecvResponse(SipResponse, ClientTransaction)
}
type RtpProxyClient ¶
type RtpProxyClient interface { SendCommand(string, func(string)) SBindSupported() bool IsLocal() bool TNotSupported() bool GetProxyAddress() string IsOnline() bool GoOnline() GoOffline() GetOpts() RtpProxyClientOpts Start() error UpdateActive(active_sessions, sessions_created, active_streams, preceived, ptransmitted int64) }
type RtpProxyClientOpts ¶
type RtpProxyClientOpts interface {
GetNWorkers() *int
}
type RtpProxyUpdateResult ¶
type RtpProxyUpdateResult interface {
Address() string
}
type Sdp ¶
type Sdp interface { String() string LocalStr(hostPort *sippy_net.HostPort) string GetCopy() Sdp SetCHeaderAddr(string) GetCHeader() *sippy_sdp.SdpConnecton GetSections() []*sippy_sdp.SdpMediaDescription SetSections([]*sippy_sdp.SdpMediaDescription) RemoveSection(int) GetOHeader() *sippy_sdp.SdpOrigin SetOHeader(*sippy_sdp.SdpOrigin) AppendAHeader(string) }
type ServerTransaction ¶
type ServerTransaction interface { IncomingRequest(req SipRequest, checksum string) TimersAreActive() bool SetCancelCB(func(*sippy_time.MonoTime, SipRequest)) SetNoackCB(func(*sippy_time.MonoTime)) SendResponse(resp SipResponse, retrans bool, ack_cb func(SipRequest)) SendResponseWithLossEmul(resp SipResponse, retrans bool, ack_cb func(SipRequest), lossemul int) Cleanup() UpgradeToSessionLock(sync.Locker) SetServer(*sippy_header.SipServer) SetBeforeResponseSent(func(SipResponse)) SetPrackCBs(func(SipRequest, SipResponse), func(*sippy_time.MonoTime)) Setup100rel(SipRequest) PrRel() bool // contains filtered or unexported methods }
type SipMsg ¶
type SipMsg interface { GetSipUserAgent() *sippy_header.SipUserAgent GetSipServer() *sippy_header.SipServer LocalStr(hostPort *sippy_net.HostPort, compact bool) string GetCSeq() *sippy_header.SipCSeq GetRSeq() *sippy_header.SipRSeq GetSipRAck() *sippy_header.SipRAck GetTId(wCSM, wBRN, wTTG bool) (*sippy_header.TID, error) GetTo() *sippy_header.SipTo GetReason() *sippy_header.SipReason AppendHeader(hdr sippy_header.SipHeader) GetVias() []*sippy_header.SipVia GetCallId() *sippy_header.SipCallId SetRtime(*sippy_time.MonoTime) GetTarget() *sippy_net.HostPort SetTarget(address *sippy_net.HostPort) InsertFirstVia(*sippy_header.SipVia) RemoveFirstVia() SetRoutes([]*sippy_header.SipRoute) GetFrom() *sippy_header.SipFrom GetRtime() *sippy_time.MonoTime GetAlso() []*sippy_header.SipAlso GetBody() MsgBody SetBody(MsgBody) GetContacts() []*sippy_header.SipContact GetRecordRoutes() []*sippy_header.SipRecordRoute GetCGUID() *sippy_header.SipCiscoGUID GetH323ConfId() *sippy_header.SipH323ConfId GetSource() *sippy_net.HostPort GetFirstHF(string) sippy_header.SipHeader GetHFs(string) []sippy_header.SipHeader GetSL() string GetMaxForwards() *sippy_header.SipMaxForwards SetMaxForwards(*sippy_header.SipMaxForwards) GetRTId() (*sippy_header.RTID, error) GetSipRequire() []*sippy_header.SipRequire GetSipSupported() []*sippy_header.SipSupported GetSipDate() *sippy_header.SipDate }
type SipRequest ¶
type SipRequest interface { SipMsg GetSipProxyAuthorization() *sippy_header.SipProxyAuthorization GetSipAuthorization() *sippy_header.SipAuthorization GetSipAuthorizationHF() sippy_header.SipAuthorizationHeader GenResponse(int, string, MsgBody, *sippy_header.SipServer) SipResponse GetMethod() string GetExpires() *sippy_header.SipExpires GenACK(to *sippy_header.SipTo) (SipRequest, error) GenCANCEL() (SipRequest, error) GetRURI() *sippy_header.SipURL SetRURI(ruri *sippy_header.SipURL) GetReferTo() *sippy_header.SipReferTo GetNated() bool }
type SipResponse ¶
type SipResponse interface { SipMsg GetSCode() (int, string) SetSCode(int, string) GetSCodeNum() int GetSCodeReason() string GetSipWWWAuthenticates() []*sippy_header.SipWWWAuthenticate GetSipProxyAuthenticates() []*sippy_header.SipProxyAuthenticate GetChallenges() []Challenge SetSCodeReason(string) GetCopy() SipResponse }
type SipTransactionManager ¶
type SipTransactionManager interface { RegConsumer(UA, string) UnregConsumer(UA, string) BeginNewClientTransaction(SipRequest, ResponseReceiver, sync.Locker, *sippy_net.HostPort, sippy_net.Transport, func(SipRequest)) CreateClientTransaction(SipRequest, ResponseReceiver, sync.Locker, *sippy_net.HostPort, sippy_net.Transport, []sippy_header.SipHeader, func(SipRequest)) (ClientTransaction, error) BeginClientTransaction(SipRequest, ClientTransaction) SendResponse(resp SipResponse, lock bool, ack_cb func(SipRequest)) SendResponseWithLossEmul(resp SipResponse, lock bool, ack_cb func(SipRequest), lossemul int) Run() Shutdown() }
type StatefulProxy ¶
type StatefulProxy interface { RequestReceiver }
type UA ¶
type UA interface { OnUnregister() RequestReceiver ResponseReceiver GetSessionLock() sync.Locker RecvEvent(CCEvent) RecvACK(SipRequest) GetSetupTs() *sippy_time.MonoTime SetSetupTs(*sippy_time.MonoTime) GetDisconnectTs() *sippy_time.MonoTime SetDisconnectTs(*sippy_time.MonoTime) GetOrigin() string SetOrigin(string) HasOnLocalSdpChange() bool OnLocalSdpChange(MsgBody, func(MsgBody)) error SetOnLocalSdpChange(OnLocalSdpChange) ResetOnLocalSdpChange() OnRemoteSdpChange(MsgBody, func(MsgBody)) error HasOnRemoteSdpChange() bool ResetOnRemoteSdpChange() SetCallId(*sippy_header.SipCallId) GetCallId() *sippy_header.SipCallId SetRTarget(*sippy_header.SipURL) GetRAddr() *sippy_net.HostPort SetRAddr(addr *sippy_net.HostPort) GetRAddr0() *sippy_net.HostPort SetRAddr0(addr *sippy_net.HostPort) GetRTarget() *sippy_header.SipURL SetRUri(*sippy_header.SipTo) GetRUri() *sippy_header.SipTo GetUsername() string SetUsername(string) GetPassword() string SetPassword(string) SetLUri(*sippy_header.SipFrom) GetLUri() *sippy_header.SipFrom GetLTag() string SetLCSeq(int) SetLContact(*sippy_header.SipContact) GetLContact() *sippy_header.SipContact GetLContacts() []*sippy_header.SipContact SetRoutes([]*sippy_header.SipRoute) GetLSDP() MsgBody SetLSDP(MsgBody) GetRSDP() MsgBody SetRSDP(MsgBody) GenRequest(method string, body MsgBody, challenge Challenge, extra_headers ...sippy_header.SipHeader) (SipRequest, error) GetSourceAddress() *sippy_net.HostPort SetSourceAddress(*sippy_net.HostPort) GetClientTransaction() ClientTransaction SetClientTransaction(ClientTransaction) GetOutboundProxy() *sippy_net.HostPort SetOutboundProxy(*sippy_net.HostPort) GetNoReplyTime() time.Duration SetNoReplyTime(time.Duration) GetExpireTime() time.Duration SetExpireTime(time.Duration) GetNoProgressTime() time.Duration SetNoProgressTime(time.Duration) StartNoReplyTimer() StartNoProgressTimer() StartExpireTimer(*sippy_time.MonoTime) CancelExpireTimer() DiscCb(*sippy_time.MonoTime, string, int, SipRequest) GetDiscCb() OnDisconnectListener SetDiscCb(OnDisconnectListener) FailCb(*sippy_time.MonoTime, string, int) GetFailCb() OnFailureListener SetFailCb(OnFailureListener) ConnCb(*sippy_time.MonoTime, string) GetConnCb() OnConnectListener SetConnCb(OnConnectListener) RingCb(*sippy_time.MonoTime, string, int) GetDeadCb() OnDeadListener SetDeadCb(OnDeadListener) IsYours(SipRequest, bool) bool GetLocalUA() *sippy_header.SipUserAgent SetLocalUA(*sippy_header.SipUserAgent) Enqueue(CCEvent) GetUasResp() SipResponse SetUasResp(SipResponse) CancelCreditTimer() StartCreditTimer(*sippy_time.MonoTime) SetCreditTime(time.Duration) ResetCreditTime(*sippy_time.MonoTime, map[int64]*sippy_time.MonoTime) ShouldUseRefer() bool GetState() UaStateID GetStateName() string Disconnect(*sippy_time.MonoTime, string) SetKaInterval(time.Duration) GetKaInterval() time.Duration OnDead() OnUacSetupComplete() OnReinvite(SipRequest, CCEvent) GetGoDeadTimeout() time.Duration ChangeState(UaState, func()) GetLastScode() int SetLastScode(int) HasNoReplyTimer() bool CancelNoReplyTimer() GetNpMtime() *sippy_time.MonoTime SetNpMtime(*sippy_time.MonoTime) GetExMtime() *sippy_time.MonoTime SetExMtime(*sippy_time.MonoTime) GetP100Ts() *sippy_time.MonoTime SetP100Ts(*sippy_time.MonoTime) HasNoProgressTimer() bool CancelNoProgressTimer() DelayedRemoteSdpUpdate(event CCEvent, remote_sdp_body MsgBody) GetP1xxTs() *sippy_time.MonoTime SetP1xxTs(*sippy_time.MonoTime) UpdateRouting(SipResponse, bool, bool) GetConnectTs() *sippy_time.MonoTime SetConnectTs(*sippy_time.MonoTime) SetBranch(string) SetAuth(sippy_header.SipHeader) GetNrMtime() *sippy_time.MonoTime SetNrMtime(*sippy_time.MonoTime) SendUasResponse(t ServerTransaction, scode int, reason string, body MsgBody, contacts []*sippy_header.SipContact, ack_wait bool, extra_headers ...sippy_header.SipHeader) EmitEvent(CCEvent) String() string GetPendingTr() ClientTransaction SetPendingTr(ClientTransaction) GetLateMedia() bool SetLateMedia(bool) GetPassAuth() bool GetOnLocalSdpChange() OnLocalSdpChange GetOnRemoteSdpChange() OnRemoteSdpChange SetOnRemoteSdpChange(OnRemoteSdpChange) GetRemoteUA() string GetExtraHeaders() []sippy_header.SipHeader SetExtraHeaders([]sippy_header.SipHeader) GetAcct(*sippy_time.MonoTime) (time.Duration, time.Duration, bool, bool) GetCLI() string GetCLD() string GetUasLossEmul() int UasLossEmul() int BeforeRequestSent(SipRequest) BeforeResponseSent(SipResponse) PrepTr(SipRequest, []sippy_header.SipHeader) (ClientTransaction, error) Cleanup() OnEarlyUasDisconnect(CCEvent) (int, string) SetExpireStartsOnSetup(bool) PrRel() bool PassAuth() bool // proxy methods for SipTransactionManager BeginNewClientTransaction(SipRequest, ResponseReceiver) BeginClientTransaction(SipRequest, ClientTransaction) RegConsumer(UA, string) GetDlgHeaders() []sippy_header.SipHeader SetDlgHeaders([]sippy_header.SipHeader) }
type UaContext ¶
type UaContext struct { Response SipResponse CancelCB func(*sippy_time.MonoTime, SipRequest) NoAckCB func(*sippy_time.MonoTime) }
type UaState ¶
type UaState interface { RecvEvent(CCEvent) (UaState, func(), error) RecvResponse(SipResponse, ClientTransaction) (UaState, func()) RecvRequest(SipRequest, ServerTransaction) (UaState, func()) RecvCancel(*sippy_time.MonoTime, SipRequest) OnDeactivate() String() string OnActivation() RecvACK(SipRequest) IsConnected() bool RecvPRACK(SipRequest, SipResponse) ID() UaStateID }
Click to show internal directories.
Click to hide internal directories.