dtmf method
Sends a DTMF message with the chosen tone
to the call
specified via the callID
Implementation
void dtmf(String? callID, String tone) {
var uuid = const Uuid().v4();
var dialogParams = DialogParams(
attach: false,
audio: true,
callID: callId,
callerIdName: sessionCallerName,
callerIdNumber: sessionCallerNumber,
clientState: sessionClientState,
destinationNumber: sessionDestinationNumber,
remoteCallerIdName: "",
screenShare: false,
useStereo: false,
userVariables: [],
video: false);
var infoParams =
InfoParams(dialogParams: dialogParams, dtmf: tone, sessid: sessid);
var dtmfMessageBody = DtmfInfoMessage(
id: uuid,
jsonrpc: JsonRPCConstant.jsonrpc,
method: SocketMethod.INFO,
params: infoParams);
String jsonDtmfMessage = jsonEncode(dtmfMessageBody);
txSocket.send(jsonDtmfMessage);
}