call_center_queue function

void call_center_queue(
  1. List<String> arguments
)

Implementation

void call_center_queue(List<String> arguments) async {
  var env = DotEnv(includePlatformEnvironment: true)..load();
  rtpIp = env['RTP_ADDRESS']!;
  port = int.parse(env['RTP_PORT']!);
  print("Listening on: $rtpIp:$port");

  String wsIp = env['WS_SERVER_ADDRESS']!;
  int wsPort = int.parse(env['WS_SERVER_PORT']!);
  String redisIp = env['REDIS_ADDRESS']!;
  int redisPort = int.parse(env['REDIS_PORT']!);
  String redisPassword = env['REDIS_PASSWORD']!;

  endpoint = env['PHONE_ENDPOINT']!;
  print("Endpoint: $endpoint");
  wsServer = WsServer(wsIp, wsPort, redisIp, redisPort, redisPassword);

  String voice_records = env['DASHBOARD_RECORDER_ENDPOINT']!;
  String cdr_records = env['DASHBOARD_CDR_ENDPOINT']!;

  dsbClient = DasboardClient(Uri.parse(voice_records), Uri.parse(cdr_records));

  //wsServer!.intialize();
  // wsSipServer proxy=wsSipServer("127.0.0.1",8082);
  // proxy.intialize();

  client.on("StasisStart", (event, incoming) {
    //print(event);
    stasisStart(event, incoming);
  });

  WebSocket ws = await client.connect();

  ws.listen((event) {
    var e = json.decode(event);
    //print(e['type']);
    client.emit(e);

    // Function? func = app[e['type']];
    // func!.call(e);
  });
}