Exemplo n.º 1
0
        private void OnCallState(object sender, TapiCallStateEventArgs e)
        {
            TCall thisCall = e.Call;

            if (thisCall == activeCall)
            {
                switch (thisCall.CallState)
                {
                case CALL_STATE.CS_CONNECTED:
                    HandleCall();
                    break;

                case CALL_STATE.CS_DISCONNECTED:
                    DisconnectCall();
                    break;

                case CALL_STATE.CS_OFFERING:
                    AnswerCall();
                    break;

                default:
                    break;
                }
            }
        }
Exemplo n.º 2
0
Arquivo: mf2040.cs Projeto: uvigii/cls
 private void OnCallStateChange(object sender, TapiCallStateEventArgs e)
 {
     if (e.Call.Privilege == CALL_PRIVILEGE.CP_OWNER)
     {
         lbCalls.Items.Remove(e.Call);
         if (e.State != CALL_STATE.CS_DISCONNECTED)
         {
             lbCalls.Items.Add(e.Call);
         }
     }
 }
Exemplo n.º 3
0
        private void OnCallStateChanged(object sender, TapiCallStateEventArgs e)
        {
            TCall thisCall = e.Call;

            if (thisCall == currCall)
            {
                toolStripStatusLabel1.Text = "Call " + currCall.ToString();
                if (e.State == CALL_STATE.CS_DISCONNECTED)
                {
                    currCall = null;
                    thisCall.Address.Close();
                }
                CheckControls();
            }
        }
Exemplo n.º 4
0
        private void tapi_TE_CALLSTATE(object sender, TapiCallStateEventArgs e)
        {
            if (e.State == CALL_STATE.CS_CONNECTED && playbackTerminal != null)
            {
                // Start the playback message..
                playbackTerminal.Start();
            }
            else if (e.State == CALL_STATE.CS_DISCONNECTED)
            {
                // Stop recording when the call terminates.
                if (recordTerminal != null)
                {
                    recordTerminal.Stop();
                }

                recordTerminal   = null;
                playbackTerminal = null;
            }
        }