• 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 MsrpConnection

    Class for managing a single MSRP connection to either a remote server or from a remote client.

    Inheritance
    object
    MsrpConnection
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: SipLib.Msrp
    Assembly: SipLib.dll
    Syntax
    public class MsrpConnection

    Properties

    | Edit this page View Source

    ConnectionIsPassive

    Returns true if the connection is passive, i.e., this end is the server and listening for connection requests. Returns false if this end of the connection is the client.

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

    LocalMsrpUri

    Gets the local MsrpUri for this connection or null if not set yet.

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

    MaxMsrpMessageLength

    Gets or sets the maximum size of a complete MSRP message that the MsrpConnection can receive.

    The default size is 10,000 bytes. The minimum limit on the message length is 3,000 bytes. There is no upper limit. For text applications it is not necessary to change the default. If the application will be expected to receive large images or video files then this property must be set to an appropriate value.

    This property must be set before calling the Start() method.

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

    RemoteMsrpUri

    Gets the remote MsrpUri for this connection or null if not set yet.

    Declaration
    public MsrpUri? RemoteMsrpUri { get; }
    Property Value
    Type Description
    MsrpUri

    Methods

    | Edit this page View Source

    CreateAsClient(MsrpUri, MsrpUri, X509Certificate2)

    Creates a client MsrpConnection object. Call this method to create a client that connects to a remote endpoint that listens as a server. After calling this method, hook the events and then call the Start() method when ready to connect.

    Declaration
    public static MsrpConnection CreateAsClient(MsrpUri LocalMsrpUri, MsrpUri RemoteMsrpUri, X509Certificate2 LocalCert)
    Parameters
    Type Name Description
    MsrpUri LocalMsrpUri

    MsrpUri of the local endpoint. The host portion of the URI must be a valid IPEndPoint object.

    MsrpUri RemoteMsrpUri

    MsrpUri of the remote endpoint to connect to. The host portion of the URI must be a valid IPEndPoint.

    X509Certificate2 LocalCert

    X.509 certificate to use for MSRP over TLS (MSRPS) for optional mutual authentication as a client. Optional. May be null is not using MSRP over TLS.

    Returns
    Type Description
    MsrpConnection

    Returns a new MsrpConnection object.

    | Edit this page View Source

    CreateAsServer(MsrpUri, MsrpUri, X509Certificate2)

    Creates a new MsrpConnection object that listens for MSRP connection requests as a server. After calling this method, hook the events and then call the Start() method.

    Declaration
    public static MsrpConnection CreateAsServer(MsrpUri LocalMsrpUri, MsrpUri RemoteMsrpUri, X509Certificate2 LocalCert)
    Parameters
    Type Name Description
    MsrpUri LocalMsrpUri

    Specifies the MsrpUri that the server listens on. The host portion of the URI must be a valid IPEndPoint.

    MsrpUri RemoteMsrpUri

    Specifies the MsrpUri that the remote client will be connecting from. The host portion of the URI must be a valid IPEndPoint.

    X509Certificate2 LocalCert

    X.509 certificate to use. Required if using MSRP over TLS (MSRPS). May be null if using MSRP over TCP.

    Returns
    Type Description
    MsrpConnection

    Returns a new MsrpConnection object.

    | Edit this page View Source

    CreateFromSdp(MediaDescription, MediaDescription, bool, X509Certificate2?)

    Creates a MsrpConnection from the offered and answered SDP.

    Declaration
    public static (MsrpConnection?, string?) CreateFromSdp(MediaDescription OfferedMd, MediaDescription AnsweredMd, bool IsIncoming, X509Certificate2? LocalCert)
    Parameters
    Type Name Description
    MediaDescription OfferedMd

    The offered MediaDescription for MSRP ("message") media

    MediaDescription AnsweredMd

    The answered MediaDescription for MSRP ("message") media

    bool IsIncoming

    If true then its an incoming call. Else its an outgoing call

    X509Certificate2 LocalCert

    X.509 certificate to use for MSRP over TLS (MSRPS)

    Returns
    Type Description
    (MsrpConnection, string)

    Returns a tuple containing a MsrpConnection object and a string. If the returned MsrpConnection object is null, then the will contain an error message explaining why the MsrpConnection could no be created.

    | Edit this page View Source

    GetPathMsrpUri(MediaDescription)

    Parses the path attribute of a MediaDescription and returns a MsrpUri object

    Declaration
    public static MsrpUri? GetPathMsrpUri(MediaDescription Md)
    Parameters
    Type Name Description
    MediaDescription Md

    MediaDescription for MSRP media

    Returns
    Type Description
    MsrpUri

    Returns a new MsrpUri object or null if an error occurred

    | Edit this page View Source

    SendMsrpMessage(string, byte[], string?)

    Sends an MSRP message to the remote endpoint. The method queues the message for transmission and returns immediately. It does not block. If the length of the message contents is longer than 2048 bytes, then the message is split up into chunks and each message chunk is queued. To send an empty SEND request, set the ContentType and the Contents parameters to null.

    Declaration
    public void SendMsrpMessage(string ContentType, byte[] Contents, string? messageID = null)
    Parameters
    Type Name Description
    string ContentType

    Specifies the Content-Type header value for the message. For example: text/plain or message/CPIM.

    byte[] Contents

    Binary message contents encoded using UTF8 if the message is text or the binary contents if sending a non-text message such as a picture or a video file.

    string messageID

    If specified, this is the Message-ID header that will be include in the SEND request. This should be a 9 or 10 character alphanumeric string that identifies the message. This parameter is optional. If present then the SEND request will include a Success-Report header with a value of "yes" so that the remote endpoint will generate a success report.

    | Edit this page View Source

    Shutdown()

    Call this method to close all network connections. This method must be called when a call ends or if the MSRP session must be ended in case of a re-INVITE request to change the media destination or characteristics.

    Declaration
    public void Shutdown()
    | Edit this page View Source

    Start()

    Starts the connection process as a MSRP client or as a MSRP server depending upon the configuration.

    Declaration
    public void Start()

    Events

    | Edit this page View Source

    MsrpConnectionEstablished

    This event is fired when a connection is established with the remote endpoint either as a client or as a server.

    Declaration
    public event MsrpConnectionStatusDelegate? MsrpConnectionEstablished
    Event Type
    Type Description
    MsrpConnectionStatusDelegate
    | Edit this page View Source

    MsrpConnectionFailed

    This event is fired if the MsrpConnection object was unable to connect to the remote endpoint as a client.

    Declaration
    public event MsrpConnectionStatusDelegate? MsrpConnectionFailed
    Event Type
    Type Description
    MsrpConnectionStatusDelegate
    | Edit this page View Source

    MsrpMessageDeliveryFailed

    This event is fired if the remote endpoint rejected a MSRP message sent by the MsrpConnection object or if there was another problem delivering the message.

    Declaration
    public event MsrpMessageDeliveryFailedDelegate? MsrpMessageDeliveryFailed
    Event Type
    Type Description
    MsrpMessageDeliveryFailedDelegate
    | Edit this page View Source

    MsrpMessageReceived

    Event that is fired when a complete MSRP message is received. This event is not fired for empty SEND requests. Use this event if you wish to parse and process the complete MSRP message given the Content-Type that is a custom type -- for example a binary type such as image/jpeg.

    If the application only needs to handle text messages then use the MsrpTextMessageReceived event.

    Declaration
    public event MsrpMessageReceivedDelegate? MsrpMessageReceived
    Event Type
    Type Description
    MsrpMessageReceivedDelegate
    | Edit this page View Source

    MsrpMessageSent

    Event that is fired when this MsrpConnection object sends a new MSRP message. The purpose of this event is for active SIP recording (SIPREC).

    Declaration
    public event MsrpMessageSentDelegate? MsrpMessageSent
    Event Type
    Type Description
    MsrpMessageSentDelegate
    | Edit this page View Source

    MsrpTextMessageReceived

    Event that fired when an MSRP message is received with a Content-Type of text/plain or message/cpim and the content type of the CPIM message is text/plain.

    Declaration
    public event MsrpTextMessageReceivedDelegate? MsrpTextMessageReceived
    Event Type
    Type Description
    MsrpTextMessageReceivedDelegate
    | Edit this page View Source

    ReportReceived

    Event that is fired when a MSRP REPORT request is received.

    Declaration
    public event ReportReceivedDelegate? ReportReceived
    Event Type
    Type Description
    ReportReceivedDelegate
    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX