sip

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2026 License: CC0-1.0 Imports: 6 Imported by: 0

Documentation

Overview

Package sip provides Go bindings for android.net.sip.

Index

Constants

View Source
const (
	Deregistering             = consts.Deregistering
	IncomingCall              = consts.IncomingCall
	IncomingCallAnswering     = consts.IncomingCallAnswering
	InCall                    = consts.InCall
	NotDefined                = consts.NotDefined
	OutgoingCall              = consts.OutgoingCall
	OutgoingCallCanceling     = consts.OutgoingCallCanceling
	OutgoingCallRingBack      = consts.OutgoingCallRingBack
	Pinging                   = consts.Pinging
	ReadyToCall               = consts.ReadyToCall
	Registering               = consts.Registering
	IncomingCallResultCode    = consts.IncomingCallResultCode
	Creator                   = consts.Creator
	ClientError               = consts.ClientError
	CrossDomainAuthentication = consts.CrossDomainAuthentication
	DataConnectionLost        = consts.DataConnectionLost
	InvalidCredentials        = consts.InvalidCredentials
	InvalidRemoteUri          = consts.InvalidRemoteUri
	InProgress                = consts.InProgress
	NoError                   = consts.NoError
	PeerNotReachable          = consts.PeerNotReachable
	ServerError               = consts.ServerError
	ServerUnreachable         = consts.ServerUnreachable
	SocketError               = consts.SocketError
	TimeOut                   = consts.TimeOut
	TransactionTerminted      = consts.TransactionTerminted
)
View Source
const (
	ExtraCallId  = consts.ExtraCallId
	ExtraOfferSd = consts.ExtraOfferSd
)

Variables

This section is empty.

Functions

func Init

func Init(env *jni.Env) error

Init resolves all JNI class and method references for this package. It is safe to call multiple times (uses sync.Once internally). Exported for E2E testing on Android.

Types

type AudioCall

type AudioCall struct {
	VM  *jni.VM
	Obj *jni.GlobalRef
}

AudioCall wraps android.net.sip.SipAudioCall.

func NewAudioCall

func NewAudioCall(vm *jni.VM, arg0 *jni.Object, arg1 *jni.Object) (*AudioCall, error)

NewAudioCall creates a new android.net.sip.SipAudioCall instance.

func (*AudioCall) AnswerCall

func (m *AudioCall) AnswerCall(arg0 int32) error

AnswerCall calls android.net.sip.SipAudioCall.answerCall.

func (*AudioCall) AttachCall

func (m *AudioCall) AttachCall(arg0 *jni.Object, arg1 string) error

AttachCall calls android.net.sip.SipAudioCall.attachCall.

func (*AudioCall) Close

func (m *AudioCall) Close() error

Close calls android.net.sip.SipAudioCall.close.

func (*AudioCall) ContinueCall

func (m *AudioCall) ContinueCall(arg0 int32) error

ContinueCall calls android.net.sip.SipAudioCall.continueCall.

func (*AudioCall) EndCall

func (m *AudioCall) EndCall() error

EndCall calls android.net.sip.SipAudioCall.endCall.

func (*AudioCall) GetLocalProfile

func (m *AudioCall) GetLocalProfile() (*jni.Object, error)

GetLocalProfile calls android.net.sip.SipAudioCall.getLocalProfile.

func (*AudioCall) GetPeerProfile

func (m *AudioCall) GetPeerProfile() (*jni.Object, error)

GetPeerProfile calls android.net.sip.SipAudioCall.getPeerProfile.

func (*AudioCall) GetState

func (m *AudioCall) GetState() (int32, error)

GetState calls android.net.sip.SipAudioCall.getState.

func (*AudioCall) HoldCall

func (m *AudioCall) HoldCall(arg0 int32) error

HoldCall calls android.net.sip.SipAudioCall.holdCall.

func (*AudioCall) IsInCall

func (m *AudioCall) IsInCall() (bool, error)

IsInCall calls android.net.sip.SipAudioCall.isInCall.

func (*AudioCall) IsMuted

func (m *AudioCall) IsMuted() (bool, error)

IsMuted calls android.net.sip.SipAudioCall.isMuted.

func (*AudioCall) IsOnHold

func (m *AudioCall) IsOnHold() (bool, error)

IsOnHold calls android.net.sip.SipAudioCall.isOnHold.

func (*AudioCall) MakeCall

func (m *AudioCall) MakeCall(
	arg0 *jni.Object,
	arg1 *jni.Object,
	arg2 int32,
) error

MakeCall calls android.net.sip.SipAudioCall.makeCall.

func (*AudioCall) SendDtmf1

func (m *AudioCall) SendDtmf1(arg0 int32) error

SendDtmf1 calls android.net.sip.SipAudioCall.sendDtmf.

func (*AudioCall) SendDtmf2_1

func (m *AudioCall) SendDtmf2_1(arg0 int32, arg1 *jni.Object) error

SendDtmf2_1 calls android.net.sip.SipAudioCall.sendDtmf.

func (*AudioCall) SetListener1

func (m *AudioCall) SetListener1(arg0 *jni.Object) error

SetListener1 calls android.net.sip.SipAudioCall.setListener.

func (*AudioCall) SetListener2_1

func (m *AudioCall) SetListener2_1(arg0 *jni.Object, arg1 bool) error

SetListener2_1 calls android.net.sip.SipAudioCall.setListener.

func (*AudioCall) SetSpeakerMode

func (m *AudioCall) SetSpeakerMode(arg0 bool) error

SetSpeakerMode calls android.net.sip.SipAudioCall.setSpeakerMode.

func (*AudioCall) StartAudio

func (m *AudioCall) StartAudio() error

StartAudio calls android.net.sip.SipAudioCall.startAudio.

func (*AudioCall) ToggleMute

func (m *AudioCall) ToggleMute() error

ToggleMute calls android.net.sip.SipAudioCall.toggleMute.

type AudioCallListener

type AudioCallListener struct {
	VM  *jni.VM
	Obj *jni.GlobalRef
}

AudioCallListener wraps android.net.sip.SipAudioCall$Listener.

func (*AudioCallListener) OnCallBusy

func (m *AudioCallListener) OnCallBusy(arg0 *jni.Object) error

OnCallBusy calls android.net.sip.SipAudioCall$Listener.onCallBusy.

func (*AudioCallListener) OnCallEnded

func (m *AudioCallListener) OnCallEnded(arg0 *jni.Object) error

OnCallEnded calls android.net.sip.SipAudioCall$Listener.onCallEnded.

func (*AudioCallListener) OnCallEstablished

func (m *AudioCallListener) OnCallEstablished(arg0 *jni.Object) error

OnCallEstablished calls android.net.sip.SipAudioCall$Listener.onCallEstablished.

func (*AudioCallListener) OnCallHeld

func (m *AudioCallListener) OnCallHeld(arg0 *jni.Object) error

OnCallHeld calls android.net.sip.SipAudioCall$Listener.onCallHeld.

func (*AudioCallListener) OnCalling

func (m *AudioCallListener) OnCalling(arg0 *jni.Object) error

OnCalling calls android.net.sip.SipAudioCall$Listener.onCalling.

func (*AudioCallListener) OnChanged

func (m *AudioCallListener) OnChanged(arg0 *jni.Object) error

OnChanged calls android.net.sip.SipAudioCall$Listener.onChanged.

func (*AudioCallListener) OnError

func (m *AudioCallListener) OnError(
	arg0 *jni.Object,
	arg1 int32,
	arg2 string,
) error

OnError calls android.net.sip.SipAudioCall$Listener.onError.

func (*AudioCallListener) OnReadyToCall

func (m *AudioCallListener) OnReadyToCall(arg0 *jni.Object) error

OnReadyToCall calls android.net.sip.SipAudioCall$Listener.onReadyToCall.

func (*AudioCallListener) OnRinging

func (m *AudioCallListener) OnRinging(arg0 *jni.Object, arg1 *jni.Object) error

OnRinging calls android.net.sip.SipAudioCall$Listener.onRinging.

func (*AudioCallListener) OnRingingBack

func (m *AudioCallListener) OnRingingBack(arg0 *jni.Object) error

OnRingingBack calls android.net.sip.SipAudioCall$Listener.onRingingBack.

type ErrorCode

type ErrorCode struct {
	VM  *jni.VM
	Obj *jni.GlobalRef
}

ErrorCode wraps android.net.sip.SipErrorCode.

func (*ErrorCode) ToString

func (m *ErrorCode) ToString(arg0 int32) (string, error)

ToString calls android.net.sip.SipErrorCode.toString.

type Exception

type Exception struct {
	VM  *jni.VM
	Obj *jni.GlobalRef
}

Exception wraps android.net.sip.SipException.

func NewException

func NewException(vm *jni.VM) (*Exception, error)

NewException creates a new android.net.sip.SipException instance.

type Manager

type Manager struct {
	VM  *jni.VM
	Obj *jni.GlobalRef
}

Manager wraps android.net.sip.SipManager.

func (*Manager) Close

func (m *Manager) Close(arg0 string) error

Close calls android.net.sip.SipManager.close.

func (*Manager) CreateSipSession

func (m *Manager) CreateSipSession(arg0 *jni.Object, arg1 *jni.Object) (*jni.Object, error)

CreateSipSession calls android.net.sip.SipManager.createSipSession.

func (*Manager) GetCallId

func (m *Manager) GetCallId(arg0 *jni.Object) (string, error)

GetCallId calls android.net.sip.SipManager.getCallId.

func (*Manager) GetOfferSessionDescription

func (m *Manager) GetOfferSessionDescription(arg0 *jni.Object) (string, error)

GetOfferSessionDescription calls android.net.sip.SipManager.getOfferSessionDescription.

func (*Manager) GetSessionFor

func (m *Manager) GetSessionFor(arg0 *jni.Object) (*jni.Object, error)

GetSessionFor calls android.net.sip.SipManager.getSessionFor.

func (*Manager) IsApiSupported

func (m *Manager) IsApiSupported(arg0 *jni.Object) (bool, error)

IsApiSupported calls android.net.sip.SipManager.isApiSupported.

func (*Manager) IsIncomingCallIntent

func (m *Manager) IsIncomingCallIntent(arg0 *jni.Object) (bool, error)

IsIncomingCallIntent calls android.net.sip.SipManager.isIncomingCallIntent.

func (*Manager) IsOpened

func (m *Manager) IsOpened(arg0 string) (bool, error)

IsOpened calls android.net.sip.SipManager.isOpened.

func (*Manager) IsRegistered

func (m *Manager) IsRegistered(arg0 string) (bool, error)

IsRegistered calls android.net.sip.SipManager.isRegistered.

func (*Manager) IsSipWifiOnly

func (m *Manager) IsSipWifiOnly(arg0 *jni.Object) (bool, error)

IsSipWifiOnly calls android.net.sip.SipManager.isSipWifiOnly.

func (*Manager) IsVoipSupported

func (m *Manager) IsVoipSupported(arg0 *jni.Object) (bool, error)

IsVoipSupported calls android.net.sip.SipManager.isVoipSupported.

func (*Manager) MakeAudioCall4

func (m *Manager) MakeAudioCall4(
	arg0 *jni.Object,
	arg1 *jni.Object,
	arg2 *jni.Object,
	arg3 int32,
) (*jni.Object, error)

MakeAudioCall4 calls android.net.sip.SipManager.makeAudioCall.

func (*Manager) MakeAudioCall4_1

func (m *Manager) MakeAudioCall4_1(
	arg0 string,
	arg1 string,
	arg2 *jni.Object,
	arg3 int32,
) (*jni.Object, error)

MakeAudioCall4_1 calls android.net.sip.SipManager.makeAudioCall.

func (*Manager) NewInstance

func (m *Manager) NewInstance(arg0 *jni.Object) (*jni.Object, error)

NewInstance calls android.net.sip.SipManager.newInstance.

func (*Manager) Open1

func (m *Manager) Open1(arg0 *jni.Object) error

Open1 calls android.net.sip.SipManager.open.

func (*Manager) Open3_1

func (m *Manager) Open3_1(
	arg0 *jni.Object,
	arg1 *jni.Object,
	arg2 *jni.Object,
) error

Open3_1 calls android.net.sip.SipManager.open.

func (*Manager) Register

func (m *Manager) Register(
	arg0 *jni.Object,
	arg1 int32,
	arg2 *jni.Object,
) error

Register calls android.net.sip.SipManager.register.

func (*Manager) SetRegistrationListener

func (m *Manager) SetRegistrationListener(arg0 string, arg1 *jni.Object) error

SetRegistrationListener calls android.net.sip.SipManager.setRegistrationListener.

func (*Manager) TakeAudioCall

func (m *Manager) TakeAudioCall(arg0 *jni.Object, arg1 *jni.Object) (*jni.Object, error)

TakeAudioCall calls android.net.sip.SipManager.takeAudioCall.

func (*Manager) Unregister

func (m *Manager) Unregister(arg0 *jni.Object, arg1 *jni.Object) error

Unregister calls android.net.sip.SipManager.unregister.

type Profile

type Profile struct {
	VM  *jni.VM
	Obj *jni.GlobalRef
}

Profile wraps android.net.sip.SipProfile.

func (*Profile) DescribeContents

func (m *Profile) DescribeContents() (int32, error)

DescribeContents calls android.net.sip.SipProfile.describeContents.

func (*Profile) GetAuthUserName

func (m *Profile) GetAuthUserName() (string, error)

GetAuthUserName calls android.net.sip.SipProfile.getAuthUserName.

func (*Profile) GetAutoRegistration

func (m *Profile) GetAutoRegistration() (bool, error)

GetAutoRegistration calls android.net.sip.SipProfile.getAutoRegistration.

func (*Profile) GetDisplayName

func (m *Profile) GetDisplayName() (string, error)

GetDisplayName calls android.net.sip.SipProfile.getDisplayName.

func (*Profile) GetPassword

func (m *Profile) GetPassword() (string, error)

GetPassword calls android.net.sip.SipProfile.getPassword.

func (*Profile) GetPort

func (m *Profile) GetPort() (int32, error)

GetPort calls android.net.sip.SipProfile.getPort.

func (*Profile) GetProfileName

func (m *Profile) GetProfileName() (string, error)

GetProfileName calls android.net.sip.SipProfile.getProfileName.

func (*Profile) GetProtocol

func (m *Profile) GetProtocol() (string, error)

GetProtocol calls android.net.sip.SipProfile.getProtocol.

func (*Profile) GetProxyAddress

func (m *Profile) GetProxyAddress() (string, error)

GetProxyAddress calls android.net.sip.SipProfile.getProxyAddress.

func (*Profile) GetSendKeepAlive

func (m *Profile) GetSendKeepAlive() (bool, error)

GetSendKeepAlive calls android.net.sip.SipProfile.getSendKeepAlive.

func (*Profile) GetSipDomain

func (m *Profile) GetSipDomain() (string, error)

GetSipDomain calls android.net.sip.SipProfile.getSipDomain.

func (*Profile) GetUriString

func (m *Profile) GetUriString() (string, error)

GetUriString calls android.net.sip.SipProfile.getUriString.

func (*Profile) GetUserName

func (m *Profile) GetUserName() (string, error)

GetUserName calls android.net.sip.SipProfile.getUserName.

func (*Profile) SetCallingUid

func (m *Profile) SetCallingUid(arg0 int32) error

SetCallingUid calls android.net.sip.SipProfile.setCallingUid.

func (*Profile) WriteToParcel

func (m *Profile) WriteToParcel(arg0 *jni.Object, arg1 int32) error

WriteToParcel calls android.net.sip.SipProfile.writeToParcel.

type ProfileBuilder

type ProfileBuilder struct {
	VM  *jni.VM
	Obj *jni.GlobalRef
}

ProfileBuilder wraps android.net.sip.SipProfile$Builder.

func (*ProfileBuilder) Build

func (m *ProfileBuilder) Build() (*jni.Object, error)

Build calls android.net.sip.SipProfile$Builder.build.

func (*ProfileBuilder) SetAuthUserName

func (m *ProfileBuilder) SetAuthUserName(arg0 string) (*jni.Object, error)

SetAuthUserName calls android.net.sip.SipProfile$Builder.setAuthUserName.

func (*ProfileBuilder) SetAutoRegistration

func (m *ProfileBuilder) SetAutoRegistration(arg0 bool) (*jni.Object, error)

SetAutoRegistration calls android.net.sip.SipProfile$Builder.setAutoRegistration.

func (*ProfileBuilder) SetDisplayName

func (m *ProfileBuilder) SetDisplayName(arg0 string) (*jni.Object, error)

SetDisplayName calls android.net.sip.SipProfile$Builder.setDisplayName.

func (*ProfileBuilder) SetOutboundProxy

func (m *ProfileBuilder) SetOutboundProxy(arg0 string) (*jni.Object, error)

SetOutboundProxy calls android.net.sip.SipProfile$Builder.setOutboundProxy.

func (*ProfileBuilder) SetPassword

func (m *ProfileBuilder) SetPassword(arg0 string) (*jni.Object, error)

SetPassword calls android.net.sip.SipProfile$Builder.setPassword.

func (*ProfileBuilder) SetPort

func (m *ProfileBuilder) SetPort(arg0 int32) (*jni.Object, error)

SetPort calls android.net.sip.SipProfile$Builder.setPort.

func (*ProfileBuilder) SetProfileName

func (m *ProfileBuilder) SetProfileName(arg0 string) (*jni.Object, error)

SetProfileName calls android.net.sip.SipProfile$Builder.setProfileName.

func (*ProfileBuilder) SetProtocol

func (m *ProfileBuilder) SetProtocol(arg0 string) (*jni.Object, error)

SetProtocol calls android.net.sip.SipProfile$Builder.setProtocol.

func (*ProfileBuilder) SetSendKeepAlive

func (m *ProfileBuilder) SetSendKeepAlive(arg0 bool) (*jni.Object, error)

SetSendKeepAlive calls android.net.sip.SipProfile$Builder.setSendKeepAlive.

type RegistrationListener

type RegistrationListener struct {
	VM  *jni.VM
	Obj *jni.GlobalRef
}

RegistrationListener wraps android.net.sip.SipRegistrationListener.

func (*RegistrationListener) OnRegistering

func (m *RegistrationListener) OnRegistering(arg0 string) error

OnRegistering calls android.net.sip.SipRegistrationListener.onRegistering.

func (*RegistrationListener) OnRegistrationDone

func (m *RegistrationListener) OnRegistrationDone(arg0 string, arg1 int64) error

OnRegistrationDone calls android.net.sip.SipRegistrationListener.onRegistrationDone.

func (*RegistrationListener) OnRegistrationFailed

func (m *RegistrationListener) OnRegistrationFailed(
	arg0 string,
	arg1 int32,
	arg2 string,
) error

OnRegistrationFailed calls android.net.sip.SipRegistrationListener.onRegistrationFailed.

type Session

type Session struct {
	VM  *jni.VM
	Obj *jni.GlobalRef
}

Session wraps android.net.sip.SipSession.

func (*Session) AnswerCall

func (m *Session) AnswerCall(arg0 string, arg1 int32) error

AnswerCall calls android.net.sip.SipSession.answerCall.

func (*Session) ChangeCall

func (m *Session) ChangeCall(arg0 string, arg1 int32) error

ChangeCall calls android.net.sip.SipSession.changeCall.

func (*Session) EndCall

func (m *Session) EndCall() error

EndCall calls android.net.sip.SipSession.endCall.

func (*Session) GetCallId

func (m *Session) GetCallId() (string, error)

GetCallId calls android.net.sip.SipSession.getCallId.

func (*Session) GetLocalIp

func (m *Session) GetLocalIp() (string, error)

GetLocalIp calls android.net.sip.SipSession.getLocalIp.

func (*Session) GetLocalProfile

func (m *Session) GetLocalProfile() (*jni.Object, error)

GetLocalProfile calls android.net.sip.SipSession.getLocalProfile.

func (*Session) GetPeerProfile

func (m *Session) GetPeerProfile() (*jni.Object, error)

GetPeerProfile calls android.net.sip.SipSession.getPeerProfile.

func (*Session) GetState

func (m *Session) GetState() (int32, error)

GetState calls android.net.sip.SipSession.getState.

func (*Session) IsInCall

func (m *Session) IsInCall() (bool, error)

IsInCall calls android.net.sip.SipSession.isInCall.

func (*Session) MakeCall

func (m *Session) MakeCall(
	arg0 *jni.Object,
	arg1 string,
	arg2 int32,
) error

MakeCall calls android.net.sip.SipSession.makeCall.

func (*Session) Register

func (m *Session) Register(arg0 int32) error

Register calls android.net.sip.SipSession.register.

func (*Session) SetListener

func (m *Session) SetListener(arg0 *jni.Object) error

SetListener calls android.net.sip.SipSession.setListener.

func (*Session) Unregister

func (m *Session) Unregister() error

Unregister calls android.net.sip.SipSession.unregister.

type SessionListener

type SessionListener struct {
	VM  *jni.VM
	Obj *jni.GlobalRef
}

SessionListener wraps android.net.sip.SipSession$Listener.

func (*SessionListener) OnCallBusy

func (m *SessionListener) OnCallBusy(arg0 *jni.Object) error

OnCallBusy calls android.net.sip.SipSession$Listener.onCallBusy.

func (*SessionListener) OnCallChangeFailed

func (m *SessionListener) OnCallChangeFailed(
	arg0 *jni.Object,
	arg1 int32,
	arg2 string,
) error

OnCallChangeFailed calls android.net.sip.SipSession$Listener.onCallChangeFailed.

func (*SessionListener) OnCallEnded

func (m *SessionListener) OnCallEnded(arg0 *jni.Object) error

OnCallEnded calls android.net.sip.SipSession$Listener.onCallEnded.

func (*SessionListener) OnCallEstablished

func (m *SessionListener) OnCallEstablished(arg0 *jni.Object, arg1 string) error

OnCallEstablished calls android.net.sip.SipSession$Listener.onCallEstablished.

func (*SessionListener) OnCalling

func (m *SessionListener) OnCalling(arg0 *jni.Object) error

OnCalling calls android.net.sip.SipSession$Listener.onCalling.

func (*SessionListener) OnError

func (m *SessionListener) OnError(
	arg0 *jni.Object,
	arg1 int32,
	arg2 string,
) error

OnError calls android.net.sip.SipSession$Listener.onError.

func (*SessionListener) OnRegistering

func (m *SessionListener) OnRegistering(arg0 *jni.Object) error

OnRegistering calls android.net.sip.SipSession$Listener.onRegistering.

func (*SessionListener) OnRegistrationDone

func (m *SessionListener) OnRegistrationDone(arg0 *jni.Object, arg1 int32) error

OnRegistrationDone calls android.net.sip.SipSession$Listener.onRegistrationDone.

func (*SessionListener) OnRegistrationFailed

func (m *SessionListener) OnRegistrationFailed(
	arg0 *jni.Object,
	arg1 int32,
	arg2 string,
) error

OnRegistrationFailed calls android.net.sip.SipSession$Listener.onRegistrationFailed.

func (*SessionListener) OnRegistrationTimeout

func (m *SessionListener) OnRegistrationTimeout(arg0 *jni.Object) error

OnRegistrationTimeout calls android.net.sip.SipSession$Listener.onRegistrationTimeout.

func (*SessionListener) OnRinging

func (m *SessionListener) OnRinging(
	arg0 *jni.Object,
	arg1 *jni.Object,
	arg2 string,
) error

OnRinging calls android.net.sip.SipSession$Listener.onRinging.

func (*SessionListener) OnRingingBack

func (m *SessionListener) OnRingingBack(arg0 *jni.Object) error

OnRingingBack calls android.net.sip.SipSession$Listener.onRingingBack.

type SessionState

type SessionState struct {
	VM  *jni.VM
	Obj *jni.GlobalRef
}

SessionState wraps android.net.sip.SipSession$State.

func (*SessionState) ToString

func (m *SessionState) ToString(arg0 int32) (string, error)

ToString calls android.net.sip.SipSession$State.toString.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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