Click or drag to resize

ChannelResourceGcCause Property

GC Cause code for a disconnected call if available.

Namespace:  VoiceElements.Client
Assembly:  VoiceElementsClient (in VoiceElementsClient.dll) Version: 8.6.1.1
Syntax
public int GcCause { get; }

Property Value

Type: Int32
Remarks
Cause Codes and Messages

This is an integer specifying the cause of a Disconnect. This may or may not be passed by the carrier depending on the underlying protocol being used. Typically, these are used for PRI's. For a list of these codes, see"Q.931 Cause Codes on our support wiki. You may want to log these if availble for troubleshooting carrier problems. You can also use GC Message Property, General Cause Code Porperty, and General Cause Message Property for more information when investigating disconnects.

Examples
The example below shows a chunk of code that gets all of the possible Cause Code properties and puts them into variables for logging when a Disconnect Event arrives.
static void ChannelResource_Disconnected(object sender, DisconnectedEventArgs e)
{
    // Get the carrier information and log it.
    int GcCode = e.ChannelResource.GcCause;
    string GcMessage = e.ChannelResource.GcCauseMessage;
    int GeneralCode = e.ChannelResource.GeneralCause;
    string GeneralMessage = e.ChannelResource.GeneralCauseMessage;

    // Use your vriables now to log, store or alert based on available contents
}
See Also