OfferInReInviteEventArgs.Decline Method
Synchronously declines the media offer with the specific response code.
Namespace: Microsoft.Rtc.Signaling
Assembly: Microsoft.Rtc.Collaboration (in Microsoft.Rtc.Collaboration.dll)
Syntax
'Declaration
Public Function Decline ( _
responseCode As Integer, _
reasonPhrase As String, _
signalingHeaders As IEnumerable(Of SignalingHeader), _
contentType As ContentType, _
body As Byte() _
) As SipRequestData
'Usage
Dim instance As OfferInReInviteEventArgs
Dim responseCode As Integer
Dim reasonPhrase As String
Dim signalingHeaders As IEnumerable(Of SignalingHeader)
Dim contentType As ContentType
Dim body As Byte()
Dim returnValue As SipRequestData
returnValue = instance.Decline(responseCode, _
reasonPhrase, signalingHeaders, _
contentType, body)
public SipRequestData Decline(
int responseCode,
string reasonPhrase,
IEnumerable<SignalingHeader> signalingHeaders,
ContentType contentType,
byte[] body
)
Parameters
- responseCode
Type: System.Int32
The response code to decline with.
- reasonPhrase
Type: System.String
The reason phrase to use. Can be null.
- signalingHeaders
Type: System.Collections.Generic.IEnumerable<SignalingHeader>
The signaling headers to use in the response. Can be null.
- contentType
Type: System.Net.Mime.ContentType
The content type of the body. Can be null if body is null.
- body
Type: []
The body to send.
Return Value
Type: Microsoft.Rtc.Signaling.SipRequestData
Returns the ack data received.
Exceptions
Exception | Condition |
---|---|
InvalidOperationException | Thrown when called in an invalid state or a final response has already been sent. |
ArgumentOutOfRangeException | The response code is not in the range expected. |
ArgumentException | Thrown when there are problems with arguments supplied. |
OperationTimeoutException | Thrown when ack is not received. |
RealTimeException | Thrown when the response cannot be sent for other reasons. |
Remarks
This method is not recommended for UI threads or scalable server applications.
See Also
Reference
OfferInReInviteEventArgs Class