Method: CompleteTransfer
|
Function: |
Complete a consultation call transfer. |
|
|
Parameters: |
Style(Long): Style can be set as following values: 0:Complete the transfer as a conference. 1:Complete the transfer as a transfer.
The PBX string used to complete the transfer.This parameter is used only for a Voice Modem. If the current line is a Voice Board, it will be ignored, and you should set the PBX string for Hook-Flash in the TSP configuration dialog for PBX strings. In China, PBXs of China Telecom consider "!,3" as the string to complete a three-way call as a conference. "!,3" means a hook-flash and then a short standstill, then pressing digit 3. A hook-flash is a quick click on the hook of the phone. The duration of the hook-flash is determined by the PBX to which your telephone line is linked. If the duration of the Hook-Flash is too long, it will drop the call; If it is too short, it does not take effect. If you are using a Voice Board, you should set the duration of the Hook-Flash in the TSP configuration dialog.If you are using a Voice Modem, you can use SetHookFlashDuration to set the duration before Initialize called.
|
|
| Description: |
After CompleteTransfer called, the conference call be be created, Connected event will be invoked, and current call is set to the conference call. Now calling GetCurrentCall will return 2. Drop can be used to drop the conference call.
To transfer a call, you should have the following configuration: 1.A small PBAX in you company or the big PBX from the TeleCom. Your PBAX should have transfer function. If you are using the telephone directly from PBX of the TeleCom, you should make sure that Three-Way Call service is offered for you. 2.A PC with A Voice Modem or a Voice Board plugged in. The line ports of Voice Modem or Voice Board should be linked to the inner port of the PBAX or PBX. And the parameters like the Hook-Flash String, Hook-Flash duration should be set properly.
|
|
| Dependencies: |
The consultation call should be in connected status. |
|
| Events Raised: |
||
| Relevances: |
StartTransfer, CancelTransfer, BlindTransfer, Hold, Unhold,SwapHold |
Sample Code In Visual Basic:
'The following example show how to transfer a number and use of relevant events and functions including:
Functions:CompleteTransfer, CancelTransfer
Events: Connected, Busy, VoicePromptDetected, WaitConnectionTimeout
Sub cmdTransfer_click()
VoiceAngel1.StartTransfer "6230396","!"
End Sub
Sub VoiceAngel1_Connected(LineIndex as Long, Style as Long)
If VoiceAngel1.GetCurrentCall=1 Then
VoiceAngel1.CompleteTransfer COMPLETE_TRANSFER_MODE_CONFERENCE, "!,3"
MsgBox "Consultation call connected while transfering.Transfer completed. "
ElseIf VoiceAngel1.GetCurrentCall=0 Then
MsgBox "Connected after dialing an outbound call."
End If
End Sub
Sub VoiceAngel1_Busy(LineIndex as Long)
If VoiceAngel1.GetCurrentCall=1 Then
VoiceAngel1.CancelTransfer "!,1"
MsgBox "Busy signal detected while transfering. Consultation call cancelled."
ElseIf VoiceAngel1.GetCurrentCall=0 Then
MsgBox "Busy signal detected while dialing an OutBound call. "
End If
End Sub
Sub VoiceAngel1_WaitConnectionTimeout(LineIndex as Long)
If VoiceAngel1.GetCurrentCall=1 Then
VoiceAngel1.CancelTransfer "!,1"
MsgBox "Timeout while transfering. Consultation call cancelled."
ElseIf VoiceAngel1.GetCurrentCall=0 Then
MsgBox "Timeout while dialing an OutBound call. "
End If
End Sub
Sub VoiceAngel1_VoicePromptDetected(LineIndex as Long)
If VoiceAngel1.GetCurrentCall=1 Then
VoiceAngel1.CancelTransfer "!,1"
MsgBox "Voice Prompt detected while transfering. Consultation call cancelled."
ElseIf VoiceAngel1.GetCurrentCall=0 Then
MsgBox "Voice Prompt detected while dialing an OutBound call. "
End If
End Sub