JSIP API v1.2
November 2006

javax.sip.address
Interface TelURL

All Superinterfaces:
java.lang.Cloneable, Parameters, java.io.Serializable, URI

public interface TelURL
extends URI, Parameters

This class represents Tel URLs, which are used for addressing. The Tel URL starts with the scheme tel:. This tells the local entity that what follows is a URL that should be parsed as described in RFC2806. After that, the URL contains the phone number of the remote entity.

Within a SIP Message, TelURLs can be used to indicate the source and intended destination of a Request, redirection addresses and the current destination of a Request. All these Headers may contain TelURLs.

The TelURL interface extends the generic URI interface and provides additional convenience methods for the following components of a TelURL address, above the generic URI class:

See RFC2806 for more information on the use of TelURL's.

Author:
BEA Systems, NIST

Method Summary
 java.lang.String getIsdnSubAddress()
          Returns the value of the isdnSubAddress parameter, or null if it is not set.
 java.lang.String getPhoneContext()
          Returns the value of the phoneContext parameter, or null if it is not set.
 java.lang.String getPhoneNumber()
          Returns the value of the phoneNumber parameter.
 java.lang.String getPostDial()
          Returns the value of the postDial parameter, or null if it is not set.
 boolean isGlobal()
          Returns true if this TelURL is global i.e. if the TelURI has a global phone user.
 void setGlobal(boolean global)
          Sets phone user of this TelURL to be either global or local.
 void setIsdnSubAddress(java.lang.String isdnSubAddress)
          Sets ISDN subaddress of this TelURL.
 void setPhoneContext(java.lang.String phoneContext)
          Sets the phone context of this TelURL.
 void setPhoneNumber(java.lang.String phoneNumber)
          Sets phone number of this TelURL.
 void setPostDial(java.lang.String postDial)
          Sets post dial of this TelURL.
 java.lang.String toString()
          This method returns the URI as a string.
 
Methods inherited from interface javax.sip.address.URI
clone, getScheme, isSipURI
 
Methods inherited from interface javax.sip.header.Parameters
getParameter, getParameterNames, removeParameter, setParameter
 

Method Detail

isGlobal

boolean isGlobal()
Returns true if this TelURL is global i.e. if the TelURI has a global phone user.

Returns:
true if this TelURL represents a global phone user, and false otherwise.

setGlobal

void setGlobal(boolean global)
Sets phone user of this TelURL to be either global or local. The default value is false, hence the TelURL is defaulted to local.

Parameters:
global - - the boolean value indicating if the TelURL has a global phone user.

setPostDial

void setPostDial(java.lang.String postDial)
                 throws java.text.ParseException
Sets post dial of this TelURL. The post-dial sequence describes what and when the local entity should send to the phone line.

Parameters:
postDial - - new value of the postDial parameter
Throws:
java.text.ParseException - which signals that an error has been reached unexpectedly while parsing the postDial value.

getPostDial

java.lang.String getPostDial()
Returns the value of the postDial parameter, or null if it is not set.

Returns:
the value of the postDial parameter

setPhoneNumber

void setPhoneNumber(java.lang.String phoneNumber)
                    throws java.text.ParseException
Sets phone number of this TelURL. The phone number may either be local or global determined by the isGlobal method in this interface. The phoneNumber argument should not contain the "+" associated with telephone numbers.

Parameters:
phoneNumber - - new value of the phoneNumber parameter
Throws:
java.text.ParseException - which signals that an error has been reached unexpectedly while parsing the phoneNumber value.

getPhoneNumber

java.lang.String getPhoneNumber()
Returns the value of the phoneNumber parameter. This method will not return the "+" associated with telephone numbers.

Returns:
the value of the phoneNumber parameter

setIsdnSubAddress

void setIsdnSubAddress(java.lang.String isdnSubAddress)
                       throws java.text.ParseException
Sets ISDN subaddress of this TelURL. If a subaddress is present, it is appended to the phone number after ";isub=".

Parameters:
isdnSubAddress - - new value of the isdnSubAddress parameter
Throws:
java.text.ParseException - which signals that an error has been reached unexpectedly while parsing the isdnSubAddress value.

getIsdnSubAddress

java.lang.String getIsdnSubAddress()
Returns the value of the isdnSubAddress parameter, or null if it is not set.

Returns:
the value of the isdnSubAddress parameter

setPhoneContext

void setPhoneContext(java.lang.String phoneContext)
                     throws java.text.ParseException
Sets the phone context of this TelURL.

Parameters:
phoneContext - - new value of the phoneContext parameter
Throws:
java.text.ParseException - which signals that an error has been reached unexpectedly while parsing the phoneContext value.
Since:
v1.2

getPhoneContext

java.lang.String getPhoneContext()
Returns the value of the phoneContext parameter, or null if it is not set.

Returns:
the value of the phoneContext parameter
Since:
v1.2

toString

java.lang.String toString()
This method returns the URI as a string.

Specified by:
toString in interface URI
Overrides:
toString in class java.lang.Object
Returns:
String The stringified version of the URI

JSIP API v1.2
November 2006

If you have any comments, please mail them to JAIN-SIP-INTEREST@java.sun.com after subscribing at http://archives.java.sun.com
Copyright - 2006 BEA Systems and Sun Microsystems