private void OnDisconnect(object sender, EventArgs e) { if (currCall != null) { try { currCall.Disconnect(DISCONNECT_CODE.DC_NORMAL); } catch (TapiException ex) { toolStripStatusLabel1.Text = ex.Message; } } }
private void OnCallMedia(object sender, TapiCallMediaEventArgs e) { try { if (activeCall != null && e.Event == CALL_MEDIA_EVENT.CME_STREAM_ACTIVE && e.Terminal.Direction == TERMINAL_DIRECTION.TD_CAPTURE && playbackTerminal != null) { playbackTerminal.Start(); SetStatusMessage("File Playback Terminal started "); } } catch (TapiException ex) { MessageBox.Show(ex.Message); activeCall.Disconnect(DISCONNECT_CODE.DC_NORMAL); } }
private void OnDisconnectClicked(object sender, EventArgs e) { TCall call = (TCall)lbCalls.SelectedItem; try { call.Disconnect(DISCONNECT_CODE.DC_NORMAL); } catch (Exception ex) { MessageBox.Show(ex.ToString()); } }
private void OnNewCall(object sender, TapiCallNotificationEventArgs e) { TCall thisCall = e.Call; if (thisCall.Privilege == CALL_PRIVILEGE.CP_OWNER) { if (activeCall != null) { thisCall.Disconnect(DISCONNECT_CODE.DC_REJECTED); } else { activeCall = thisCall; } } }
private void OnNewCall(object sender, TapiCallNotificationEventArgs e) { TCall newCall = e.Call; // If we are the owner of the call.. if (newCall.Privilege == CALL_PRIVILEGE.CP_OWNER) { if (currCall != newCall) { try { newCall.Disconnect(DISCONNECT_CODE.DC_REJECTED); } catch (TapiException ex) { toolStripStatusLabel1.Text = ex.Message; } } else { toolStripStatusLabel1.Text = "Call " + newCall.ToString(); } } }