sendSelectCallAnswer method

Future<String?> sendSelectCallAnswer(
  1. Room room,
  2. String callId,
  3. String party_id,
  4. String selected_party_id, {
  5. String version = voipProtoVersion,
  6. String? txid,
})

The calling party sends the party_id of the first selected answer.

Usually after receiving the first answer sdp in the client.onCallAnswer event, save the party_id, and then send CallSelectAnswer to others peers that the call has been picked up.

callId is a unique identifier for the call. version is the version of the VoIP specification this message adheres to. This specification is version 1. party_id The party ID for call, Can be set to client.deviceId. selected_party_id The party ID for the selected answer.

Implementation

Future<String?> sendSelectCallAnswer(
    Room room, String callId, String party_id, String selected_party_id,
    {String version = voipProtoVersion, String? txid}) async {
  final content = {
    'call_id': callId,
    'party_id': party_id,
    if (groupCallId != null) 'conf_id': groupCallId!,
    'version': version,
    'selected_party_id': selected_party_id,
  };

  return await _sendContent(
    room,
    isGroupCall
        ? EventTypes.GroupCallMemberSelectAnswer
        : EventTypes.CallSelectAnswer,
    content,
    txid: txid,
  );
}