sendInfo method

Future<void> sendInfo(
  1. String mimeType,
  2. String body,
  3. Map<String, String>? headers
)

Send INFO message within the call.

INFO message will be sent, if the call is establishing or established.

mimeType - MIME type of info

body - Custom string data

headers - Optional SIP headers

Implementation

Future<void> sendInfo(
  String mimeType,
  String body,
  Map<String, String>? headers,
) async {
  try {
    await _channel
        .invokeMethod<void>('Call.sendInfoForCall', <String, dynamic>{
      'callId': _callId,
      'mimetype': mimeType,
      'body': body,
      'headers': headers,
    });
  } on PlatformException catch (e) {
    throw VIException(e.code, e.message);
  }
}