Show / Hide Table of Contents

Class SIPEndPoint

This class is a more specific version of the SIPURI class BUT is only concerned with the network and transport properties. It contains all the information needed to determine the remote end point to deliver a SIP request or response to.

This class must remain immutable otherwise the SIP stack can develop problems. SIP end points can get passed amongst different servers for logging and forwarding SIP messages and a modification of the end point by one server can result in a problem for a different server. Instead a new SIP end point should be created wherever a modification is required.

Inheritance
System.Object
SIPEndPoint
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: SIPSorcery.SIP
Assembly: SIPSorcery.dll
Syntax
public class SIPEndPoint

Constructors

| Improve this Doc View Source

SIPEndPoint(SIPProtocolsEnum, IPAddress, Int32)

Instantiates a new SIP end point from a network end point. Non specified properties will be set to their defaults.

Declaration
public SIPEndPoint(SIPProtocolsEnum protocol, IPAddress address, int port)
Parameters
Type Name Description
SIPProtocolsEnum protocol
System.Net.IPAddress address
System.Int32 port
| Improve this Doc View Source

SIPEndPoint(SIPProtocolsEnum, IPAddress, Int32, String, String)

Instantiates a new SIP end point.

Declaration
public SIPEndPoint(SIPProtocolsEnum protocol, IPAddress address, int port, string channelID, string connectionID)
Parameters
Type Name Description
SIPProtocolsEnum protocol

The SIP transport/application protocol used for the transmission.

System.Net.IPAddress address

The network address.

System.Int32 port

The network port.

System.String channelID

Optional. The unique ID of the channel that created the end point.

System.String connectionID

Optional. For connection oriented protocols the unique ID of the connection. For connectionless protocols should be set to null.

| Improve this Doc View Source

SIPEndPoint(SIPProtocolsEnum, IPEndPoint)

Declaration
public SIPEndPoint(SIPProtocolsEnum protocol, IPEndPoint endPoint)
Parameters
Type Name Description
SIPProtocolsEnum protocol
System.Net.IPEndPoint endPoint
| Improve this Doc View Source

SIPEndPoint(SIPProtocolsEnum, IPEndPoint, String, String)

Declaration
public SIPEndPoint(SIPProtocolsEnum protocol, IPEndPoint endPoint, string channelID, string connectionID)
Parameters
Type Name Description
SIPProtocolsEnum protocol
System.Net.IPEndPoint endPoint
System.String channelID
System.String connectionID
| Improve this Doc View Source

SIPEndPoint(SIPURI)

Declaration
public SIPEndPoint(SIPURI sipURI)
Parameters
Type Name Description
SIPURI sipURI
| Improve this Doc View Source

SIPEndPoint(IPEndPoint)

Instantiates a new SIP end point from a network end point. Non specified properties will be set to their defaults.

Declaration
public SIPEndPoint(IPEndPoint endPoint)
Parameters
Type Name Description
System.Net.IPEndPoint endPoint

Properties

| Improve this Doc View Source

Address

The network address for the SIP end point. IPv4 and IPv6 are supported.

Declaration
public IPAddress Address { get; }
Property Value
Type Description
System.Net.IPAddress
| Improve this Doc View Source

ChannelID

If set represents the SIP channel ID that this SIP end point was created from.

Declaration
public string ChannelID { get; set; }
Property Value
Type Description
System.String
| Improve this Doc View Source

ConnectionID

For connection oriented transport protocols such as TCP, TLS and WebSockets this ID can record the unique connection a SIP message was received on. This makes it possible to ensure responses or subsequent request can re-use the same connection.

Declaration
public string ConnectionID { get; set; }
Property Value
Type Description
System.String
| Improve this Doc View Source

Empty

Declaration
public static SIPEndPoint Empty { get; }
Property Value
Type Description
SIPEndPoint
| Improve this Doc View Source

Port

The network port for the SIP end point.

Declaration
public int Port { get; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

Protocol

The transport/application layer protocol the SIP end point is using.

Declaration
public SIPProtocolsEnum Protocol { get; }
Property Value
Type Description
SIPProtocolsEnum

Methods

| Improve this Doc View Source

AreEqual(SIPEndPoint, SIPEndPoint)

Declaration
public static bool AreEqual(SIPEndPoint endPoint1, SIPEndPoint endPoint2)
Parameters
Type Name Description
SIPEndPoint endPoint1
SIPEndPoint endPoint2
Returns
Type Description
System.Boolean
| Improve this Doc View Source

AreSocketsEqual(SIPEndPoint, SIPEndPoint)

Determines whether the socket destination for two different SIP end points are equal.

Declaration
public static bool AreSocketsEqual(SIPEndPoint endPoint1, SIPEndPoint endPoint2)
Parameters
Type Name Description
SIPEndPoint endPoint1

First end point to compare.

SIPEndPoint endPoint2

Second end point to compare.

Returns
Type Description
System.Boolean

True if the end points both resolve to the same protocol and IP end point.

| Improve this Doc View Source

CopyOf()

Declaration
public SIPEndPoint CopyOf()
Returns
Type Description
SIPEndPoint
| Improve this Doc View Source

Equals(Object)

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
System.Object obj
Returns
Type Description
System.Boolean
Overrides
System.Object.Equals(System.Object)
| Improve this Doc View Source

GetHashCode()

Declaration
public override int GetHashCode()
Returns
Type Description
System.Int32
Overrides
System.Object.GetHashCode()
| Improve this Doc View Source

GetIPEndPoint(Boolean)

Get the IP end point from the SIP end point

Declaration
public IPEndPoint GetIPEndPoint(bool mapIpv4ToIpv6 = false)
Parameters
Type Name Description
System.Boolean mapIpv4ToIpv6

Set to true if a resultant IPv4 end point should be mapped to IPv6. This is required in some cases when using dual mode sockets. For example Mono requires that a destination IP end point for a dual mode socket is set as IPv6.

Returns
Type Description
System.Net.IPEndPoint

An IP end point.

| Improve this Doc View Source

IsSocketEqual(SIPEndPoint)

Declaration
public bool IsSocketEqual(SIPEndPoint endPoint)
Parameters
Type Name Description
SIPEndPoint endPoint
Returns
Type Description
System.Boolean
| Improve this Doc View Source

ParseSIPEndPoint(String)

Parses a SIP end point from either a serialised SIP end point string, format of: (udp|tcp|tls|ws|wss):(IPEndpoint)[;connid=abcd] or from a string that represents a SIP URI.

Declaration
public static SIPEndPoint ParseSIPEndPoint(string sipEndPointStr)
Parameters
Type Name Description
System.String sipEndPointStr

The string to parse to extract the SIP end point.

Returns
Type Description
SIPEndPoint

If successful a SIPEndPoint object or null otherwise.

| Improve this Doc View Source

ToString()

Declaration
public override string ToString()
Returns
Type Description
System.String
Overrides
System.Object.ToString()
| Improve this Doc View Source

TryParse(String)

Declaration
public static SIPEndPoint TryParse(string sipEndPointStr)
Parameters
Type Name Description
System.String sipEndPointStr
Returns
Type Description
SIPEndPoint

Operators

| Improve this Doc View Source

Equality(SIPEndPoint, SIPEndPoint)

Declaration
public static bool operator ==(SIPEndPoint endPoint1, SIPEndPoint endPoint2)
Parameters
Type Name Description
SIPEndPoint endPoint1
SIPEndPoint endPoint2
Returns
Type Description
System.Boolean
| Improve this Doc View Source

Inequality(SIPEndPoint, SIPEndPoint)

Declaration
public static bool operator !=(SIPEndPoint endPoint1, SIPEndPoint endPoint2)
Parameters
Type Name Description
SIPEndPoint endPoint1
SIPEndPoint endPoint2
Returns
Type Description
System.Boolean

Extension Methods

JSONWriter.ToJson(Object)
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX