Ejemplo n.º 1
0
        public override void onEntry()
        {
            _smref.Incoming = true;

            int sessionId = _smref.Session;

            if ((_smref.Config.CFUFlag == true) && (_smref.Config.CFUNumber.Length > 0))
            {
                CallProxy.serviceRequest(sessionId, (int)EServiceCodes.SC_CFU, _smref.Config.CFUNumber);
            }
            else if (_smref.Config.DNDFlag == true)
            {
                CallProxy.serviceRequest(sessionId, (int)EServiceCodes.SC_DND, "");
            }
            else if (_smref.Config.AAFlag == true)
            {
                this.acceptCall(sessionId);
            }
            else
            {
                CallProxy.alerted(sessionId);
                _smref.Type = ECallType.EMissed;
                MediaProxy.playTone(ETones.EToneRing);
            }

            // if CFNR active start timer
            if (_smref.Config.CFNRFlag)
            {
                _smref.startTimer(ETimerType.ENOREPLY);
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Handle incoming call requests. Check for supplementary services flags.
        /// </summary>
        /// <param name="callingNo"></param>
        /// <param name="display"></param>
        public override void incomingCall(string callingNo, string display, IEnumerable <KeyValuePair <string, string> > headers)
        {
            // check supplementary services flags
            if ((_smref.Config.CFUFlag == true) && (_smref.Config.CFUNumber.Length > 0))
            {
                // do NOT notify about state changes
                _smref.DisableStateNotifications = true;
                CallProxy.serviceRequest((int)EServiceCodes.SC_CFU, _smref.Config.CFUNumber);
                this.endCall();
                return;
            }
            else if (_smref.Config.DNDFlag == true)
            {
                // do NOT notify about state changes
                _smref.DisableStateNotifications = true;
                CallProxy.serviceRequest((int)EServiceCodes.SC_DND, "");
                this.endCall();
                return;
            }

            _smref.CallingNumber = callingNo;
            _smref.CallingName   = display;
            _smref.Headers       = headers;
            _smref.ChangeState(EStateId.INCOMING);
        }
Ejemplo n.º 3
0
 public override bool serviceRequest(int code, string dest)
 {
     CallProxy.serviceRequest(code, dest);
     return(true);
 }
Ejemplo n.º 4
0
 /// <summary>
 /// No reply timer expired. Send service code to call proxy.
 /// </summary>
 /// <param name="sessionId"></param>
 /// <returns></returns>
 public override bool noReplyTimerExpired(int sessionId)
 {
     CallProxy.serviceRequest((int)EServiceCodes.SC_CFNR, _smref.Config.CFUNumber);
     return(true);
 }
Ejemplo n.º 5
0
 public override bool xferCall(string number)
 {
     // In fact this is not Tranfser. It's Deflect => redirect...
     return(CallProxy.serviceRequest((int)EServiceCodes.SC_CD, number));
 }
Ejemplo n.º 6
0
/*    public bool serviceRequest(EServiceCodes code, int session)
 *  {
 *    CallProxy.serviceRequest(code, session);
 *    return true;
 *  }
 */
        public bool serviceRequest(int sesionnId, int code, string dest)
        {
            CallProxy.serviceRequest(sesionnId, code, dest);
            return(true);
        }