sendHangupCall method
This event is sent by the callee when they wish to answer the call.
callId
The ID of the call this event relates to.
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.
Implementation
Future<String?> sendHangupCall(
Room room, String callId, String party_id, String? hangupCause,
{String version = voipProtoVersion, String? txid}) async {
txid ??= 'txid${DateTime.now().millisecondsSinceEpoch}';
final content = {
'call_id': callId,
'party_id': party_id,
if (groupCallId != null) 'conf_id': groupCallId,
'version': version,
if (hangupCause != null) 'reason': hangupCause,
};
return await _sendContent(
room,
EventTypes.CallHangup,
content,
txid: txid,
);
}