Declines the media offer with the specific response code.

Namespace:  Microsoft.Rtc.Signaling
Assembly:  Microsoft.Rtc.Collaboration(in Microsoft.Rtc.Collaboration.dll)

Syntax

Visual Basic (Declaration)
Public 
Function 
Decline ( _
	
responseCode 
As 
Integer, _
	
reasonPhrase 
As 
String, _
	
signalingHeaders 
As 
IEnumerable(
Of 

SignalingHeader), _
	
contentType 
As 
ContentType, _
	
body 
As 
Byte() _
) 
As 

SipRequestData
C#
public 

SipRequestData 
Decline(
	
int 
responseCode,
	
string 
reasonPhrase,
	
IEnumerable<

SignalingHeader> 
signalingHeaders,
	
ContentType 
contentType,
	
byte[] 
body
)
Visual C++
public:

SipRequestData^ 
Decline(
	
int 
responseCode, 
	
String^ 
reasonPhrase, 
	
IEnumerable<

SignalingHeader^>^ 
signalingHeaders, 
	
ContentType^ 
contentType, 
	
array<
unsigned char>^ 
body
)
JavaScript
function 
decline(
responseCode, 
reasonPhrase, 
signalingHeaders, 
contentType, 
body);

Parameters

responseCode
Type: Int32
The response code to decline with.
reasonPhrase
Type: String
The reason phrase to use. Can be null.
signalingHeaders
Type: IEnumerable < (Of < ( SignalingHeader > ) > )
The signaling headers to use in the response. Can be null.
contentType
Type: ContentType
The content type of the body. Can be null if body is null.
body
Type: array< Byte > [] () []
The body to send.

Return Value

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.
Microsoft.Rtc.Signaling . . :: . RealTimeException Thrown when the response cannot be sent for other reasons.

See Also