Click or drag to resize

ChannelResourceTransferredData Property

Gets the data sent from another application which has invoked the Transfer Application Method to this application.

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

Property Value

Type: String
Remarks
The application transfer feature is extremely powerful when used correctly. You may have separate code bases running on separate systems and move calls between them at any time using the Transfer Application Method. In this case, another application has invoked the Transfer Application Method. At that point, this "target application" will receive a New Call event for the DNIS specified by the transferring application and for which the target is registered.

How to get the Transfer Data

Along with the new call comes the data stored in the Transfer Data Property for the call in this application. Being an arbitrary string, you can use delimiters to pass many data fields like phone number, caller id, data already received from the caller, or anything to help the target application process the call. Simply get the property, parse and handle it as you would like.

Examples
The example below shows the code in a New Call event that receives the call sent from the sample code shown in: Transfer Application Method.
static void s_TelephonyServer_NewCall(object sender, VoiceElements.Client.NewCallEventArgs callArgs)
{
    // Get the DNIS and put in a variable
    string m_Dnis = callArgs.ChannelResource.Dnis;

    // Here is how to use different call processing for DNIS's ro blocks
    if (m_Dnis == "4155551212")
    {
        // This DNIS is for a transferred call from another application
        // Get the data as a comma delimited string and put into an array
        string m_Data = callArgs.ChannelResource.TransferData;
        string[] m_DataArray = m_Data.Split(',');
        // Here are some sample fields for raw data being: "2135551212, Outbound, Connected"
        string PhoneNumber = m_DataArray[0];
        string CallType = m_DataArray[1];
        string CallStatus = m_DataArray[2];
    }
}
See Also