|
ChannelResourceDisconnect Method (Int32) |
This method forces the
Channel Resource to disconnect any current connections or calls. You may also think of this as "hanging up."
This overload of the method requires you to specify a numeric cause code to the carrier telling the reason for the disconnect.
Namespace:
VoiceElements.Client
Assembly:
VoiceElementsClient (in VoiceElementsClient.dll) Version: 8.6.1.1
Syntax public void Disconnect(
int causeCode
)
Public Sub Disconnect (
causeCode As Integer
)
public:
void Disconnect(
int causeCode
)
member Disconnect :
causeCode : int -> unit
Parameters
- causeCode
- Type: SystemInt32
This is an optional integer of a cause you would like to pass when disconnecting. This may be passed to the carrier depending on the underlying protocol being used. For a list of these codes, see
Q.931 Cause Codes on our support wiki.
Remarks Disconnecting Without a Code
Optionally, you may specify a numeric cause for your disconnection to the carrier of the call. To do this, use the
Disconnect without Cause Code.
Examples
The example below shows two simple one line samples to disconnect a call using different
Q.931 Cause Codes.
public void HangupMyCall()
{
string CallResult;
int CauseCode = 0;
switch (CallResult)
{
case "User Busy":
CauseCode = 17;
break;
case "Out of Order":
CauseCode = 33;
break;
default:
CauseCode = 31;
break;
}
m_ChannelResource.Disconnect(CauseCode);
}
Public Sub HangupMyCall()
Dim CallResult As String
Dim CauseCode As Integer = 0
Select Case CallResult
Case "User Busy"
CauseCode = 17
Exit Select
Case "Out of Order"
CauseCode = 33
Exit Select
Case Else
CauseCode = 31
Exit Select
End Select
m_ChannelResource.Disconnect(CauseCode)
End Sub
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
See Also