private void OnFinished(object sender) { if ((_State == IntrusionState.On) && (_AssociateCall.CallId >= 0)) { SipAgent.SendInfo(_AssociateCall.CallId, INTRUSION_COMPLETED); } _Conference = null; Dispose(); }
private bool CompleteIntrusion() { Debug.Assert(_State != IntrusionState.Off); Debug.Assert(_AssociateCall != null); Debug.Assert(_AssociateCall.State == TlfState.InPrio); Debug.Assert(_Conference != null); try { SipAgent.AnswerCall(_AssociateCall.CallId, SipAgent.SIP_INTRUSION_IN_PROGRESS); Top.Tlf.SetShortTone(1000, "Warning_Operator_Intervening.wav"); } catch (Exception ex) { _Logger.Error("ERROR notificando intrusion en progreso a llamada prioritaria " + _AssociateCall.Literal, ex); } try { _Conference.TryAddIncoming(_AssociateCall); _State = IntrusionState.On; _AssociateCall.TlfPosStateChanged -= OnAssociateCallStateChanged; } catch (Exception ex) { _Logger.Error("ERROR aceptando llamada prioritaria " + _AssociateCall.Literal, ex); return(false); } foreach (TlfPosition tlf in _Conference.Members) { SipAgent.SendInfo(tlf.CallId, INTRUSION_IN_PROGRESS); } return(true); }