henningw left a comment (kamailio/kamailio#4336)
If it's NOT a URN scheme, then '@' is an invalid charachter in host part and should error out. If it is a URN scheme, '@' is just another character in the host name and it's valid.
I haven't looked at the code, but from your comments above I guess that the URN value is stored in the host field of the URI structure? Would it be a case where the part after the `@` should be actually used as a host/domain (ie., the urn with the role of the username, and the value after `@` as domain/ip address)?
I don't work daily with URNs, but I think according to their definition there is no concept of a host name in it. Its basically a character for the purposes of the URN. There are other standards which are using URNs (e.g. Canonical Text Services) which uses it or adressing of sub-elements inside a specific content. The parser is taking some shortcuts, it would be probably better if it would be separate from the URI/URL part. Its also probably does not fully support the mentioned RFC.