-
Notifications
You must be signed in to change notification settings - Fork 162
Description
Description:
When creating SIP URIs containing IPv6 link-local addresses with zone identifiers, also known as scope identifiers, (e.g., fe80::abcd%eth0), the JAIN-SIP library throws a ParseException with the message "Illegal Host name". This occurs because the library incorrectly rejects valid IPv6 addresses containing the % character used for zone/scope identification.
The % character is illegal in a hostname therefore it would be safe to use it as a delimiter for trimming off the zone ID.
Reproduction Steps:
Create a SIP URI with an IPv6 link-local address containing a zone identifier:
String uri = "sip:user@[fe80::abcd:1234:5678:9abc%eth0]";
SipFactory.getInstance().createSipUri(uri); // Throws ParseException
Expected Behavior:
The library should either:
- Accept IPv6 addresses with zone identifiers by stripping them for URI purposes (as per RFC 3986)
- Provide a method to handle zone identifiers appropriately
- Document the limitation and provide workarounds
See PR #205 for my proposed fix, which is based on the first suggestion
Impact:
Breaks IPv6 link-local communication in SIP applications
Forces developers to implement workarounds outside the library
Hinders IPv6 adoption in VoIP systems