Call class reference for the Telnyx Flutter Voice SDK. Represents an active audio or video call and exposes accept, decline, hold, mute, and DTMF methods.
In order to end a call, we can get a stored instance of Call and call the .endCall(callID) method. To decline an incoming call we first create the call with the .createCall() method and then call the .endCall(callID) method:
if (_ongoingCall) { _telnyxClient.call.endCall(_telnyxClient.call.callId); } else { _telnyxClient.createCall().endCall(_incomingInvite?.callID); }
In order to send a DTMF message while on a call you can call the .dtmf(callID, tone), method where tone is a String value of the character you would like pressed: