olos_sdk 1.0.593
olos_sdk: ^1.0.593 copied to clipboard
An interface between interfaces and the Olos system
example/olos_sdk_example.dart
import 'dart:developer';
import 'package:olos_sdk/main.dart';
/// This is the main function of the Olos SDK example.
/// It initializes the Olos SDK with the provided configuration,
/// creates an instance of OlosAgentWS, and performs agent authentication.
void main() {
// The server URL
String server = 'http://10.15.10.38';
// Create an instance of Olos
Olos olos = Olos();
// Configure the Olos SDK
OlosConfig olosConfig = OlosConfig(
addrs: {
"wsAgentCmd": '$server/WebAPIAgentControl_Token/AgentCommand/',
"wsAgentEvt": '$server/WebAPIAgentControl_Token/AgentEvent/',
"WsAgentCloud": '$server/WebAPIAgentControl_Token/CloudAgent/',
"wsMailingCmd": '$server/WebAPIMailingControl_Token/MailingCommand/',
"wsAgentConfig": '$server/WebAPIConfiguration_Token/AgentConfig/',
"wsVoiceSupport":
'$server/WsVoiceSupportIntegration/WsVoiceSupportIntegration.asmx',
"WebAPIAgentControl": '$server/WebAPIAgentControl_Token/',
"wsSoftphone": '$server/WebAPISoftphone_Token/Softphone/',
"wsMcx": '$server/WsMcx_Token/wsmcx/Mcx/',
"wsRecordingRetrieve":
'$server/WebApiRecordingRetrieve_Token/RecordTextComm/',
},
user: 'agente1',
password: 'olos',
clientID: '9f57f547a8ea4ecfbd2525a0cccb0b58',
clientSecret: 'x_wor5KTOPTIuFQBywo5TWFQfrN5FoCFcqn_eo',
logs: true,
);
olos.createOlos(olosConfig);
OlosAgentWS ws = OlosAgentWS();
ws.agentAuthentication('agente1', 'olos', displayAgentID);
}
void displayAgentID(String agentID) => log('Agent ID: $agentID');