void ipClient_CallEnded(object sender, CallStateEventArgs e) { // Clear our DTMF events dtmfEvents[e.LineNumber].Clear(); RaiseCallEnded(new LineEventArgs(e.LineNumber)); }
private void NewOutgoingCall(CallStateEventArgs e) { Call newCall = new Call(e.Call); this.AllCalls.Insert(0, newCall); this.ActiveCalls.Insert(0, newCall); }
private void OnCallStateChanged(object sender, CallStateEventArgs e) { if (this.InvokeRequired) { EventHandler <CallStateEventArgs> eh = OnCallStateChanged; this.BeginInvoke(eh, new object[] { sender, e }); return; } TapiLine line = (TapiLine)sender; TapiCall call = e.Call; foreach (ListViewItem lvi in lvCalls.Items) { if (lvi.Tag == call) { lvi.SubItems[COLUMNS_STATE].Text = call.CallState.ToString(); if (GetActiveCall() == call) { AdjustButtonState(call); } if (call.CallState == CallState.Idle) { call.Dispose(); lvCalls.Items.Remove(lvi); } break; } } }
private void OnCallStateChange(object sender, CallStateEventArgs e) { if (e.Call == _call) { System.Threading.ThreadStart ts = ChangeButtons; BeginInvoke(ts, null); } }
private void Sm_CallStateChange(object sender, CallStateEventArgs e) { if (e.Call.State == pjsip_inv_state.PJSIP_INV_STATE_DISCONNECTED) { CallIncomingCallEnded(e.Call.CallingNumber); } CallStateChanged(); }
private static void CallStateChanged(object sender, CallStateEventArgs e) { Console.WriteLine("State Changed!"); Console.WriteLine(e.Call.CallerId); // Console.WriteLine(e.Call.TrunkId); // Console.WriteLine(e.Call.Address); // Console.WriteLine(e.Call.CalledId); // Console.WriteLine(e.Call.CallState); }
private void PickUpCall(CallStateEventArgs e) { var acceptedCall = (from current in this.AllCalls where current.Id == e.Call.GetHashCode() select current).FirstOrDefault(); if (acceptedCall != null) { acceptedCall.PickUp(); } this.OnPropertyChanged(nameof(ActiveCalls)); }
private void HangUpCall(CallStateEventArgs e) { var disconnectedCall = (from current in this.AllCalls where current.Id == e.Call.GetHashCode() select current).FirstOrDefault(); if (disconnectedCall != null) { disconnectedCall.HangUp(); this.ActiveCalls.Remove(disconnectedCall); } this.OnPropertyChanged(nameof(ActiveCalls)); }
void sm_CallStateChange(object sender, CallStateEventArgs e) { /*PJSIP.CallInfo ci = e.Call.getInfo(); * Console.WriteLine("Call State:"); * Console.WriteLine(ci.callIdString); * Console.WriteLine(ci.stateText);*/ foreach (Call call in sm.Calls.Values.ToList()) { Console.WriteLine("State: " + call.State + " : " + call.LastState); } Refresh(); }
void AnyPhoneLine_CallStateChanged(object sender, CallStateEventArgs e) { TapiEventLogEntry entry = new TapiEventLogEntry( e.Call.Line.Name, e.Call.GetHashCode(), TapiEvents.CallStateChanged, String.Format("old: {0} new: {1}", e.OldCallState, e.CallState)); this.Events.Insert(0, entry); switch (e.CallState) { case CallState.Connected: { this.PickUpCall(e); break; } case CallState.Disconnected: { this.HangUpCall(e); break; } case CallState.Ringback: { this.NewOutgoingCall(e); break; } case CallState.Accepted: { this.NewIncomingCall(e); break; } } }
void ipClient_FaxToneDetected(object sender, CallStateEventArgs e) { RaiseFaxToneDetected(new LineEventArgs(e.LineNumber)); }
void ipClient_FinishedSpeaking(object sender, CallStateEventArgs e) { RaiseFinishedSpeaking(new LineEventArgs(e.LineNumber)); }
void ipClient_SoundFinishedPlaying(object sender, CallStateEventArgs e) { RaiseSoundFinishedPlaying(new LineEventArgs(e.LineNumber)); }
void ipClient_CallOnHold(object sender, CallStateEventArgs e) { RaiseRemoteOnHold(new LineEventArgs(e.LineNumber)); }
void ipClient_AnsweringMachineGreetingFinished(object sender, CallStateEventArgs e) { RaiseAnswerDetectMachineGreetingFinished(new LineEventArgs(e.LineNumber)); }
void address_CallStateChanged(object sender, CallStateEventArgs e) { CallStateChanged(e, "Address"); }
void line_CallStateChanged(object sender, CallStateEventArgs e) { CallStateChanged(e, "Line"); }
private void CurrentAddress_CallStateChanged(object sender, CallStateEventArgs e) { if (sender == currentAddress) { string divState = ""; string value = ""; value = Enum.GetName(typeof(CallState), e.CallState); if (value != null && value != "") { divState += String.Format("- CallState '{0}'", value); } value = Enum.GetName(typeof(CallState), e.OldCallState); if (value != null && value != "") { divState += String.Format("- OldCallState '{0}'", value); } value = Enum.GetName(typeof(MediaModes), e.MediaModes); if (value != null && value != "") { divState += String.Format("- MediaModes '{0}'", value); } value = Enum.GetName(typeof(BearerModes), e.Call.BearerMode); if (value != null && value != "") { divState += String.Format("- BearerMode '{0}'", value); } value = e.Call.CalledId; if (value != null && value != "") { divState += String.Format("- CalledId '{0}'", value); } value = e.Call.CalledName; if (value != null && value != "") { divState += String.Format("- CalledName '{0}'", value); } value = e.Call.CallerId; if (value != null && value != "") { divState += String.Format("- CallerId '{0}'", value); } value = Enum.GetName(typeof(CallReasons), e.Call.CallReason); if (value != null && value != "") { divState += String.Format("- CallReason '{0}'", value); } value = e.Call.ConnectedId; if (value != null && value != "") { divState += String.Format("- ConnectedId '{0}'", e.Call.ConnectedId); } value = e.Call.ConnectedName; if (value != null && value != "") { divState += String.Format("- ConnectedName '{0}'", value); } value = e.Call.DataRate.ToString(); if (value != null && value != "0") { divState += String.Format("- DataRate (bps) '{0}'", value); } value = e.Call.Id.ToString(); if (value != null && value != "0") { divState += String.Format("- Id '{0}'", value); } //e.Call.Features //e.Call.MediaDetection value = Enum.GetName(typeof(MediaModes), e.Call.MediaMode); if (value != null && value != "") { divState += String.Format("- MediaMode of Owner '{0}'", value); } value = Enum.GetName(typeof(Privilege), e.Call.Privilege); if (value != null && value != "") { divState += String.Format("- Privilege '{0}'", value); } value = e.Call.UserUserInfo; if (value != null && value != "") { divState += String.Format("- UserInfo '{0}'", value); } if (divState != lastAddressDetailStates) { App.log("TAPI Adress state changed " + divState); } lastAddressDetailStates = divState; } else { App.log("TAPI Address - raised State changed event belongs not to the current Address!"); } }
void manager_CallStateChanged(object sender, CallStateEventArgs e) { Call c = getCall(e.Call.Address.Address, e.Call.Id.ToString()); if (c != null) { switch (e.CallState) { case CallState.Connected: switch (c.type) { case CallType.missed: c.type = CallType.received; putCall(c, e.Call.Address.Address); break; case CallType.placed: c.callee = e.Call.CalledId; putCall(c, e.Call.Address.Address); break; } break; case CallState.Disconnected: c.endTime = DateTime.Now; AddCall(c, e.Call.Address.Address); break; case CallState.Idle: if (e.OldCallState != CallState.Idle && e.OldCallState != CallState.Disconnected) { c.endTime = DateTime.Now; AddCall(c, e.Call.Address.Address); } break; } } else { c = new Call(); c.callee = e.Call.CalledId; c.caller = e.Call.CallerId; c.callId = e.Call.Id.ToString(); c.startTime = DateTime.Now; switch (e.Call.CallState) { case CallState.Accepted: //first missed c.type = CallType.missed; break; case CallState.Dialing: //placed c.type = CallType.placed; break; case CallState.Dialtone: //placed c.type = CallType.placed; break; case CallState.Offering: //first missed c.type = CallType.missed; break; } putCall(c, e.Call.Address.Address); } CallStateChanged(e, "Manager"); }
void CallStateChanged(CallStateEventArgs e, string from) { log.Debug(from + " Call state changed: " + e.Call.ToString() + ", old state:" + e.OldCallState.ToString() + ", new call state:" + e.CallState.ToString() + " Extension: " + e.Call.Address.ToString()); ss.SetLineControl(GetLineControl(e.Call.Address)); }
void ipClient_TransferSucceeded(object sender, CallStateEventArgs e) { RaiseTransferSucceeded(new LineEventArgs(e.LineNumber)); }
static void SkypeManager_CallStateChanged(object sender, CallStateEventArgs e) { PrintState(e.Participant, skypeManager.IsMuted); }
void ipClient_TransferFailed(object sender, CallStateEventArgs e) { RaiseTransferFailed(new LineEventArgs(e.LineNumber)); }
void ipClient_CallEnded(object sender, CallStateEventArgs e) { HangUp(); lblStatus.Text = CallButler.Manager.Utils.PrivateLabelUtils.ReplaceProductName(Properties.LocalizedStrings.TestDriveView_ReadyForCall); lblNumbers.Text = ""; }