/** * Creates a TelURL based on given URI string. The '+' should * not be included in the phoneNumber string argument. If scheme is not present, it will be added. * * @param uri - the new string value of the phoneNumber. * @throws URISyntaxException if the URI string is malformed. */ public javax.sip.address.TelURL createTelURL(String uri) throws ParseException { if (uri == null) throw new NullPointerException("null url"); String telUrl = null; if(uri.startsWith("tel:")) { telUrl = uri; }else { telUrl = "tel:" + uri; } try { StringMsgParser smp = new StringMsgParser(); TelURLImpl timp = (TelURLImpl) smp.parseUrl(telUrl); return (TelURL) timp; } catch (ParseException ex) { throw new ParseException(ex.getMessage(), 0); } }