Method: StartTransfer
|
Function: |
Start a consultation call transfer. |
|
|
Parameters: |
Number(String): The number to which the call is to be transfered.
The PBX string used to make a hook-flash.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 most PBXs, "!"
is used. A hook-flash means 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.
|
|
| Description: |
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.
After StartTransfer called, the line will make a hook-flash to the PBX and dial the number to transfer(This is termed as a consultation call), then start track the status of the consultation call.Possible status can be Connected, Busy, VoicePrompt, WaitConnectionTimeout. This seems same as the call status after Dial called.You may be confused by the distinguishing them. Use GetCurrentCall to get the index of the current call, you will be able to distinguish them. If it is a event Consultatioin Call, GetCurrentCall will return 1, otherwise it return 0.
|
|
| Dependencies: |
The call should be in connected status. |
|
| Events Raised: |
||
| Relevances: |
CompleteTransfer, 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()
va.StartTransfer "6230396","!"
End Sub
Sub va_Connected(LineIndex as Long, Style as Long)
If va.GetCurrentCall=1 Then
va.CompleteTransfer COMPLETE_TRANSFER_MODE_CONFERENCE, "!,3"
MsgBox "Consultation call connected while transfering.Transfer completed. "
ElseIf va.GetCurrentCall=0 Then
MsgBox "Connected after dialing an outbound call."
End If
End Sub
Sub va_Busy(LineIndex as Long)
If va.GetCurrentCall=1 Then
va.CancelTransfer "!,1"
MsgBox "Busy signal detected while transfering. Consultation call cancelled."
ElseIf va.GetCurrentCall=0 Then
MsgBox "Busy signal detected while dialing an OutBound call. "
End If
End Sub
Sub va_WaitConnectionTimeout(LineIndex as Long)
If va.GetCurrentCall=1 Then
va.CancelTransfer "!,1"
MsgBox "Timeout while transfering. Consultation call cancelled."
ElseIf va.GetCurrentCall=0 Then
MsgBox "Timeout while dialing an OutBound call. "
End If
End Sub
Sub va_VoicePromptDetected(LineIndex as Long)
If va.GetCurrentCall=1 Then
va.CancelTransfer "!,1"
MsgBox "Voice Prompt detected while transfering. Consultation call cancelled."
ElseIf va.GetCurrentCall=0 Then
MsgBox "Voice Prompt detected while dialing an OutBound call. "
End If
End Sub