accept method
void
accept()
Implementation
void accept(
String callerName,
String callerNumber,
String destinationNumber,
String clientState,
String callId,
IncomingInviteParams invite,
Map<String, String> customHeaders,
bool isAttach,
) async {
final sessionId = _selfId;
final Session session = await _createSession(
null,
peerId: '0',
sessionId: sessionId,
callId: callId,
media: 'audio',
);
_sessions[sessionId] = session;
await session.peerConnection
?.setRemoteDescription(RTCSessionDescription(invite.sdp, 'offer'));
await _createAnswer(
session,
'audio',
callerName,
callerNumber,
destinationNumber,
clientState,
callId,
customHeaders,
isAttach,
);
onCallStateChange?.call(session, CallState.active);
}