Call

data class Call(val context: Context, val client: TelnyxClient, var socket: TxSocket, val sessionId: String, val audioManager: AudioManager, val providedTurn: String = Config.DEFAULT_TURN, val providedStun: String = Config.DEFAULT_STUN)

Constructors

Link copied to clipboard
constructor(context: Context, client: TelnyxClient, socket: TxSocket, sessionId: String, audioManager: AudioManager, providedTurn: String = Config.DEFAULT_TURN, providedStun: String = Config.DEFAULT_STUN)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
lateinit var callId: UUID
Link copied to clipboard
val callStateFlow: StateFlow<CallState>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun acceptCall(callId: UUID, destinationNumber: String, customHeaders: Map<String, String>? = null)

Accepts an incoming call Local user response with both local and remote SDPs

Link copied to clipboard
fun dtmf(callId: UUID, tone: String)

Sends Dual-Tone Multi-Frequency tones down the current peer connection.

Link copied to clipboard
fun endCall(callId: UUID)

Ends an ongoing call with a provided callID, the unique UUID belonging to each call

Link copied to clipboard

Returns call state live data

Link copied to clipboard

Returns mute state live data

Link copied to clipboard

Returns hold state live data

Link copied to clipboard

Returns loudspeaker state live data

Link copied to clipboard
Link copied to clipboard

Returns the TelnyxSessionId set as a response from an invite or ringing socket call

Link copied to clipboard

Returns the TelnyxSessionId set as a response from an invite or ringing socket call

Link copied to clipboard
fun newInvite(callerName: String, callerNumber: String, destinationNumber: String, clientState: String, customHeaders: Map<String, String>? = null)

Initiates a new call invitation

Link copied to clipboard

Either places a call on hold, or unholds a call based on the current holdLiveData value

Link copied to clipboard

Either enables or disables the AudioManager loudspeaker mode based on the current loudSpeakerLiveData value

Link copied to clipboard

Either mutes or unmutes the AudioManager based on the current muteLiveData value

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun stopDebug()