• Articles
  • Api Documentation
Search Results for

    Show / Hide Table of Contents
    • SipLib.Body
      • BodyParser
      • ContentTypes
      • MessageContentsContainer
      • MultipartBinaryBodyBuilder
      • SipBodyBuilder
    • SipLib.Channels
      • AcceptCertificateDelegate
      • AcceptConnectionDelegate
      • DscpSettings
      • LogInvalidSipMessageDelegate
      • LogSipRequestDelegate
      • LogSipResponseDelegate
      • Qos
      • SIPChannel
      • SIPConnection
      • SIPConnectionDisconnectedDelegate
      • SIPConnectionsEnum
      • SIPMessageReceivedDelegate
      • SIPTCPChannel
      • SIPTLSChannel
      • SIPUDPChannel
      • SipConnectionFailedDelegate
      • SipRequestReceivedDelegate
      • SipResponseReceivedDelegate
      • SipTransactionCompleteDelegate
      • WindowsQos
    • SipLib.Collections
      • ThreadSafeGenericList<T>
    • SipLib.Core
      • ByteBufferInfo
      • CallProperties
      • Crypto
      • HTTPDigest
      • IPSocket
      • SIPAuthenticationHeader
      • SIPAuthorisationDigest
      • SIPAuthorisationHeadersEnum
      • SIPCallInfoHeader
      • SIPConstants
      • SIPContactHeader
      • SIPEndPoint
      • SIPEscape
      • SIPFrag
      • SIPFromHeader
      • SIPGeolocationHeader
      • SIPHeader
      • SIPHeaders
      • SIPMessage
      • SIPMessageTypesEnum
      • SIPMethods
      • SIPMethodsEnum
      • SIPPaiHeader
      • SIPParameters
      • SIPPpiHeader
      • SIPProtocolsEnum
      • SIPProtocolsType
      • SIPReplacesParameter
      • SIPRequest
      • SIPResponse
      • SIPResponseStatusCodes
      • SIPResponseStatusCodesEnum
      • SIPRoute
      • SIPRouteSet
      • SIPSchemesEnum
      • SIPSchemesType
      • SIPToHeader
      • SIPURI
      • SIPUserField
      • SIPValidationException
      • SIPValidationFieldsEnum
      • SIPViaHeader
      • SIPViaSet
      • SipUtils
      • TypeExtensions
    • SipLib.Dtls
      • AlertLevelsEnum
      • AlertTypesEnum
      • DtlsClientUdpTransport
      • DtlsServerUdpTransport
      • DtlsSrtpClient
      • DtlsSrtpServer
      • DtlsSrtpTransport
      • DtlsUtils
      • IDtlsSrtpPeer
      • IPacketTransformer
      • ITransformEngine
      • NetConvert
      • RTCDtlsFingerprint
      • RawPacket
      • SrtcpCryptoContext
      • SrtpPolicy
      • SrtpTransformEngine
      • SrtpTransformer
    • SipLib.Logging
      • SipLogger
    • SipLib.Media
      • ALawDecoder
      • ALawEncoder
      • AudioDestination
      • AudioDestinationDelegate
      • AudioSampleData
      • AudioSamplesReadyDelegate
      • AudioSource
      • Band
      • DtmfDigitReceivedDelegate
      • FileAudioSource
      • G722Codec
      • G722CodecState
      • G722Decoder
      • G722Encoder
      • G722Flags
      • HighResolutionTimer
      • HighResolutionTimerDelegate
      • IAudioDecoder
      • IAudioEncoder
      • IAudioSampleSource
      • MediaPortManager
      • MediaPortSettings
      • MediaTypes
      • MsrpEncryptionEnum
      • MuLawDecoder
      • MuLawEncoder
      • PcmaDecoder
      • PcmaEncoder
      • PcmuDecoder
      • PcmuEncoder
      • PortRange
      • RtpEncryptionEnum
    • SipLib.Msrp
      • ByteRangeHeader
      • CpimMessage
      • MsrpCompletionStatus
      • MsrpConnection
      • MsrpConnectionStatusDelegate
      • MsrpMessage
      • MsrpMessageDeliveryFailedDelegate
      • MsrpMessageReceivedDelegate
      • MsrpMessageSentDelegate
      • MsrpMessageType
      • MsrpPathHeader
      • MsrpStatusHeader
      • MsrpStreamParser
      • MsrpTextMessageReceivedDelegate
      • MsrpUri
      • ReportReceivedDelegate
    • SipLib.Network
      • IpUtils
    • SipLib.RealTimeText
      • RttCharactersReceivedDelegate
      • RttParameters
      • RttReceiver
      • RttRtpSendDelegate
      • RttSender
    • SipLib.Rtp
      • ByePacket
      • DtlsHandshakeFailedDelegate
      • DtmfEventEnum
      • DtmfPacket
      • JitterStatistics
      • MeanOpinionScore
      • ReceiveStatisticsReadyDelegate
      • ReceiverReport
      • ReportBlock
      • RtcpCompoundPacket
      • RtcpHeader
      • RtcpPacketReceivedDelegate
      • RtcpPacketSentDelegate
      • RtcpPacketType
      • RtpChannel
      • RtpPacket
      • RtpPacketReceivedDelegate
      • RtpPacketSentDelegate
      • RtpReceiveStatistics
      • RtpUtils
      • SdesChunk
      • SdesItem
      • SdesItemType
      • SdesPacket
      • SenderInfo
      • SenderReport
    • SipLib.RtpCrypto
      • AesFunctions
      • CryptoAttribute
      • CryptoContext
      • CryptoSuites
      • InlineParams
      • MasterKeys
      • RocVals
      • RocValues
      • SRtpErrorsEnum
      • SRtpUtils
      • SessionKeys
      • SrtpDecryptor
      • SrtpEncryptor
      • SrtpLabelItem
      • SrtpTransformBase
    • SipLib.Sdp
      • ConnectionData
      • MediaDescription
      • MediaDirectionEnum
      • Origin
      • RtpMapAttribute
      • Sdp
      • SdpAnswerSettings
      • SdpAttribute
      • SdpUtils
      • SetupType
    • SipLib.Threading
      • QueuedActionWorkerTask
    • SipLib.Transactions
      • ClientInviteTransaction
      • ClientNonInviteTransaction
      • ServerInviteTransaction
      • ServerNonInviteTransaction
      • SipTimers
      • SipTransactionBase
      • SipTransport
      • TransactionRequestReceivedDelegate
      • TransactionResponseReceivedDelegate
      • TransactionStateEnum
      • TransactionTerminationReasonEnum
    • SipLib.Video
      • H264Depacketiser
      • H264Packetiser
      • H264Packetiser.H264Nal
      • H264RtpReceiver
      • H264RtpSender
      • RtpSendDelegate
      • RtpVP8Header
      • VP8RtpReceiver
      • VP8RtpSender
      • VideoRtpReceiver
      • VideoRtpSender

    Class SIPURI

    Implements the SIP URI concept from the SIP RFC3261. This class also handles URIs for http, https, ws, wss, msrp, msrps and im schemes.

    Inheritance
    object
    SIPURI
    Inherited Members
    object.Equals(object, object)
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: SipLib.Core
    Assembly: SipLib.dll
    Syntax
    public class SIPURI

    Constructors

    | Edit this page View Source

    SIPURI(SIPSchemesEnum, SIPEndPoint)

    Constructs a new SIPURI from the scheme and a SIPEndPoint Unspecified parameters are set to their default values

    Declaration
    public SIPURI(SIPSchemesEnum scheme, SIPEndPoint sipEndPoint)
    Parameters
    Type Name Description
    SIPSchemesEnum scheme

    Scheme

    SIPEndPoint sipEndPoint

    SIPEndPoint to build the SIPURI from

    | Edit this page View Source

    SIPURI(SIPSchemesEnum, IPAddress, int)

    Constructs a new SIPURI from a scheme, an IPAddress and a port number Unspecified parameters are set to their default values

    Declaration
    public SIPURI(SIPSchemesEnum scheme, IPAddress address, int port)
    Parameters
    Type Name Description
    SIPSchemesEnum scheme

    Scheme

    IPAddress address

    IPAddress -- may be IPv4 or IPv6

    int port

    Port number

    | Edit this page View Source

    SIPURI(string, string, string)

    Constructs a new SIPURI from the user, host and parameters and headers strings. Unspecified parameters are set to their default values

    Declaration
    public SIPURI(string user, string host, string paramsAndHeaders)
    Parameters
    Type Name Description
    string user

    User part of the URI. Optional

    string host

    Host portion of the URI. Required

    string paramsAndHeaders

    URI parameters and headers. Optional

    | Edit this page View Source

    SIPURI(string, string, string, SIPSchemesEnum)

    Constructs a new SIPURI from the user, host, parameters and headers and scheme. Unspecified parameters are set to their default values

    Declaration
    public SIPURI(string user, string host, string paramsAndHeaders, SIPSchemesEnum scheme)
    Parameters
    Type Name Description
    string user

    User part of the URI. Optional

    string host

    Host portion of the URI. Required

    string paramsAndHeaders

    URI parameters and headers. Optional

    SIPSchemesEnum scheme

    URI scheme.

    | Edit this page View Source

    SIPURI(string, string, string, SIPSchemesEnum, SIPProtocolsEnum)

    Constructor

    Declaration
    public SIPURI(string user, string host, string paramsAndHeaders, SIPSchemesEnum scheme, SIPProtocolsEnum protocol)
    Parameters
    Type Name Description
    string user

    User part of the URI. Optional

    string host

    Host portion of the URI. Required

    string paramsAndHeaders

    URI parameters and headers. Optional

    SIPSchemesEnum scheme

    URI scheme.

    SIPProtocolsEnum protocol

    Transport protocol

    Fields

    | Edit this page View Source

    Headers

    Embedded URI headers

    Declaration
    public SIPParameters Headers
    Field Value
    Type Description
    SIPParameters
    | Edit this page View Source

    Host

    Host portion of the URI.

    Declaration
    public string? Host
    Field Value
    Type Description
    string
    | Edit this page View Source

    Parameters

    URI parameters

    Declaration
    public SIPParameters Parameters
    Field Value
    Type Description
    SIPParameters
    | Edit this page View Source

    Scheme

    SIP scheme (sip, sips, etc.)

    Declaration
    public SIPSchemesEnum Scheme
    Field Value
    Type Description
    SIPSchemesEnum
    | Edit this page View Source

    User

    User portion of the URI

    Declaration
    public string? User
    Field Value
    Type Description
    string

    Properties

    | Edit this page View Source

    CanonicalAddress

    Gets a string that can be used to compare SIP URI addresses.

    Declaration
    public string CanonicalAddress { get; }
    Property Value
    Type Description
    string
    | Edit this page View Source

    HostAddress

    Gets the host address portion of the URI. If the address is an IPv6 address, then it will include the [ and ] delimiters.

    Declaration
    public string HostAddress { get; }
    Property Value
    Type Description
    string
    | Edit this page View Source

    HostPort

    Gets the port portion of the host address or null if it is not present

    Declaration
    public string? HostPort { get; }
    Property Value
    Type Description
    string
    | Edit this page View Source

    MAddr

    Gets the maddr parameter or null if it is not present

    Declaration
    public string? MAddr { get; }
    Property Value
    Type Description
    string
    | Edit this page View Source

    MAddrOrHostAddress

    Gets the maddr parameter or the host address if the maddr parameter is not present

    Declaration
    public string MAddrOrHostAddress { get; }
    Property Value
    Type Description
    string
    | Edit this page View Source

    Protocol

    The protocol for a SIP URI is dictated by the scheme of the URI and then by the transport parameter and finally by the use of a default protocol. If the URI is a sips one then the protocol must be TLS. After that if there is a transport parameter specified for the URI it dictates the protocol for the URI. Finally if there is no transport parameter for a sip URI then the default UDP transport is used.

    Declaration
    public SIPProtocolsEnum Protocol { get; set; }
    Property Value
    Type Description
    SIPProtocolsEnum
    | Edit this page View Source

    UnescapedUser

    Gets the un-escapted user part of the URI or null if there is no user part.

    Declaration
    public string? UnescapedUser { get; }
    Property Value
    Type Description
    string

    Methods

    | Edit this page View Source

    AreEqual(SIPURI, SIPURI)

    Returns true if two SIPURI objects represent the same resource

    Declaration
    public static bool AreEqual(SIPURI uri1, SIPURI uri2)
    Parameters
    Type Name Description
    SIPURI uri1

    First SIPURI object

    SIPURI uri2

    Second SIPURI object

    Returns
    Type Description
    bool

    Returns true if the two SIPURI objects are equal

    | Edit this page View Source

    CopyOf()

    Creates a deep copy if this SIPURI object

    Declaration
    public SIPURI CopyOf()
    Returns
    Type Description
    SIPURI
    | Edit this page View Source

    Equals(object?)

    Returns true if the input SIPURI represents the same resource as this one

    Declaration
    public override bool Equals(object? obj)
    Parameters
    Type Name Description
    object obj

    SIPURI object to test

    Returns
    Type Description
    bool

    Returns true if the input SIPURI is equal to this one

    Overrides
    object.Equals(object)
    | Edit this page View Source

    GetHashCode()

    Override of GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int
    Overrides
    object.GetHashCode()
    | Edit this page View Source

    IsDefaultPort()

    Indicates whether the SIP URI is using the default port for its protocol. Default ports are 5060 for UDP and TCP, 5061 for TLS, 80 for WS and 443 for WSS.

    Declaration
    public bool IsDefaultPort()
    Returns
    Type Description
    bool

    True if the default port is being used, false if not.

    | Edit this page View Source

    Mangle(SIPURI, IPEndPoint)

    Checks whether the specified SIP URI Host field contains a private IPv4 address and if so and the received on IP address is different then "mangles" the host to contain the received on IP end point. The purpose of the mangling is to assist in dealing with IPv4 NAT's. If the SIP URI host is IPv6 or a host name no mangling will be done.

    Declaration
    public static SIPURI? Mangle(SIPURI uri, IPEndPoint receivedOn)
    Parameters
    Type Name Description
    SIPURI uri

    The SIP URI to mangle.

    IPEndPoint receivedOn

    The IP end point that the SIP message was received from.

    Returns
    Type Description
    SIPURI

    A new SIP URI if mangling took place. Null if no mangling occurred.

    | Edit this page View Source

    ParseSIPURI(string)

    Parses a string into a SIPURI object.

    Declaration
    public static SIPURI ParseSIPURI(string uri)
    Parameters
    Type Name Description
    string uri

    Input string

    Returns
    Type Description
    SIPURI

    Returns a new SIPURI object

    Exceptions
    Type Condition
    SIPValidationException

    Thrown if the input string is not a valid SIPURI

    | Edit this page View Source

    ToAOR()

    Returns an address of record for the SIP URI which is a string in the format user@host.

    Declaration
    public string ToAOR()
    Returns
    Type Description
    string

    A string representing the address of record for the URI.

    | Edit this page View Source

    ToParameterlessString()

    Returns a string representation of the URI with any parameter and headers omitted except for the transport parameter. The string returned by this function is used amongst other things to match Route headers set by this SIP agent.

    Declaration
    public string ToParameterlessString()
    Returns
    Type Description
    string

    A string representation of the URI with headers and parameters omitted except for the transport parameter if it is required.

    | Edit this page View Source

    ToSIPEndPoint()

    Converts this SIPURI object into a SIPEndPoint object.

    Declaration
    public SIPEndPoint? ToSIPEndPoint()
    Returns
    Type Description
    SIPEndPoint

    Returns a SIPEndPoint object if the SIPURI represents an endpoint or null if it does not (for example: urn:service:sos)

    | Edit this page View Source

    ToString()

    Converts this SIPURI object into a string

    Declaration
    public override string ToString()
    Returns
    Type Description
    string
    Overrides
    object.ToString()
    | Edit this page View Source

    TryParse(string, out SIPURI?)

    Tests to see if a string can be parsed into a SIPURI object.

    Declaration
    public static bool TryParse(string uriStr, out SIPURI? uri)
    Parameters
    Type Name Description
    string uriStr

    Input string

    SIPURI uri

    Output SIPURI object. Set to a valid SIPURI object if successful

    Returns
    Type Description
    bool

    Returns true if successful or false if an error occurred.

    Operators

    | Edit this page View Source

    operator ==(SIPURI, SIPURI)

    Returns true if two SIPURI objects represent the same resource

    Declaration
    public static bool operator ==(SIPURI uri1, SIPURI uri2)
    Parameters
    Type Name Description
    SIPURI uri1

    Right-hand SIPURI object

    SIPURI uri2

    Left-hand SIPURI object

    Returns
    Type Description
    bool

    Returns true if they are equal or false if they are not

    | Edit this page View Source

    operator !=(SIPURI, SIPURI)

    Override of the != operator

    Declaration
    public static bool operator !=(SIPURI x, SIPURI y)
    Parameters
    Type Name Description
    SIPURI x

    Left-hand SIPURI object

    SIPURI y

    Right-hand SIPURI object

    Returns
    Type Description
    bool

    Returns true if the SIPURI objects are not equal or false if they are equal

    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX