xkaraman left a comment (kamailio/kamailio#4336)
Do I understand properly that here should be "if equal urn schema go to error"
if(scheme != URN_SCH) { \ goto error_bad_char; \ }
No.
If it's NOT a URN scheme, then '@' is not a valid charachter in host part.
If it is a URN scheme, '@' is just another character in the host name.