Method: CancelTransfer
|
Function: |
Cancel a consultation call transfer. |
|
|
Parameters: |
CancelString: The PBX string used to cancel 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 "!,1" as the string to cancel a three-way call transfer. "!,1" means a hook-flash and then a short standstill, then pressing digit 1. It drop the consultation call and retrieve the original call. 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: |
CancelTransfer is used to cancel the consultation call which is not completed by CompleteTransfer, After CancelTransfer called, the consultation call will be droped and the original call will be retrieved. If the consultation call is under the DIALING status(the extention of the third party is ringing), calling CancelTransfer will stop the ring. If the consultation call is already answered by the third party, the will be dropped. When CancelTransfer is called, the current call should be the consultaction call(Use GetCurrentCall to determine which is the current call). As the original call is retrieved, a Connected event will be invoked with the style parameter set CONNECT_STYLE_CANCEL_TRANSFER. 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: |
|
|
| Events Raised: |
||
| Relevances: |
StartTransfer, CompleteTransfer, 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