Class SIPContactHeader
Class for building or parsing a SIP Contact header. See Section 20.10 and page 228 of RFC 3261.
Inherited Members
Namespace: SipLib.Core
Assembly: SipLib.dll
Syntax
public class SIPContactHeader
Remarks
The Contact header only has parameters, no headers. Parameters of from ...; name=value;name2=value2 Specific parameters: q, expires.
Constructors
| Edit this page View SourceSIPContactHeader(SIPUserField)
Constructor
Declaration
public SIPContactHeader(SIPUserField contactUserField)
Parameters
Type | Name | Description |
---|---|---|
SIPUserField | contactUserField | Input SIPUserField |
SIPContactHeader(string?, SIPURI)
Constructor
Declaration
public SIPContactHeader(string? contactName, SIPURI contactURI)
Parameters
Type | Name | Description |
---|---|---|
string | contactName | Name value for the Contact header value. Optional |
SIPURI | contactURI | Contact header URI |
Properties
| Edit this page View SourceContactName
Gets or sets the Contact name field
Declaration
public string? ContactName { get; set; }
Property Value
Type | Description |
---|---|
string |
ContactParameters
Gets or sets the Contact header URI parameters
Declaration
public SIPParameters ContactParameters { get; set; }
Property Value
Type | Description |
---|---|
SIPParameters |
ContactURI
Gets or sets the Contact URI field
Declaration
public SIPURI? ContactURI { get; set; }
Property Value
Type | Description |
---|---|
SIPURI |
Expires
Gets or sets the Expires field. A value of -1 indicates the header did not contain an expires parameter setting.
Declaration
public int Expires { get; set; }
Property Value
Type | Description |
---|---|
int |
Q
Gets or sets the Q value parameter
Declaration
public string? Q { get; set; }
Property Value
Type | Description |
---|---|
string |
Methods
| Edit this page View SourceAreEqual(SIPContactHeader, SIPContactHeader)
Compares two contact headers to determine contact address equality.
Declaration
public static bool AreEqual(SIPContactHeader contact1, SIPContactHeader contact2)
Parameters
Type | Name | Description |
---|---|---|
SIPContactHeader | contact1 | |
SIPContactHeader | contact2 |
Returns
Type | Description |
---|---|
bool | Returns true if the two SIPContact headers are equal |
CopyOf()
Returns a deep copy of this SIPContactHeader object.
Declaration
public SIPContactHeader CopyOf()
Returns
Type | Description |
---|---|
SIPContactHeader |
CreateSIPContactList(SIPURI)
Creates a new list of SIPContactHeader objects containing a single SIPContactHeader given a SIPURI object.
Declaration
public static List<SIPContactHeader> CreateSIPContactList(SIPURI sipURI)
Parameters
Type | Name | Description |
---|---|---|
SIPURI | sipURI | Input |
Returns
Type | Description |
---|---|
List<SIPContactHeader> | Returns a single SIPContactHeader in a list. |
ParseContactHeader(string)
Parsed a Contact header value. Throws a SIPValidationException if an error is detected.
Declaration
public static List<SIPContactHeader>? ParseContactHeader(string contactHeaderStr)
Parameters
Type | Name | Description |
---|---|---|
string | contactHeaderStr | Input Contact header value |
Returns
Type | Description |
---|---|
List<SIPContactHeader> | Returns a a list containg one or more SIPContactHeader objects |
ToString()
Converts the SIPContactHeader to a string
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string |