Class SIPFrag
Class for parsing or creating a SIPFRAG (SIP Fragment) body use in a NOTIFY request for a Refer subscription. See Section 2.4.5 of RFC 3515.
Inherited Members
Namespace: SipLib.Core
Assembly: SipLib.dll
Syntax
public class SIPFrag
Constructors
| Edit this page View SourceSIPFrag(SIPResponseStatusCodesEnum, string)
Constructor
Declaration
public SIPFrag(SIPResponseStatusCodesEnum status, string reasonPhrase)
Parameters
Type | Name | Description |
---|---|---|
SIPResponseStatusCodesEnum | status | Status enumeration value |
string | reasonPhrase | Reason phrase string. |
Properties
| Edit this page View SourceReasonPhrase
Gets or sets the reason phrase
Declaration
public string ReasonPhrase { get; set; }
Property Value
Type | Description |
---|---|
string |
Status
Gets or sets the Status field.
Declaration
public SIPResponseStatusCodesEnum Status { get; set; }
Property Value
Type | Description |
---|---|
SIPResponseStatusCodesEnum |
Methods
| Edit this page View SourceParseSIPFrag(string)
Parses a SIP fragment string and creates a new SIPFrag object.
Declaration
public static SIPFrag ParseSIPFrag(string sipfragString)
Parameters
Type | Name | Description |
---|---|---|
string | sipfragString | Input SIP fragment. The format of this string must be the same as the first line of a SIP response message. For example: SIP/2.0 200 Ok |
Returns
Type | Description |
---|---|
SIPFrag | Returns a new SIPFrag object if no errors occured. Returns a new SIPFrag object with a Status property equal to SIPResponseStatusCodesEnum.None if the input string is not valid. |
ToString()
Converts this object into a SIPFRAG string for inclusion in the body of a NOTIFY request for the "refer" subscribe/notify event package.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string | Returns a string value to put in the body of a NOTIFY body. |
Overrides
Exceptions
Type | Condition |
---|---|
ArgumentException | Thrown if the Status property or the ReasonPhrase property is not valid. |