sendDtmf method
Send DTMF (single tone or sequence of tones) to remote side of this call
Implementation
Future<void> sendDtmf(
String tones, [
int durationMs = 200,
int intertoneGapMs = 50,
int method = PjsipConnectFlutter.kDtmfMethodRtp,
]) async {
_logs?.print('Sending dtmf callId:$myCallId tone:$tones');
try {
await PjsipConnectFlutter().sendDtmf(
myCallId,
tones,
durationMs,
intertoneGapMs,
method,
);
} on PlatformException catch (err) {
_logs?.print(
'Can\'t send dtmf callId:$myCallId Err: ${err.code} ${err.message}',
);
return Future.error((err.message == null) ? err.code : err.message!);
}
}