Skip to content

Latest commit

 

History

History
58 lines (44 loc) · 3.46 KB

sip.js.simpleuser.md

File metadata and controls

58 lines (44 loc) · 3.46 KB

Home > sip.js > SimpleUser

SimpleUser class

A simple SIP user class.

Signature:

export declare class SimpleUser 

Remarks

While this class is completely functional for simple use cases, it is not intended to provide an interface which is suitable for most (must less all) applications. While this class has many limitations (for example, it only handles a single concurrent session), it is, however, intended to serve as a simple example of using the SIP.js API.

Constructors

Constructor Modifiers Description
(constructor)(server, options) Constructs a new instance of the SimpleUser class.

Properties

Property Modifiers Type Description
delegate SimpleUserDelegate | undefined Delegate.
localAudioTrack MediaStreamTrack | undefined The local audio track, if available.
localMediaStream MediaStream | undefined The local media stream. Undefined if call not answered.
localVideoTrack MediaStreamTrack | undefined The local video track, if available.
remoteAudioTrack MediaStreamTrack | undefined The remote audio track, if available.
remoteMediaStream MediaStream | undefined The remote media stream. Undefined if call not answered.
remoteVideoTrack MediaStreamTrack | undefined The remote video track, if available.

Methods

Method Modifiers Description
answer(invitationAcceptOptions) Answer an incoming call.
call(destination, inviterOptions, inviterInviteOptions) Make an outgoing call.
connect() Connect.
decline() Decline an incoming call.
disconnect() Disconnect.
hangup() Hangup a call.
hold() Hold call
isConnected() Return true if connected.
isHeld() Hold state.
isMuted() Mute state.
message(destination, message) Send a message.
mute() Mute call.
register(registererOptions, registererRegisterOptions) Start receiving incoming calls.
sendDTMF(tone) Send DTMF.
unhold() Unhold call.
unmute() Unmute call.
unregister(registererUnregisterOptions) Stop receiving incoming calls.