Line line = (Line) getLines().get(0);
Line line = getLines().get(0);
    public void restart() {        if (getLines().size() == 0) {            throw new RestartException("Restart command is sent to first line and "                    + "first phone line is not valid");        }        Line line = (Line) getLines().get(0);        LineInfo info = line.getLineInfo();        String password = info.getPassword();        byte[] resetPayload = new ResetPacket(password, getSerialNumber()).getResetMessage();        String event = "Content-Type: application/octet-stream\r\n" + "Event: sys-control\r\n";        getSipService().sendNotify(line.getUri(), info.getRegistrationServer(),                info.getRegistrationServerPort(), event, resetPayload);    }