public interface TelURI extends URI
Modifier and Type | Interface and Description |
---|---|
static class |
TelURI.Builder |
Modifier and Type | Method and Description |
---|---|
static TelURI |
frame(Buffer buffer)
Frame a TEL Uri, which according to RFC 3966 has the following syntax:
|
Buffer |
getParameter(Buffer name)
Get the value of the named parameter.
|
Buffer |
getParameter(String name)
Same as
getParameter(Buffer) . |
Buffer |
getPhoneNumber()
Returns the phone number, without the '+' in case of global number
|
boolean |
isGlobal()
Specifies whether the telephone number is global or not
|
default boolean |
isTelURI()
Check whether this
URI is a "tel" URI. |
default TelURI |
toTelURI() |
static TelURI.Builder |
withPhoneNumber(Buffer phoneNumber) |
static TelURI.Builder |
withPhoneNumber(String phoneNumber) |
boolean isGlobal()
Buffer getPhoneNumber()
default boolean isTelURI()
URI
URI
is a "tel" URI.Buffer getParameter(Buffer name) throws SipParseException, IllegalArgumentException
Buffer
, which can be checked with Buffer.isEmpty()
or
Buffer.capacity()
, which will return zero. As with any empty
Buffer
, if you do Buffer.toString()
you will be getting
an empty String
back, which would be yet another way to check for
a flag parameter.name
- the name of the parameter we are looking for.SipParseException
- in case anything goes wrong while extracting the parameter.IllegalArgumentException
- in case the name is null.Buffer getParameter(String name) throws SipParseException, IllegalArgumentException
getParameter(Buffer)
.name
- SipParseException
- in case anything goes wrong while extracting the parameter.IllegalArgumentException
- in case the name is null.static TelURI frame(Buffer buffer) throws SipParseException, IndexOutOfBoundsException, IOException
telephone-uri = "tel:" telephone-subscriber telephone-subscriber = global-number / local-number global-number = global-number-digits *par local-number = local-number-digits *par context *par par = parameter / extension / isdn-subaddress isdn-subaddress = ";isub=" 1*uric extension = ";ext=" 1*phonedigit context = ";phone-context=" descriptor descriptor = domainname / global-number-digits global-number-digits = "+" *phonedigit DIGIT *phonedigit local-number-digits = phonedigit-hex (HEXDIG / "*" / "#")*phonedigit-hex domainname = *( domainlabel "." ) toplabel [ "." ] domainlabel = alphanum / alphanum *( alphanum / "-" ) alphanum toplabel = ALPHA / ALPHA *( alphanum / "-" ) alphanum parameter = ";" pname ["=" pvalue ] pname = 1*( alphanum / "-" ) pvalue = 1*paramchar paramchar = param-unreserved / unreserved / pct-encoded unreserved = alphanum / mark mark = "-" / "_" / "." / "!" / "~" / "*" / "'" / "(" / ")" pct-encoded = "%" HEXDIG HEXDIG param-unreserved = "[" / "]" / "/" / ":" / "&" / "+" / "$" phonedigit = DIGIT / [ visual-separator ] phonedigit-hex = HEXDIG / "*" / "#" / [ visual-separator ] visual-separator = "-" / "." / "(" / ")" alphanum = ALPHA / DIGIT reserved = ";" / "/" / "?" / ":" / "@" / "&" / "=" / "+" / "$" / "," uric = reserved / unreserved / pct-encoded
frame
in interface URI
buffer
- SipParseException
IndexOutOfBoundsException
IOException
static TelURI.Builder withPhoneNumber(Buffer phoneNumber)
static TelURI.Builder withPhoneNumber(String phoneNumber)
Copyright © 2019. All Rights Reserved.