jain.protocol.ip.sip.header
Class CallIdHeader

java.lang.Object
  |
  +--jain.protocol.ip.sip.header.Header
        |
        +--jain.protocol.ip.sip.header.GeneralHeader
              |
              +--jain.protocol.ip.sip.header.CallIdHeader

public final class CallIdHeader
extends GeneralHeader

This class represents the Call-ID general-header. CallIdHeader uniquely identifies a particular invitation or all registrations of a particular client. Note that a single multimedia conference can give rise to several calls with different Call-IDs, e.g., if a user invites a single individual several times to the same (long-running) conference.

For an InviteMessage, a callee user agent server should not alert the user if the user has responded previously to the Call-ID in the InviteMessage. If the user is already a member of the conference and the conference parameters contained in the session description have not changed, a callee user agent server may silently accept the call, regardless of the Call-ID. An invitation for an existing Call-ID or session can change the parameters of the conference. A client application MAY decide to simply indicate to the user that the conference parameters have been changed and accept the invitation automatically or it may require user confirmation.

A user may be invited to the same conference or call using several different CallIdHeaders. If desired, the client may use identifiers within the session description to detect this duplication. For example, SDP contains a session id and version number in the origin (o) field.

The RegisterMessage and OptionsMessage use the CallIdHeader to unambiguously match requests and responses. All RegisterMessages issued by a single client should use the same CallIdHeader, at least within the same boot cycle.

The host should be a globally routable InetAddress. If this is the case, the localId should be an identifier that is unique within the host. If however, host is not globally routable (such as a net 10 address), the localId must be globally unique.

Version:
0.6

Field Summary
static java.lang.String token
          Token of CallIdHeader
 
Fields inherited from class jain.protocol.ip.sip.header.Header
ENTITY_HEADER, GENERAL_HEADER, REQUEST_HEADER, RESPONSE_HEADER
 
Constructor Summary
CallIdHeader(java.lang.String localId, java.net.InetAddress host)
          Creates a CallIdHeader based on given local-id and host
 
Method Summary
 java.lang.Object clone()
          Creates and returns a copy of CallIdHeader
 boolean equals(CallIdHeader callIdHeader)
          Indicates whether some other CallIdHeader is "equal to" this one
 java.net.InetAddress getHost()
          Gets host of CallIdHeader
 java.lang.String getLocalId()
          Gets local-id of CallIdHeader
 java.lang.String getValue()
          Gets value of CallIdHeader
 void setHost(java.net.InetAddress host)
          Sets host of CallIdHeader
 void setLocalId(java.lang.String localId)
          Sets local-id of CallIdHeader
 
Methods inherited from class jain.protocol.ip.sip.header.Header
equals, getHeaderType, getToken, setValue, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

token

public static final java.lang.String token
Token of CallIdHeader
Constructor Detail

CallIdHeader

public CallIdHeader(java.lang.String localId,
                    java.net.InetAddress host)
             throws java.lang.IllegalArgumentException
Creates a CallIdHeader based on given local-id and host
Parameters:
localId - local-id
host - host
Throws:
java.lang.IllegalArgumentException - if localId is null or zero-length, or if host is null
Method Detail

getLocalId

public java.lang.String getLocalId()
Gets local-id of CallIdHeader
Returns:
local-id of CallIdHeader

setLocalId

public void setLocalId(java.lang.String localId)
                throws java.lang.IllegalArgumentException
Sets local-id of CallIdHeader
Parameters:
localId - local-id
Throws:
java.lang.IllegalArgumentException - if localId is null or zero-length

getHost

public java.net.InetAddress getHost()
Gets host of CallIdHeader
Returns:
host of CallIdHeader

setHost

public void setHost(java.net.InetAddress host)
             throws java.lang.IllegalArgumentException
Sets host of CallIdHeader
Parameters:
host - host
Throws:
java.lang.IllegalArgumentException - if host is null

getValue

public java.lang.String getValue()
Gets value of CallIdHeader
Overrides:
getValue in class Header
Returns:
value of CallIdHeader

clone

public java.lang.Object clone()
Creates and returns a copy of CallIdHeader
Overrides:
clone in class Header
Returns:
copy of CallIdHeader

equals

public boolean equals(CallIdHeader callIdHeader)
Indicates whether some other CallIdHeader is "equal to" this one
Parameters:
callIdHeader - the CallIdHeader with which to compare


If you have any comments or queries, please mail them to JAIN-SIP-interest@sun.com


Copyright - 2000 Sun Microsystems