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

    Class for sending and receiving Real Time Protocol (RTP) media such as audio, video and text (RTT). Each instance of an RtpChannel class handles a single media type.

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

    Follow these steps to create and use an RtpChannel object.

    1. Call the CreateFromSdp() method with the offered SDP and offered media description and the answered SDP and the answered media description after the media description negotiation has been completed.
    2. Hook the events of the RtpChannel class. At least the RtpPacketReceived event should be handled.
    3. Call the StartListening() method to start the RtpChannel.
    4. Call the Send() method to send a new RTP packet containing new media.

    When the media session ends, unhook the events and call the Shutdown() method to release all resources held by the RtpChannel object.

    Properties

    | Edit this page View Source

    CertificateFingerprint

    Gets the fingerprint of the self-signed X.509 certificate that will be used for DTLS-SRTP. The certificate is a required SDP attribute for calls that offer or answer DTLS-SRTP media encryption.

    The RtpChannel class automatically creates a self-signed X.509 certificate that will be used for all instances of the RtpChannel class for an application session.

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

    Returns null if there was an error during creation of the self-signed X.509 certificate.

    | Edit this page View Source

    IsDtlsSrtp

    Returns true if this channel is using DTLS-SRTP encryption

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

    IsSdesSrtp

    Returns true if this channel is using SDES-SRTP encryption

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

    LocalPort

    Gets the port number of the local IPEndPoint.

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

    MediaType

    Gets the media type for this RtpChannel

    Declaration
    public string MediaType { get; }
    Property Value
    Type Description
    string

    Will be one of "audio", "video" or "text" (for RTT)

    | Edit this page View Source

    RemoteRtcpEndPoint

    Gets or sets the RTCP IPEndPoint of the remote

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

    RemoteRtpEndPoint

    Gets or sets the RTP IPEndPoint of the remote.

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

    SSRC

    Gets or sets the RTP SSRC for this RtpChannel. By default, the SSRC is set to a random unsigned 32-bit number so there is usually no need to change it by calling the setter.

    Declaration
    public uint SSRC { get; set; }
    Property Value
    Type Description
    uint

    Methods

    | Edit this page View Source

    CreateFromSdp(bool, Sdp, MediaDescription, Sdp, MediaDescription, bool, string?)

    Creates an RtpChannel using the offered and answered Session Description Protocol (SDP) parameters.

    Declaration
    public static (RtpChannel?, string?) CreateFromSdp(bool Incoming, Sdp OfferedSdp, MediaDescription OfferedMd, Sdp AnsweredSdp, MediaDescription AnsweredMd, bool enableRtcp, string? CNAME)
    Parameters
    Type Name Description
    bool Incoming

    Set to true if the call is incoming.

    Sdp OfferedSdp

    The SDP that was offered. If Incoming is true, then this parameter must be the Sdp object that was received in an INVITE request. Else, this parameter must be the Sdp object that the client sent in an INVITE request.

    MediaDescription OfferedMd

    The offered media description parameter block from the offered SDP for the media type that the RtpChannel will handle.

    Sdp AnsweredSdp

    The SDP that was answered. If Incoming is true, then this parameter must be the Sdp object that the server sent in response to an INVITE request that it received. Else, this parameter must the the Sdp object that the client received in response to the INVITE that it sent.

    MediaDescription AnsweredMd

    The answered media description parameter block from the answered SDP for the media type that the RtpChannel will handle.

    bool enableRtcp

    If true, then RTCP packets will be sent periodically.

    string CNAME

    Cononical name to use for sending SDES RTCP packets that identify the media source. If null, then a default CNAME will be automatically generated.

    Returns
    Type Description
    (RtpChannel, string)

    Returns a (RtpChannel, string) tuple. If the RtpChannel return value is null then an error was detected and the string return value will contain an explanation of the error. If the RtpChannel return value is not null then the string return value will be null.

    | Edit this page View Source

    Send(RtpPacket)

    Sends an RTP packet to the remote endpoint

    Declaration
    public void Send(RtpPacket rtpPacket)
    Parameters
    Type Name Description
    RtpPacket rtpPacket
    | Edit this page View Source

    Shutdown()

    Shuts down this RtpChannel and releases all resources. The RtpChannel object cannot be used after this method is called.

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

    StartListening()

    Starts the listener threads for RTP and RTCP.

    Declaration
    public void StartListening()

    Events

    | Edit this page View Source

    DtlsHandshakeFailed

    Event that is fired if the DTLS-SRTP handshake failed

    Declaration
    public event DtlsHandshakeFailedDelegate? DtlsHandshakeFailed
    Event Type
    Type Description
    DtlsHandshakeFailedDelegate
    | Edit this page View Source

    ReceiveStatisticsReady

    Event that is fired when new receive side statistics are ready. This event if fired only if RTCP is enabled for the RtpChannel and the media type is audio. This event will be fired every 5 seconds.

    Declaration
    public event ReceiveStatisticsReadyDelegate? ReceiveStatisticsReady
    Event Type
    Type Description
    ReceiveStatisticsReadyDelegate
    | Edit this page View Source

    RtcpPacketReceived

    Event that is fired when a RTCP packet is received.

    Declaration
    public event RtcpPacketReceivedDelegate? RtcpPacketReceived
    Event Type
    Type Description
    RtcpPacketReceivedDelegate
    | Edit this page View Source

    RtcpPacketSent

    Event that is fired when this class sends an RTCP packet.

    Declaration
    public event RtcpPacketSentDelegate? RtcpPacketSent
    Event Type
    Type Description
    RtcpPacketSentDelegate
    | Edit this page View Source

    RtpPacketReceived

    Event that is fired when a RTP media packet has been received by this RtpChannel

    Declaration
    public event RtpPacketReceivedDelegate? RtpPacketReceived
    Event Type
    Type Description
    RtpPacketReceivedDelegate
    | Edit this page View Source

    RtpPacketSent

    Event that is fired when a RTP packet has been sent by this RtpChannel. This event is used for logging media when using an active SIP media recorder (SIPREC).

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