sendDtmf method

Future<int> sendDtmf({
  1. required int sessionId,
  2. required int dtmf,
  3. required bool playDtmfTone,
  4. int dtmfMethod = 0,
  5. int dtmfDuration = 160,
})

Sends a DTMF (Dual-Tone Multi-Frequency) tone during a call.

Parameters:

  • sessionId: The session ID of the active call
  • dtmf: The DTMF digit to send (0-9 for digits, 10 for *, 11 for #)
  • playDtmfTone: Whether to play the tone locally
  • dtmfMethod: DTMF transmission method:
    • 0: RFC2833 (default, recommended)
    • 1: SIP INFO
    • 2: In-band audio
  • dtmfDuration: Duration of the tone in milliseconds (default: 160)

Returns 0 on success, negative error code on failure.

Implementation

Future<int> sendDtmf({
  required int sessionId,
  required int dtmf,
  required bool playDtmfTone,
  int dtmfMethod = 0,
  int dtmfDuration = 160,
}) async {
  throw UnimplementedError('sendDtmf has not been implemented.');
}