Debug.msg("Syslog!!!!");
	public void startSyslogListener() {		Pattern p;		Matcher m;		String data;		int port = 4711;		byte[] log_buffer = new byte[2048];		DatagramPacket packet = new DatagramPacket(log_buffer,				log_buffer.length);		try {			Telnet telnet = new Telnet();			telnet.connect();			data = telnet.sendCommand("ps -A | grep syslog");			p = Pattern.compile(PATTERN_SYSLOG_RUNNING);			m = p.matcher(data);			if (m.find()) {				Debug.msg("Syslog IS RUNNING PROPERLY on FritzBox");			} else {				Debug						.msg("Syslog ISN'T RUNNING PROPERLY on FritzBox, RESTARTING SYSLOG");				restartSyslogOnFritzBox(telnet, JFritz.getProperty(						"option.syslogclientip", "192.168.178.21"));			}			data = telnet.readUntil("# ");			data = telnet.sendCommand("ps -A | grep telefon");			p = Pattern.compile(PATTERN_TELEFON_RUNNING);			m = p.matcher(data);			if (m.find()) {				Debug						.msg("Telefon ISN'T RUNNING PROPERLY on FritzBox, RESTARTING TELEFON");				restartTelefonOnFritzBox(telnet);				JFritz.setProperty("telefond.laststarted", "syslogMonitor");			} else {				if (!JFritz.getProperty("telefond.laststarted", "").equals(						"syslogMonitor")) {					Debug							.msg("Telefon ISN'T RUNNING PROPERLY on FritzBox, RESTARTING TELEFON");					restartTelefonOnFritzBox(telnet);					JFritz.setProperty("telefond.laststarted", "syslogMonitor");				} else {					Debug.msg("Telefon IS RUNNING PROPERLY on FritzBox");				}			}			telnet.disconnect();			socket = new DatagramSocket(port);			Debug.msg("Starting SyslogListener on port " + port);			// DatagramSocket passthroughSocket = new DatagramSocket(SYSLOG_PORT);			while (!isInterrupted()) {				Debug.msg("Syslog!!!!");				socket.receive(packet);				String msg = new String(log_buffer, 0, packet.getLength(),						"UTF-8");				Debug.msg("Get Syslogmessage: " + msg);/*				if (JFritzUtils.parseBoolean(JFritz.getProperty(						"option.syslogpassthrough", "false"))) {					passthroughSocket.send(packet);					// Debug.msg("SendSyslogmessage: "+ msg); }				}*/				p = Pattern.compile(PATTERN_TELEFON_INCOMING);				m = p.matcher(msg);				if (m.find()) {					String id = m.group(1);					String caller = m.group(2);					String called = m.group(3);					Debug.msg("NEW INCOMING CALL " + id + ": " + caller							+ " -> " + called);					// POPUP Messages to JFritz					JFritz.callInMsg(caller, called);				}				p = Pattern.compile(PATTERN_TELEFON_OUTGOING);				m = p.matcher(msg);				if (m.find()) {					String called = m.group(2);					if (!called.equals("")) {						Debug.msg("NEW OUTGOING CALL: " + called);						//						JFritz.callOutMsg(called);					}				}			}		} catch (SocketException e) {		} catch (IOException e) {		}	}