예제 #1
0
        public void OnIncomingCallRespond(object sender, Responds.Respond respond)
        {
            var registeredCallInfo = GetConnectionInfo(respond.Source);

            if (registeredCallInfo != null)
            {
                switch (respond.State)
                {
                case Responds.RespondState.Drop:
                {
                    InterruptConnection(registeredCallInfo);
                    break;
                }

                case Responds.RespondState.Accept:
                {
                    MakeCallActive(registeredCallInfo);
                    break;
                }
                }
            }
            else
            {
                CallInfo currentCallInfo = GetCallInfo(respond.Source);
                if (currentCallInfo != null)
                {
                    this.InterruptActiveCall(currentCallInfo);
                }
            }
        }
예제 #2
0
 protected virtual void OnIncomingRespond(object sender, Responds.Respond respond)
 {
     if (this.IncomingRespond != null && ServerIncomingRequest != null)
     {
         this.IncomingRespond(sender, respond);
     }
 }