Ejemplo n.º 1
0
        void AnyPhoneLine_Ringing(object sender, RingEventArgs e)
        {
            TapiEventLogEntry entry = new TapiEventLogEntry(
                e.Line.Name,
                -1,
                TapiEvents.Ringing,
                e.RingCount.ToString());

            this.Events.Insert(0, entry);
        }
Ejemplo n.º 2
0
        void AnyPhoneLine_NewCall(object sender, NewCallEventArgs e)
        {
            TapiEventLogEntry entry = new TapiEventLogEntry(
                e.Call.Line.Name,
                e.Call.GetHashCode(),
                TapiEvents.NewCall,
                e.Call.CallState.ToString());

            this.Events.Insert(0, entry);
        }
Ejemplo n.º 3
0
        void AnyPhoneLine_Changed(object sender, LineInfoChangeEventArgs e)
        {
            TapiEventLogEntry entry = new TapiEventLogEntry(
                e.Line.Name,
                -1,
                TapiEvents.Changed,
                e.Change.ToString());

            this.Events.Insert(0, entry);
        }
Ejemplo n.º 4
0
        void AnyPhoneLine_CallInfoChanged(object sender, CallInfoChangeEventArgs e)
        {
            TapiEventLogEntry entry = new TapiEventLogEntry(
                e.Call.Line.Name,
                e.Call.GetHashCode(),
                TapiEvents.CallInfoChanged,
                e.Change.ToString());

            this.Events.Insert(0, entry);
        }
Ejemplo n.º 5
0
        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;
            }
            }
        }