acceptCall

fun acceptCall(    context: Context,     call: STWVCall,     completion: CompletionCallback?,     playSTWSinkCallback: STWAudioSinkPlayCallback,     captureSTWSinkCallback: STWAudioSinkCaptureCallback)

Call this method to accept an incoming VoIP call

Note : the audio sink feature will be enabled automatically for this method.

Parameters

context

Context the application context

call

STWVCall the call instance you want to accept it

completion

CompletionCallback is a block of code which will be invoked when the call is created

playSTWSinkCallback

STWAudioSinkPlayCallback is a block of code which will be invoked when the play sink is ready and there is a valid data, and when the play sink is ended

captureSTWSinkCallback

STWAudioSinkCaptureCallback is a block of code which will be invoked when the capture sink is ready and there is a valid data, and when the capture sink is ended


@ExperimentalCoroutinesApi
fun acceptCall(context: Context, call: STWVCall): Flow<STWAudioSink>

Call this method to accept a new PTT call.

Note : the audio sink feature will be enabled automatically for this method

Return

Flow STWAudioSink : abstract class can be : STWAudioSinkCall : the call is started, it contain an instance of the call or the error if the start fail. STWAudioSinkCapture : when the capture is ready, has data and when it is ended(each state is identified by an event from AudioSinkEvent. STWAudioSinkPlay : when the capture is ready, has data and when it is ended(each state is identified by an event from AudioSinkEvent.

Parameters

context

Context the application context

call

STWVCall instance of the call