a simple observer, but where is the error from?

Login to reply to this topic.
Thu, 2005-03-10 12:03
Joined: 2004-11-20
Forum posts: 67
What is the wrong in my code?
I am using Etelmm.h and the platform is 6600 nokia,

++++++++++++++++++++++
at first  iIsMakedDial = false
+++++++++++++++++++++++

void  CCallObserver::RunL()
{
        if (iStatus == KErrNone)
        {
           if(iCallStatus == RCall::EStatusDialling)
           {
             if(iIsMakedDial)  // 2- Second step(in 1, I called Dial, so the dialing state again)
            {
               iIsMakedDial = false;
               iPhone.SendDTMFTones(iStatus,_L("ppp123456"));
             }
             else    //  1- at first this block will be run
             {
                   iIsMakedDial = true;

                   RLine::TLineInfo lineInfo;
                   iLine.GetInfo(lineInfo);
                   iCall.OpenExistingCall(iLine, lineInfo.iNameOfLastCallAdded);

                   iCall.HangUp();
                   iCall.Close();

                   TBuf <100> newCallName;
                   iCall.OpenNewCall(iLine, newCallName);
                   iCall.Dial(iStatus,_L("0323232"));
             }
           }
           else
           {
             iLine.NotifyStatusChange(iStatus, iCallStatus);
           }
           SetActive();
        }
        else
        {
           WriteToFile(iStatus.Int());
        }
}
+++++++++++++++++++++++++++++++++++++

In second phase I hear DTMF sending (It sent successfully) but suddenly i get a panic error in screen,
MeanWhile the iStatus = KErrNone (without any error)
the panic message is:  App.Closed Main

AND another problem:

Whenever I call, iLine.NotifyStatusChange, the iStatus gets this value: -9
(KErrOverFlow)

How can I increase the buffersize of events???

I need your guidance...

Fri, 2005-12-30 12:35
Joined: 2004-12-03
Forum posts: 53
Re: a simple observer, but where is the error from?
First I noticed that when connected phone send to observer RCall::EStatusUnknown instead RCall::EStatusConnected. The status RCall::EStatusDialing should mean that you are dialing... So this is not a place for sending DTMF.

My code:
// If phone is connected , system throw EStatusUnknown instead EStatusConnected while testing on SX1 and 6600
      if(NewStatus==RCall::EStatusUnknown && iStatusPolaczenia==kStatusDialing)
      {
         NewStatus=RCall::EStatusConnected;

      }

      if(iCallStatus.Int() ==  KErrNone))
      {
         
         if(NewStatus==RCall::EStatusConnected)
         {
            if(iStatusPolaczenia==kStatusDialing)
            {
                  notifier->Note(_L8("Connected"));
                      iStatusPolaczenia=kStatusConnected;

//if timetowait != 0 notify to wait some time
                  TimeToWait=5;         

                  observer->CallStart();
            }
            else if(iStatusPolaczenia==kStatusConnected)
            {
                  notifier->Note(_L8("Connected and Intenal"));

                  iStatusPolaczenia=kStatusInternalDialing;
                  DialInternalNumberL();
                  iStatusPolaczenia=kStatusCall;
//if timetowait = 0 notify to set notifier
                  TimeToWait=0;   
            }
         }
         else
         if(NewStatus==RCall::EStatusIdle || NewStatus==RCall::EStatusHangingUp)
         {

            iStatusPolaczenia=kStatusHangUp;

            TTimeIntervalSeconds duration=0;
            
            call.GetCallDuration(duration);

            EndConnectionL();

            notifier->Note(_L8("Hangup"));

            observer->CallEnd(duration);

            return;
         }
         else notifier->Note(_L8("Unknown..."));


      }
      else// ! kErrNone
      {
         notifier->Note(_L8("Error in status"));
         EndConnectionL();
      }

here is waiting or calling notifier

Its works perfectly with only one bad thing... If incomming call is comming while class is not deleted there is a commotion


Regards
Wojtek

Wojciech Freliszka
NinthBit

  • Login to reply to this topic.