VoiceElementsClient (in VoiceElementsClient.dll) Version: 126.96.36.199
public void TransferApplication(
- Type: SystemString
The DNIS of the application that you would like to transfer to. Each client application logs into a Telephony Server
and registers one or more DNIS's. You specify a DNIS registered to the application to which you would like to transfer the call here.
- Type: SystemString
An arbitrary string value that you would like to send to the receiving application. This may be parsed in any way on the other end of the transfer and used to setup the call within the target
applications logic accordingly.
The application tarnsfer 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 this method.Tip: Use the Transfer Data parameter to its fullest
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.How to get the Transfer Data in the target application
The target application code will receive a New Call event
for the DNIS you have specified and for which it is registered. Along with that, comes the data
stored in the Transfer Data Property
for the call in the target application. Simply get the property, parse and handle it as you would like.Warning: You Must Dispose the Original Channel Once Transferred
You must call Dispose
on the originating channel, preferreably in the finally block to ensure it is processed.
If you do not do so, you could end up playing or receiving inputs from both channels at once. See the example below.
The example below shows a some code that dials, then if the Dial Result
is connected it transfers to another application with DNIS
of 4155551212 and sends a comma delimted list of data.
public void DialAndTransferCall()
TelephonyServer m_TelephonyServer = new TelephonyServer();
ChannelResource m_ChannelResource = m_TelephonyServer.GetChannel();
string m_PhoneNumber = "2135551212";
DialResult dialResult = m_ChannelResource.Dial(m_PhoneNumber);
m_ChannelResource.TransferApplication("4155551212", "2135551212, Outbound, Connected");
Transfer Data Property