Beispiel #1
0
        private async void getCfBtn_Clicked(object sender, EventArgs e)
        {
            try
            {
                Log.Debug(Globals.LogTag, "Ss get call forward start");
                SsForwardResponse resp = await ss.SsGetForwardStatus(SsClass.Voice, SsForwardCondition.NotReachable);

                Log.Debug(Globals.LogTag, "Record num: " + resp.RecordNumber);
                List <SsForwardRecord> rec = resp.Record.ToList();
                for (int i = 0; i < resp.RecordNumber; i++)
                {
                    Log.Debug(Globals.LogTag, "[" + i + "] Class: " + rec[i].Class);
                    Log.Debug(Globals.LogTag, "[" + i + "] Status: " + rec[i].Status);
                    Log.Debug(Globals.LogTag, "[" + i + "] ForwardCondition: " + rec[i].ForwardCondition);
                    Log.Debug(Globals.LogTag, "[" + i + "] IsFwNumPresent: " + rec[i].IsForwardingNumberPresent);
                    Log.Debug(Globals.LogTag, "[" + i + "] NoReplyTime:: " + rec[i].NoReplyTime);
                    Log.Debug(Globals.LogTag, "[" + i + "] Ton: " + rec[i].Ton);
                    Log.Debug(Globals.LogTag, "[" + i + "] Npi: " + rec[i].Npi);
                    Log.Debug(Globals.LogTag, "[" + i + "] Number: " + rec[i].ForwardingNumber);
                }

                Log.Debug(Globals.LogTag, "Ss get call forward success");
            }

            catch (Exception ex)
            {
                Log.Debug(Globals.LogTag, "Ss get call forward exception: " + ex.ToString());
            }
        }
Beispiel #2
0
        private void Handle_CallForwardNotiEvent(object sender, NotificationChangedEventArgs e)
        {
            Log.Debug(Globals.LogTag, "Call forward noti event received");
            SsForwardResponse resp = (SsForwardResponse)e.Data;

            Log.Debug(Globals.LogTag, "Record number: " + resp.RecordNumber);
            List <SsForwardRecord> rec = resp.Record.ToList();

            for (int i = 0; i < resp.RecordNumber; i++)
            {
                Log.Debug(Globals.LogTag, "[" + i + "] Class: " + rec[i].Class);
                Log.Debug(Globals.LogTag, "[" + i + "] Status: " + rec[i].Status);
                Log.Debug(Globals.LogTag, "[" + i + "] ForwardCondition: " + rec[i].ForwardCondition);
                Log.Debug(Globals.LogTag, "[" + i + "] IsFwNumPresent: " + rec[i].IsForwardingNumberPresent);
                Log.Debug(Globals.LogTag, "[" + i + "] NoReplyTime:: " + rec[i].NoReplyTime);
                Log.Debug(Globals.LogTag, "[" + i + "] Ton: " + rec[i].Ton);
                Log.Debug(Globals.LogTag, "[" + i + "] Npi: " + rec[i].Npi);
                Log.Debug(Globals.LogTag, "[" + i + "] Number: " + rec[i].ForwardingNumber);
            }
        }
Beispiel #3
0
        private async void setCfBtn_Clicked(object sender, EventArgs e)
        {
            TapiHandle handle = Globals.handleModem0;

            try
            {
                Log.Debug(Globals.LogTag, "Ss set call forward start");
                handle.RegisterNotiEvent(Notification.SsNotifyForwarding);
                handle.NotificationChanged += Handle_CallForwardNotiEvent;
                SsForwardInfo     cfInfo = new SsForwardInfo(SsClass.Voice, SsForwardMode.Enable, SsForwardCondition.NotReachable, SsNoReplyTime.Time5Secs, SsForwardTypeOfNumber.National, SsForwardNumberingPlanIdentity.National, "9589874552");
                SsForwardResponse resp   = await ss.SsSetForwardInfo(cfInfo);

                Log.Debug(Globals.LogTag, "Record num: " + resp.RecordNumber);
                List <SsForwardRecord> rec = resp.Record.ToList();
                for (int i = 0; i < resp.RecordNumber; i++)
                {
                    Log.Debug(Globals.LogTag, "[" + i + "] Class: " + rec[i].Class);
                    Log.Debug(Globals.LogTag, "[" + i + "] Status: " + rec[i].Status);
                    Log.Debug(Globals.LogTag, "[" + i + "] ForwardCondition: " + rec[i].ForwardCondition);
                    Log.Debug(Globals.LogTag, "[" + i + "] IsFwNumPresent: " + rec[i].IsForwardingNumberPresent);
                    Log.Debug(Globals.LogTag, "[" + i + "] NoReplyTime:: " + rec[i].NoReplyTime);
                    Log.Debug(Globals.LogTag, "[" + i + "] Ton: " + rec[i].Ton);
                    Log.Debug(Globals.LogTag, "[" + i + "] Npi: " + rec[i].Npi);
                    Log.Debug(Globals.LogTag, "[" + i + "] Number: " + rec[i].ForwardingNumber);
                }

                Log.Debug(Globals.LogTag, "Ss set call forward success");
            }

            catch (Exception ex)
            {
                Log.Debug(Globals.LogTag, "Ss set call forward exception: " + ex.ToString());
            }

            finally
            {
                handle.DeregisterNotiEvent(Notification.SsNotifyForwarding);
                handle.NotificationChanged -= Handle_CallForwardNotiEvent;
            }
        }