Disclaimer: This repository is a git-svn mirror of the project found at http://java.net/projects/jsip whose original repository is developed collaboratively by the Advanced Networking Technologies Division at the National Institute of Standards and Technology (NIST) - an agency of the United States Department of Commerce and by a community of individual and enterprise contributors. TeleStax, Inc. will perform some productization work, new features experimentation branches, etc for its TelScale jSIP product that doesn't concern the community from the main repository hence this git repository.
And JSR 289 (section 4.2.1) says:
"Likewise, string values passed to setters for various SIP/SIPS URI
components may contain reserved or excluded characters that need
escaping before being used. The container is responsible for escaping
those values as necessary."
But when we run the following code:
SipURI uri = (SipURI)sipFactory.createURI("sip:alice@ex.com");
uri.setHeader("email", "alice@priv.com");
mLogger.debug("4) uri="+uri);
it prints:
4) uri=sip:alice@ex.com?email=alice@priv.com
The correct result would have been:
uri=sip:alice@ex.com?email=alice%40priv.com
And JSR 289 (section 4.2.1) says: "Likewise, string values passed to setters for various SIP/SIPS URI components may contain reserved or excluded characters that need escaping before being used. The container is responsible for escaping those values as necessary."
But when we run the following code:
SipURI uri = (SipURI)sipFactory.createURI("sip:alice@ex.com"); uri.setHeader("email", "alice@priv.com"); mLogger.debug("4) uri="+uri);
it prints:
4) uri=sip:alice@ex.com?email=alice@priv.com
The correct result would have been: uri=sip:alice@ex.com?email=alice%40priv.com