示例#1
0
        public void IncomingRespond(Respond incomingRespond)
        {
            OnIncomConnection(this, incomingRespond.Request);

            //Console.WriteLine("Current number:" + this.PhoneNumber);
            Console.WriteLine("Incoming Call From: " + incomingRespond.Request.Caller);
            Console.WriteLine("Incoming Call To: " + incomingRespond.Request.Receiver);

            switch (incomingRespond.Code)
            {
            case Respond.Accept:
                Console.WriteLine("Accepted");
                OnCallAccepted(this, incomingRespond.Request);
                break;

            case Respond.Drop:
                Console.WriteLine("Dropped");
                OnDropConnection(this, incomingRespond.Request);
                break;

            default:
                break;
            }
        }
示例#2
0
 protected virtual void OnIncomRespond(object sender, Respond e)
 {
     IncomRespond?.Invoke(sender, e);
 }