invite method
void
invite()
Implementation
void invite(
String callerName,
String callerNumber,
String destinationNumber,
String clientState,
String callId,
String telnyxSessionId,
Map<String, String> customHeaders,
) async {
final sessionId = _selfId;
final Session session = await _createSession(
null,
peerId: '0',
sessionId: sessionId,
callId: callId,
media: 'audio',
);
_sessions[sessionId] = session;
await _createOffer(
session,
'audio',
callerName,
callerNumber,
destinationNumber,
clientState,
callId,
telnyxSessionId,
customHeaders,
);
onCallStateChange?.call(session, CallState.newCall);
}