Terminates a session by rejecting the incoming invite. This method can be called only for an incoming session before participating in it.

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

Syntax

Visual Basic (Declaration)
Public 
Sub 
TerminateWithRejection ( _
	
responseCode 
As 
Integer, _
	
responseText 
As 
String, _
	
signalingHeaders 
As 
IEnumerable(
Of 

SignalingHeader) _
)
C#
public 
void 
TerminateWithRejection(
	
int 
responseCode,
	
string 
responseText,
	
IEnumerable<

SignalingHeader> 
signalingHeaders
)
Visual C++
public:
void 
TerminateWithRejection(
	
int 
responseCode, 
	
String^ 
responseText, 
	
IEnumerable<

SignalingHeader^>^ 
signalingHeaders
)
JavaScript
function 
terminateWithRejection(
responseCode, 
responseText, 
signalingHeaders);

Parameters

responseCode
Type: Int32
Failure response code.
responseText
Type: String
The text to indicate the reason. Can be null.
signalingHeaders
Type: IEnumerable < (Of < ( SignalingHeader > ) > )
The signaling headers to add.

Exceptions

Exception Condition
ArgumentOutOfRangeException Thrown when the response code is not in the proper range.
InvalidOperationException Thrown when called in an invalid state.
Microsoft.Rtc.Signaling . . :: . RealTimeException Thrown when a transport error occurs while sending.

See Also