\begin{syntax}
SIP-URL	         & = & "sip:" [ userinfo "@" ] hostport\\
                 &   & url-parameters [ headers ]\\
userinfo         & = & [ user $|$ telephone-subscriber [ ":" password ]]\\
user             & = & *( unreserved $|$ escaped $|$ user-unreserved )\\
user-unreserved  & = & "\&" $|$ "=" $|$ "+" $|$ "\$" $|$ "," $|$ ";" $|$ "?" $|$ "/"\\
password         & = & *( unreserved $|$ escaped $|$ \\
                 &   & "\&" $|$ "=" $|$ "+" $|$ "\$" $|$ "," )\\
hostport         & = & host [ ":" port ]\\
host             & = & hostname $|$ IPv4address $|$ IPv6reference\\
hostname         & = & *( domainlabel "." ) toplabel [ "." ]\\
domainlabel      & = & alphanum\\
                 &$|$& alphanum *( alphanum $|$ "-" ) alphanum\\
toplabel         & = & alpha $|$ alpha *( alphanum $|$ "-" ) alphanum\\
IPv4address      & = & 1*3DIGIT "." 1*3DIGIT "." 1*3DIGIT "." 1*3DIGIT\\
IPv6reference    & = & "[" IPv6address "]"\\
IPv6address      & = & hexpart [ ":" IPv4address ]\\
hexpart          & = & hexseq $|$ hexseq "::" [ hexseq ] $|$ "::" [ hexseq ]\\
hexseq           & = & hex4 *( ":" hex4)\\
hex4             & = & 1*4HEX\\
port             & = & 1*DIGIT\\
url-parameters   & = & *( ";" url-parameter)\\
url-parameter    & = & transport-param $|$ user-param $|$ method-param\\
                 &$|$& ttl-param $|$ maddr-param $|$ other-param\\
transport-param  & = & "transport=" \\
                 &   & ( "udp" $|$ "tcp" $|$ "sctp" $|$ "tls" $|$ other-transport) \\
other-transport  & = & token\\
user-param       & = & "user=" ( "phone" $|$ "ip" $|$ other-user)\\
other-user       & = & token\\
method-param     & = & "method=" Method\\
ttl-param        & = & "ttl=" ttl\\
maddr-param      & = & "maddr=" host\\
other-param      & = & pname [ "=" pvalue ]\\
pname            & = & 1*paramchar\\
pvalue           & = & 1*paramchar\\
paramchar        & = & param-unreserved $|$ unreserved $|$ escaped\\
param-unreserved & = & "[" $|$ "]" $|$ "/" $|$ ":" $|$ "\&" $|$ "+" $|$ "\$"\\
headers          & = & "?" header *( "\&" header )\\ 
header           & = & hname "=" hvalue\\
hname            & = & 1*( hnv-unreserved $|$ unreserved $|$ escaped )\\
hvalue           & = & *( hnv-unreserved $|$ unreserved $|$ escaped )\\ 
hnv-unreserved   & = & "[" $|$ "]" $|$ "/" $|$ "?" $|$ ":" $|$ "+" $|$ "\$"\\
\end{syntax}
