convertedRoute = "Internet: " + sipProvider.getNumber();
convertedRoute = sipProvider.toString();
    public String toCSV() {        SimpleDateFormat date = new SimpleDateFormat("dd.MM.yyyy"); //$NON-NLS-1$        SimpleDateFormat time = new SimpleDateFormat("HH:mm"); //$NON-NLS-1$        String outString = ""; //$NON-NLS-1$        // type        switch (calltype.toInt()) {        case 1: {            outString = "\"Incoming\""; //$NON-NLS-1$            break;        }        case 2: {            outString = "\"Missed\""; //$NON-NLS-1$            break;        }        case 3: {            outString = "\"Outgoing\""; //$NON-NLS-1$            break;        }        }        // date        outString = outString.concat(";\"" + date.format(calldate) + "\""); //$NON-NLS-1$,  //$NON-NLS-2$                // time        outString = outString.concat(";\"" + time.format(calldate) + "\""); //$NON-NLS-1$,  //$NON-NLS-2$        // number        if (number == null)            outString = outString.concat(";\"\""); //$NON-NLS-1$        else            outString = outString.concat(";\"" + number + "\""); //$NON-NLS-1$,  //$NON-NLS-2$        // route        if (route == null)            outString = outString.concat(";\"\""); //$NON-NLS-1$        else {            //String sipRoute = ""; //$NON-NLS-1$            String convertedRoute = route;        	if(route.startsWith("SIP")){        			Enumeration en = jfritz.getSIPProviderTableModel()        			.getProviderList().elements();        		while (en.hasMoreElements()) {        			SipProvider sipProvider = (SipProvider) en.nextElement();        			if (route.substring(3).equals(String.valueOf(sipProvider.getProviderID()))) {        				convertedRoute = "Internet: " + sipProvider.getNumber();        				break;        			}        		}            }                        /* This is the old format            if (route.startsWith("SIP")) { //$NON-NLS-1$                Enumeration en = jfritz.getSIPProviderTableModel()                        .getProviderList().elements();                while (en.hasMoreElements()) {                    SipProvider sipProvider = (SipProvider) en.nextElement();                    if (sipProvider.getProviderID() == Integer.parseInt(route                            .substring(3))) {                        sipRoute = sipProvider.toString();                    }                }            }            if (sipRoute.equals("")) { //$NON-NLS-1$                outString = outString.concat(";\"" + route + "\""); //$NON-NLS-1$,  //$NON-NLS-2$            } else {                outString = outString.concat(";\"" + sipRoute + "\""); //$NON-NLS-1$,  //$NON-NLS-2$            }*/        	        	outString = outString.concat(";\"" + convertedRoute + "\"");        	        }        // port        if (port.equals("4")) //$NON-NLS-1$            outString = outString.concat(";\"ISDN\""); //$NON-NLS-1$        else if (port.equals("0")) //$NON-NLS-1$            outString = outString.concat(";\"FON1\""); //$NON-NLS-1$        else if (port.equals("1")) //$NON-NLS-1$            outString = outString.concat(";\"FON2\""); //$NON-NLS-1$        else if (port.equals("2")) //$NON-NLS-1$            outString = outString.concat(";\"FON3\""); //$NON-NLS-1$        else if (port.equals("32")) //$NON-NLS-1$            outString = outString.concat(";\"DATA\""); //$NON-NLS-1$        else if (port.equals("33")) //$NON-NLS-1$            outString = outString.concat(";\"DATA\""); //$NON-NLS-1$        else if (port.equals("34")) //$NON-NLS-1$            outString = outString.concat(";\"DATA\""); //$NON-NLS-1$        else if (port.equals("35")) //$NON-NLS-1$            outString = outString.concat(";\"DATA\""); //$NON-NLS-1$        else if (port.equals("36")) //$NON-NLS-1$            outString = outString.concat(";\"DATA\""); //$NON-NLS-1$        else if (port.equals("")) //$NON-NLS-1$            outString = outString.concat(";\"\""); //$NON-NLS-1$        else            outString = outString.concat(";\"" + port + "\""); //$NON-NLS-1$,  //$NON-NLS-2$        // duration        outString = outString.concat(";\"" + duration + "\""); //$NON-NLS-1$, //$NON-NLS-2$        // address        if (getPerson() != null) {            outString = outString.concat(";\"" + getPerson().getFullname() //$NON-NLS-1$                    + "\""); //$NON-NLS-1$            outString = outString                    .concat(";\"" + getPerson().getStreet() + "\""); //$NON-NLS-1$, //$NON-NLS-2$            if (getPerson().getPostalCode().equals("")) { //$NON-NLS-1$                outString = outString.concat(";\"" + getPerson().getCity() //$NON-NLS-1$                        + "\""); // city might be "" //$NON-NLS-1$            } else if (getPerson().getCity().equals("")) { //$NON-NLS-1$                outString = outString.concat(";\"" //$NON-NLS-1$                        + getPerson().getPostalCode() + "\""); //$NON-NLS-1$                 // postCode might be ""            } else { // postCode AND city != ""                outString = outString.concat(";\"" //$NON-NLS-1$                        + getPerson().getPostalCode() + " " //$NON-NLS-1$                        + getPerson().getCity() + "\""); //$NON-NLS-1$            }        } else            outString = outString.concat(";\"\";\"\";\"\""); //$NON-NLS-1$        // CallByCall        if (number != null && number.hasCallByCall()) {            outString = outString.concat(";\"" + number.getCallByCall() + "\""); //$NON-NLS-1$,  //$NON-NLS-2$        } else {            outString = outString.concat(";\"\""); //$NON-NLS-1$        }        // comment        outString = outString.concat(";\"" + comment + "\""); //$NON-NLS-1$,  //$NON-NLS-2$        return outString;    }