Class Origin
Class for processing the Origin "o=" SDP line. See Section 5.2 of RFC 4566.
Inherited Members
Namespace: SipLib.Sdp
Assembly: SipLib.dll
Syntax
public class Origin
Constructors
| Edit this page View SourceOrigin(string, IPAddress)
Constructs a new Origin object from parameters provided by the caller.
Declaration
public Origin(string strUserName, IPAddress Addr)
Parameters
| Type | Name | Description |
|---|---|---|
| string | strUserName | Display version of the user name. |
| IPAddress | Addr | IP address or domain name of the user's position |
Fields
| Edit this page View SourceAddress
IP address. May be an IPv4, an IPv6 address or a fully qualified domain name.
Declaration
public string? Address
Field Value
| Type | Description |
|---|---|
| string |
AddressType
Address type field. Should be "IP4" or "IP6".
Declaration
public string AddressType
Field Value
| Type | Description |
|---|---|
| string |
NetworkType
Network Type field. Example: "IN" for Internet.
Declaration
public string NetworkType
Field Value
| Type | Description |
|---|---|
| string |
SessionId
Session ID field.
Declaration
public string SessionId
Field Value
| Type | Description |
|---|---|
| string |
UserName
User name field.
Declaration
public string UserName
Field Value
| Type | Description |
|---|---|
| string |
Version
Version field.
Declaration
public long Version
Field Value
| Type | Description |
|---|---|
| long |
Properties
| Edit this page View SourceVersionNumber
Gets or sets the version number in the SDP Origin as an integer.
Declaration
public long VersionNumber { get; set; }
Property Value
| Type | Description |
|---|---|
| long |
Methods
| Edit this page View SourceParseOrigin(string)
Constructs a new Origin object from a string. Use this constructor for parsing the origin string received in the SDP contents of an SIP message.
Declaration
public static Origin ParseOrigin(string strOrigin)
Parameters
| Type | Name | Description |
|---|---|---|
| string | strOrigin | The format of this string is: "UserName SessionId Version NetworkType AddressType Address". |
Returns
| Type | Description |
|---|---|
| Origin | Returns a new Origin object. |
ToString()
Returns the fully formatted Origin string for a SDP message block. The format is : o=Origin where Origin is the contains each parameter separated by a space.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string | Returns a full origin line. The format is: o=UserName, SessionId, Version, NetworkType, AdddressType Address\r\n |