sendDtmf method

Future<void> sendDtmf(
  1. String tones, [
  2. int durationMs = 200,
  3. int intertoneGapMs = 50,
  4. int method = PjsipConnectFlutter.kDtmfMethodRtp,
])

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!);
  }
}