/// <summary> /// An active call ends, so it removes from the active call collection. /// </summary> /// <param name="sender">CustmerCall object</param> /// <param name="e"> Not used.</param> void call_Closing(object sender, EventArgs e) { CustomerCall customerCall = sender as CustomerCall; customerCall.NotifyAction -= call_NotifyAction; customerCall.Closing -= call_Closing; activeCalls.Remove(customerCall); }
/// <summary> /// Incoming call events that occur in IAPIExtension. /// </summary> /// <param name="sender">The SoftPhone.</param> /// <param name="e">The incomming call.</param> void extension_IncomingCall(object sender, VoIPEventArgs <ICall> e) { OnNotifyAction(string.Format("Incoming call received, caller is {0}", e.Item.OtherParty)); CustomerCall call = new CustomerCall(e.Item, ivrProject.GetNewMenuroot()); call.NotifyAction += new EventHandler <VoIPEventArgs <string> >(call_NotifyAction); call.Closing += new EventHandler(call_Closing); call.PhoneCall.Accept(); activeCalls.Add(call); }
/// <summary> /// Incoming call events that occur in IAPIExtension. /// </summary> /// <param name="sender">The SoftPhone.</param> /// <param name="e">The incomming call.</param> void extension_IncomingCall(object sender, VoIPEventArgs<ICall> e) { OnNotifyAction(string.Format("Incoming call received, caller is {0}", e.Item.OtherParty)); CustomerCall call = new CustomerCall(e.Item, ivrProject.GetNewMenuroot()); call.NotifyAction += new EventHandler<VoIPEventArgs<string>>(call_NotifyAction); call.Closing += new EventHandler(call_Closing); call.PhoneCall.Accept(); activeCalls.Add(call); }