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

    Class for processing the Session Description Protocol message contents of a SIP message. See RFC 8866.

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

    Constructors

    | Edit this page View Source

    Sdp(IPAddress, string)

    Constructs a new Sdp and initializes the Origin (o=), ConnectionData (c=), session name (s=) and an empty media list.

    Declaration
    public Sdp(IPAddress LocalIp, string UaName)
    Parameters
    Type Name Description
    IPAddress LocalIp

    Local IP address

    string UaName

    User agent or server name

    Properties

    | Edit this page View Source

    Attributes

    Contains the attributes for this media session.

    Declaration
    public List<SdpAttribute> Attributes { get; set; }
    Property Value
    Type Description
    List<SdpAttribute>
    | Edit this page View Source

    Bandwidth

    Bandwidth parameter (b) for the entire session. See Section 5.8 of RFC 8866. This parameter is optional. Treating it as a simple string.

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

    ConnectionData

    Contains the connecton data for the call.

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

    Email

    Contains the e-mail parameter (e) for the session. See Section 5.6 of RFC 8866. This parameter is optional.

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

    Media

    Contains a list of all of the different types of media for a call.

    Declaration
    public List<MediaDescription> Media { get; set; }
    Property Value
    Type Description
    List<MediaDescription>
    | Edit this page View Source

    MediaDirection

    Gets or sets the media direction attribute for the session level.

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

    Origin

    Contains the origin information for the "o" parameter. See Section 5.2 of RFC 8866.

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

    PhoneNumber

    Contains the phone number (p) parameter for the session. See Section 5.6 of RFC 8866. This parameter is optional.

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

    SessionInformation

    Contains the session information "i" parameter. See Section 5.4 of RFC 8866. This parameter is optional.

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

    SessionName

    Contains the Session Name for the "s" type. parameter Section 5.3 of RFC 8866.

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

    Timing

    Timing (t) parameter. See Section 5.9 of RFC 8866.

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

    Uri

    Contains a URI to more information about the session. This is the "u" parameter. See Section 5.5 of RFC 8866. This parameter is optional.

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

    Version

    Contains the version number (v) of the SDP protocol. This is expected to be always 0. See Section 5.1 of RFC 8866.

    Declaration
    public int Version { get; }
    Property Value
    Type Description
    int

    Methods

    | Edit this page View Source

    BuildAnswerSdp(Sdp, IPAddress, SdpAnswerSettings)

    Builds an Sdp object to send as the answered Sdp in responsed to the offered Sdp

    Declaration
    public static Sdp BuildAnswerSdp(Sdp OfferedSdp, IPAddress address, SdpAnswerSettings AnswerSettings)
    Parameters
    Type Name Description
    Sdp OfferedSdp

    SDP that was offered

    IPAddress address

    IP address to be used for transport of all media. This address is used in the "c=" line of the SDP.

    SdpAnswerSettings AnswerSettings

    Settings that determine how to build the answered SDP

    Returns
    Type Description
    Sdp

    Returns the SDP to send to the client that offered the SDP

    | Edit this page View Source

    BuildAudioAnswerMediaDescription(MediaDescription, SdpAnswerSettings, int)

    Builds a MediaDescription object for audio for sending as an answer to an offered media description

    Declaration
    public static MediaDescription BuildAudioAnswerMediaDescription(MediaDescription OfferedMd, SdpAnswerSettings Settings, int LocalPortToUse)
    Parameters
    Type Name Description
    MediaDescription OfferedMd

    Media description that was offered for audio

    SdpAnswerSettings Settings

    Settings that determine how to build the answer media description

    int LocalPortToUse

    Local port number used by the current RtpChannel for audio. Set to zero if there currently is no audio RtpChannel. If set to 0 then a port will be assigned by the port manager.

    Returns
    Type Description
    MediaDescription

    Returns a new MediaDescription to send in the SDP of an OK response.

    | Edit this page View Source

    BuildMsrpAnswerMediaDescription(MediaDescription, IPAddress, SdpAnswerSettings, MsrpUri?)

    Builds a MediaDescription object for MSRP for sending as an answer to an offered media description

    Declaration
    public static MediaDescription BuildMsrpAnswerMediaDescription(MediaDescription OfferedMd, IPAddress Address, SdpAnswerSettings Settings, MsrpUri? LocalMsrpUriToUse)
    Parameters
    Type Name Description
    MediaDescription OfferedMd

    Media description that was offered for MSRP

    IPAddress Address

    Local IP address to use for the transport of MSRP

    SdpAnswerSettings Settings

    Settings that determine how to build the answer media description

    MsrpUri LocalMsrpUriToUse

    Set to the MsrpUri if there is a MsrpConnection for MSRP. Set to null if there is currently no MSRP for the call. If null then a new local port will be assigned by the port manager and a new local MsrpUri object will be created.

    Returns
    Type Description
    MediaDescription

    Returns a new MediaDescription to send in the SDP of an OK response.

    | Edit this page View Source

    BuildReInviteAnswerSdp(Sdp, IPAddress, SdpAnswerSettings, int, int, int, MsrpUri?)

    Builds an Sdp object to send as the answered Sdp in response to the offered Sdp in a re-INVITE request

    Declaration
    public static Sdp BuildReInviteAnswerSdp(Sdp OfferedSdp, IPAddress address, SdpAnswerSettings AnswerSettings, int LocalAudioPort, int LocalVideoPort, int LocalRttPort, MsrpUri? localMsrpUri)
    Parameters
    Type Name Description
    Sdp OfferedSdp

    SDP that was offered in the re-INVITE

    IPAddress address

    Local IP address to be used for transport of all media. This address is used in the "c=" line of the SDP.

    SdpAnswerSettings AnswerSettings

    Settings that determine how to build the answered SDP

    int LocalAudioPort

    Local port number used by the current RtpChannel for audio. Set to zero if there currently is no audio RtpChannel. If set to 0 then a port will be assigned by the port manager.

    int LocalVideoPort

    Local port number used by the current RtpChannel for video. Set to zero if there curently is no video RtpChannel. If set to 0 then a port will be assigned by the port manager.

    int LocalRttPort

    Local port number used by the current RtpChannel for RTT. Set to zero if there is currently no RTT RtpChannel. If set to 0 then a port will be assigned by the port manager.

    MsrpUri localMsrpUri

    Set to the MsrpUri if there is a MsrpConnection for MSRP. Set to null if there is currently no MSRP for the call. If null then a new local port will be assigned by the port manager and a new local MsrpUri object will be created.

    Returns
    Type Description
    Sdp

    Returns the SDP to send to the client that offered the SDP

    | Edit this page View Source

    BuildRttAnswerMediaDescription(MediaDescription, SdpAnswerSettings, int)

    Builds a MediaDescription object for RTT for sending as an answer to an offered media description

    Declaration
    public static MediaDescription BuildRttAnswerMediaDescription(MediaDescription OfferedMd, SdpAnswerSettings Settings, int LocalPortToUse)
    Parameters
    Type Name Description
    MediaDescription OfferedMd

    Media description that was offered for RTT

    SdpAnswerSettings Settings

    Settings that determine how to build the answer media description

    int LocalPortToUse

    Local port number used by the current RtpChannel for RTT. Set to zero if there currently is no RTT RtpChannel. If set to 0 then a port will be assigned by the port manager.

    Returns
    Type Description
    MediaDescription

    Returns a new MediaDescription to send in the SDP of an OK response.

    | Edit this page View Source

    BuildVideoAnswerMediaDescription(MediaDescription, SdpAnswerSettings, int)

    Builds a MediaDescription object for video for sending as an answer to an offered media description

    Declaration
    public static MediaDescription BuildVideoAnswerMediaDescription(MediaDescription OfferedMd, SdpAnswerSettings Settings, int LocalPortToUse)
    Parameters
    Type Name Description
    MediaDescription OfferedMd

    Media description that was offered for video

    SdpAnswerSettings Settings

    Settings that determine how to build the answer media description

    int LocalPortToUse

    Local port number used by the current RtpChannel for video. Set to zero if there currently is no video RtpChannel. If set to 0 then a port will be assigned by the port manager.

    Returns
    Type Description
    MediaDescription

    Returns a new MediaDescription to send in the SDP of an OK response.

    | Edit this page View Source

    CreateCopy()

    Creates a deep copy (i.e. by-value) of this object.

    Declaration
    public Sdp CreateCopy()
    Returns
    Type Description
    Sdp

    Returns a new Sdp object.

    | Edit this page View Source

    GetAudioConnectionData(ref string?, ref int)

    Retrieves the IP address and the port number for the audio media in this SDP.

    Declaration
    public bool GetAudioConnectionData(ref string? strIpAddr, ref int Port)
    Parameters
    Type Name Description
    string strIpAddr

    IP address to send the audio to. This output will contain the IP address if this method returns true or it will be set to null if this method returns false.

    int Port

    Port number to send the audio to. This output will contain the port number to if this method returns true or it will be set to 0 if this function returns false.

    Returns
    Type Description
    bool

    Returns true if the audio media type is present and valid. Else returns null.

    | Edit this page View Source

    GetMediaByTypeAndLabel(string, string)

    Gets the MediaDescription object for the specified media type and media label attribute.

    Declaration
    public MediaDescription? GetMediaByTypeAndLabel(string strType, string LabelAttribute)
    Parameters
    Type Name Description
    string strType

    The media type to search for (audio, video, message or text)

    string LabelAttribute

    Value of the label attribute to seach for.

    Returns
    Type Description
    MediaDescription

    Returns a MediaDescription object if the specified media type and label exist or null if not found.

    | Edit this page View Source

    GetMediaDirection(Sdp, MediaDescription)

    Gets the media direction attribute for a media type. The media direction may be specified at the session level or at the media level. The media level has priority.

    Declaration
    public static MediaDirectionEnum GetMediaDirection(Sdp sdp, MediaDescription md)
    Parameters
    Type Name Description
    Sdp sdp

    Session data

    MediaDescription md

    Media description. Must be one of the MediaDescription objects in the SDP.

    Returns
    Type Description
    MediaDirectionEnum

    Returns the media direction if specified at the media level or the session level. Returns MediaDirectionEnum.sendrecv if the direction is not specified at either level.

    | Edit this page View Source

    GetMediaEndPoint(Sdp, MediaDescription)

    Gets the IPEndPoint for media given the offered SDP and the offered SDP Media Description for that media. The destination IP address may be specified at the session level or the media level.

    Declaration
    public static IPEndPoint? GetMediaEndPoint(Sdp Sdp, MediaDescription Md)
    Parameters
    Type Name Description
    Sdp Sdp

    The entire SDP block that was offered.

    MediaDescription Md

    The SDP Media Description block for the media to get the IP address for.

    Returns
    Type Description
    IPEndPoint

    Returns an IPAddress. Returns null if there was no address specified in the session or media levels.

    | Edit this page View Source

    GetMediaIPAddr(Sdp, MediaDescription)

    Gets the destination IP address for media given the offered SDP and the offered SDP Media Description for that media. The destination IP address may be specified at the session level or the media level.

    Declaration
    public static IPAddress? GetMediaIPAddr(Sdp Sdp, MediaDescription Smd)
    Parameters
    Type Name Description
    Sdp Sdp

    The entire SDP block that was offered.

    MediaDescription Smd

    The SDP Media Description block for the media to get the IP address for.

    Returns
    Type Description
    IPAddress

    Returns an IPAddress. Returns null if there was no address specified in the session or media levels.

    | Edit this page View Source

    GetMediaType(string)

    Gets the MediaDescription object for the specified type of media.

    Declaration
    public MediaDescription? GetMediaType(string strType)
    Parameters
    Type Name Description
    string strType

    Type of media such as audio, video, text, etc..

    Returns
    Type Description
    MediaDescription

    Returns the SepMediaDescription object if the specified type of media is present or null if it is not.

    | Edit this page View Source

    GetMediaTypeIndex(string)

    Gets the index of a specified media type in the Media list.

    Declaration
    public int GetMediaTypeIndex(string strType)
    Parameters
    Type Name Description
    string strType

    Type of media to look for. Must be "audio", "video", "text" or "message"

    Returns
    Type Description
    int

    Returns the index of the media type in the Media list. Returns -1 if the media type is not present.

    | Edit this page View Source

    GetMediaTypeList(string)

    Gets a list of MediaDescription objects in the SDP that have the same type of media.

    Declaration
    public List<MediaDescription> GetMediaTypeList(string strType)
    Parameters
    Type Name Description
    string strType

    Media type. Must be one of "audio", "video", "text" or "message"

    Returns
    Type Description
    List<MediaDescription>

    Returns a list of MediaDescription objects of the same media type. The return value will not be null.

    | Edit this page View Source

    GetNamedAttribute(string)

    Returns the SdpAttribute object for a named attribute for the entire SDP at the session level.

    Declaration
    public SdpAttribute? GetNamedAttribute(string strAttr)
    Parameters
    Type Name Description
    string strAttr

    Name of the attribute to search for.

    Returns
    Type Description
    SdpAttribute

    Returns a SdpAttribute for the named attribute if it is found or null if the named attribute is not present.

    | Edit this page View Source

    HasMultiMedia()

    Checks to see if the offered SDP has media other that "audio" that is a known media type.

    Declaration
    public bool HasMultiMedia()
    Returns
    Type Description
    bool

    Returns true if the SDP contains media other than "audio" or false does not.

    | Edit this page View Source

    MediaTypeToDisplayString(string)

    Returns a display name for the associated media type name.

    Declaration
    public static string MediaTypeToDisplayString(string mediaTypeName)
    Parameters
    Type Name Description
    string mediaTypeName

    Media type name. Should be one of "audio", "video", "message" or "text".

    Returns
    Type Description
    string

    Return a name for displaying.

    | Edit this page View Source

    ParseSDP(string)

    Parses the SDP contained in a string

    Declaration
    public static Sdp ParseSDP(string strSdp)
    Parameters
    Type Name Description
    string strSdp

    Contains a SDP SIP body part.

    Returns
    Type Description
    Sdp

    Returns a new Sdp object.

    Exceptions
    Type Condition
    ArgumentException

    Thrown if an invalid argument is detected

    Exception

    Thrown if an unexpected error occurs

    | Edit this page View Source

    RemoveNamedAttribute(string)

    Removes all instances of a named SDP attribute.

    Declaration
    public void RemoveNamedAttribute(string strAttr)
    Parameters
    Type Name Description
    string strAttr

    Name of the SDP attribute to remove.

    | Edit this page View Source

    ToString()

    Converts the Sdp object to a string.

    Declaration
    public override string ToString()
    Returns
    Type Description
    string

    The string is formatted so that it can be appended to a SIP message as the SDP contents.

    Overrides
    object.ToString()
    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX