acceptCall method
void
acceptCall(})
Accepts the incoming call specified via the invite
parameter, sending
your local specified callerName
, callerNumber
and clientState
Implementation
void acceptCall(IncomingInviteParams invite, String callerName,
String callerNumber, String clientState,
{Map<String, String> customHeaders = const {}}) {
callId = invite.callID;
sessionCallerName = callerName;
sessionCallerNumber = callerNumber;
sessionDestinationNumber = invite.callerIdName ?? "Unknown Caller";
sessionClientState = clientState;
var destinationNum = invite.callerIdNumber;
peerConnection = Peer(_txSocket);
peerConnection?.accept(callerName, callerNumber, destinationNum!,
clientState, callId!, invite, customHeaders);
stopAudio();
}