private void OnCallState(object sender, TapiCallStateEventArgs e) { TCall thisCall = e.Call; if (thisCall == activeCall) { switch (thisCall.CallState) { case CALL_STATE.CS_CONNECTED: HandleCall(); break; case CALL_STATE.CS_DISCONNECTED: DisconnectCall(); break; case CALL_STATE.CS_OFFERING: AnswerCall(); break; default: break; } } }
private void OnCallStateChange(object sender, TapiCallStateEventArgs e) { if (e.Call.Privilege == CALL_PRIVILEGE.CP_OWNER) { lbCalls.Items.Remove(e.Call); if (e.State != CALL_STATE.CS_DISCONNECTED) { lbCalls.Items.Add(e.Call); } } }
private void OnCallStateChanged(object sender, TapiCallStateEventArgs e) { TCall thisCall = e.Call; if (thisCall == currCall) { toolStripStatusLabel1.Text = "Call " + currCall.ToString(); if (e.State == CALL_STATE.CS_DISCONNECTED) { currCall = null; thisCall.Address.Close(); } CheckControls(); } }
private void tapi_TE_CALLSTATE(object sender, TapiCallStateEventArgs e) { if (e.State == CALL_STATE.CS_CONNECTED && playbackTerminal != null) { // Start the playback message.. playbackTerminal.Start(); } else if (e.State == CALL_STATE.CS_DISCONNECTED) { // Stop recording when the call terminates. if (recordTerminal != null) { recordTerminal.Stop(); } recordTerminal = null; playbackTerminal = null; } }