acceptCall method
Accepts the incoming call specified via the invite
parameter, sending
your local specified callerName
, callerNumber
and clientState
@param invite The incoming invite parameters @param callerName The name of the caller @param callerNumber The number of the caller @param clientState Custom client state to pass with the call @param isAttach Whether this is an attach operation @param customHeaders Optional custom SIP headers @param debug Whether to enable call quality metrics (default: false)
Implementation
Call acceptCall(
IncomingInviteParams invite,
String callerName,
String callerNumber,
String clientState, {
bool isAttach = false,
Map<String, String> customHeaders = const {},
bool debug = false,
}) {
// Store the session information for later use
sessionCallerName = callerName;
sessionCallerNumber = callerNumber;
sessionDestinationNumber = invite.callerIdNumber ?? '';
sessionClientState = clientState;
this.customHeaders = Map.from(customHeaders);
return _txClient.acceptCall(
invite,
callerName,
callerNumber,
clientState,
customHeaders: customHeaders,
isAttach: isAttach,
debug: debug,
);
}