diff --git a/src/gov/nist/javax/sip/address/AddressFactoryImpl.java b/src/gov/nist/javax/sip/address/AddressFactoryImpl.java index c28addc95..61f40e892 100755 --- a/src/gov/nist/javax/sip/address/AddressFactoryImpl.java +++ b/src/gov/nist/javax/sip/address/AddressFactoryImpl.java @@ -158,10 +158,10 @@ public javax.sip.address.SipURI createSipURI(String user, String host) throws Pa uriString.append("@"); } - //if host is an IPv6 string we should enclose it in sq brackets + //if host is an IPv6 string we should enclose it in sq brackets and remove the scope identifier if (host.indexOf(':') != host.lastIndexOf(':') && host.trim().charAt(0) != '[') - host = '[' + host + ']'; + host = '[' + host.split("%")[0] + ']'; uriString.append(host);