Ejemplo n.º 1
0
        private void OnIncomingMonitoringCall(object sender, int call, CORESIP_CallInfo info, CORESIP_CallInInfo inInfo, CORESIP_Answer answer)
        {
            Debug.Assert(!_Froms.ContainsKey(call));
            TlfIaPosition from = new TlfIaPosition(1000);

            int code = from.HandleIncomingCall(call, -1, info, inInfo);

            Debug.Assert(code == SipAgent.SIP_RINGING);

            if (!from.IsTop)
            {
                answer.Value = SipAgent.SIP_NOT_ACCEPTABLE_HERE;
                return;
            }

            answer.Value             = 0;
            from.TlfPosStateChanged += OnFromMonitoringCallStateChanged;
            _Froms[call]             = from;

            General.SafeLaunchEvent(RemoteListenChanged, this, new ListenPickUpMsg(FunctionState.Executing, from.Literal, call));
        }