Method: GetCurrentCall
|
Function: |
Get the current call of the current line. |
|
|
Parameters: |
None |
|
|
Description: |
GetCurrent call is used to get the current call. Possible return values are list below: CALL_ORIGINAL=0 CALL_CONSULTAION=1 CALL_CONFERENCE=2 This method make sense when the a consultaion transfer is made. Before StartTransfer is called, GetCurrentCall return 0; After StartTransfer called, it return 1; After CompleteTransfer called and the conference call created, Connected event will be invoked, and GetCurrentCall will return 2. |
|
| Dependencies: |
None |
|
| Events Raised: |
None |
|
| 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