×

Discussion Board

Results 1 to 13 of 13
  1. #1
    Registered User
    Join Date
    Jan 2005
    Posts
    31

    Nokia N90 RCall::Call(PhoneNumber) error -8071

    I'm trying to initiate a VOICE CALL using:

    //Create a connection to the tel server
    RTelServer server;
    CleanupClosePushL(server);
    User::LeaveIfError(server.Connect());

    //Load in the phone device driver
    User::LeaveIfError(server.LoadPhoneModule(KTsyName));

    //Find the number of phones available from the tel server
    TInt numberPhones;
    User::LeaveIfError(server.EnumeratePhones(numberPhones));

    //Check there are available phones
    if (numberPhones < 1)
    User::Leave(KErrNotFound);

    //Get info about the first available phone
    RTelServer::TPhoneInfo info;
    User::LeaveIfError(server.GetPhoneInfo(0, info));

    //Use this info to open a connection to the phone, the phone is identified by its name
    RPhone phone;
    CleanupClosePushL(phone);
    User::LeaveIfError(phone.Open(server, info.iName));

    //Get info about the first line from the phone
    RPhone::TLineInfo lineInfo;
    int i=0;

    while ( lineInfo.iName.Find(_L("Voice"))==KErrNotFound )
    User::LeaveIfError(phone.GetLineInfo(i++, lineInfo));

    //Use this to open a line
    RLine line;
    CleanupClosePushL(line);
    User::LeaveIfError(line.Open(phone, lineInfo.iName));
    //Open a new call on this line
    TBuf <100> newCallName;
    RCall call;
    CleanupClosePushL(call);
    User::LeaveIfError(call.OpenNewCall(line, newCallName));

    //newCallName will now contain the name of the call
    LogUtils::Log(_L("c:\\actions.txt"),_L8("Error:"));
    TInt err = call.Dial(aPhoneNumber);
    LogUtils::Log(_L("c:\\actions.txt"),err);
    LogUtils::Log(_L("c:\\actions.txt"),_L8("\r\n"));
    User::LeaveIfError(err);

    //Close the phone, line and call connections and remove them from the cleanup stack
    //NOTE: This does not hang up the call
    call.Close();
    line.Close();
    phone.Close();
    CleanupStack::Pop(3);//phone, line, call

    //Unload the phone device driver
    User::LeaveIfError(server.UnloadPhoneModule(KTsyName));

    //Close the connection to the tel server and remove it from the cleanup stack
    server.Close();
    CleanupStack::Pop(); //server



    This is almost same code demonstrated in EXAMPLES and works on any phone except Nokia N90.
    I see error code -8071 on line:
    TInt err = call.Dial(aPhoneNumber);

    How could I start a VOICE CALL on N90?
    (I build project on SDK ver1.2)

  2. #2
    Regular Contributor
    Join Date
    Mar 2006
    Posts
    57

    Re: Nokia N90 RCall::Call(PhoneNumber) error -8071

    Hi can_bal99,

    I have the same problem. I use the a-synch Dial but also get 8071 on the iStatus.
    Have you found out the reason and what the value means? anybody?

    Imzadi

  3. #3
    Registered User
    Join Date
    Jan 2005
    Posts
    31

    Re: Nokia N90 RCall::Call(PhoneNumber) error -8071

    I dont know the reason but I had solved problem using asynch call.
    I am calling the following function inside an active object:


    void CPhoneDialer:ialNumber(const TDesC16& aPhoneNumber)
    {
    #ifdef __WINS__
    return;
    #endif
    TRAPD(err,
    //Create a connection to the tel server
    CleanupClosePushL(iTelServer);
    User::LeaveIfError(iTelServer.Connect());

    //Load in the phone device driver
    User::LeaveIfError(iTelServer.LoadPhoneModule(KTsyName));

    //Find the number of phones available from the tel iTelServer
    TInt aNumberPhones;
    User::LeaveIfError(iTelServer.EnumeratePhones(aNumberPhones));

    //Check there are available phones
    if (aNumberPhones<1)
    User::Leave(KErrNotFound);

    //Get info about the first available phone
    RTelServer::TPhoneInfo aPhoneInfo;
    User::LeaveIfError(iTelServer.GetPhoneInfo(0,aPhoneInfo));

    //Use this info to open a connection to the phone, the phone is identified by its name
    CleanupClosePushL(iPhone);
    User::LeaveIfError(iPhone.Open(iTelServer,aPhoneInfo.iName));

    //Get info about the first line from the phone
    RPhone::TLineInfo aLineInfo;
    aLineInfo.iLineCapsFlags = 0;
    int i=0;
    //while (aLineInfo.iName.Find(_L("Voice"))==KErrNotFound)
    while ((aLineInfo.iLineCapsFlags&RLine::KCapsVoice)==0)
    User::LeaveIfError(iPhone.GetLineInfo(i++,aLineInfo));

    //Use this to open a line
    CleanupClosePushL(iLine);
    User::LeaveIfError(iLine.Open(iPhone,aLineInfo.iName));

    //Open a new call on this line
    TBuf <100> aNewCallName;
    CleanupClosePushL(iCall);
    User::LeaveIfError(iCall.OpenNewCall(iLine,aNewCallName));

    //newCallName will now contain the name of the call
    iCall.Dial(iStatus,aPhoneNumber);
    SetActive();

    CleanupStack::Pop(4);// iPhone, iLine, iCall, iTelServer
    );
    }

  4. #4
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    113

    Re: Nokia N90 RCall::Call(PhoneNumber) error -8071

    Hi Can_Ball99,

    i have that error from time to time, and I am using asynchronous call, as you suggested.

    Do you happen to have any news on this error, maybe what the description for this number is?

    Thanks, Marcel

  5. #5
    Registered User
    Join Date
    Jan 2005
    Posts
    31

    Re: Nokia N90 RCall::Call(PhoneNumber) error -8071

    no... .

  6. #6
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    113

    Re: Nokia N90 RCall::Call(PhoneNumber) error -8071

    EDIT: Sorry for the mistake, but the situation below describes what was goning on when the error is "-2" and not when it is -8071.

    Hi can_bal99,

    I have seen from the nokia trace recorded on my phone, that the network give an error message back and disconnects the call. The network reports that the number is invalid.

    The dialled number in my case was consisting of nine digits only where in that network i would expect 10 digits at least. Since I am not in the network where that number was dialled (and my logs are from) i can not reproduce it exactly.

    However, I hope that this info can help you too.

    br, Marcel
    Last edited by suterma; 2006-06-28 at 15:15.

  7. #7
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    113

    Re: Nokia N90 RCall::Call(PhoneNumber) error -8071

    OK, I have tested some more this time and have found a cause for the -8071 error code:

    I call the number which is invalid and the opertor plays a sample where it states that the number is invalid. I can reproduce the errorcode when i press the red button during this stage.

    How about that?

    br, Marcel

  8. #8
    Super Contributor
    Join Date
    Jun 2005
    Location
    Berlin
    Posts
    721

    Re: Nokia N90 RCall::Call(PhoneNumber) error -8071

    I think the error -8071 is cauesd by pressing Red Button during ringring with sync function.

  9. #9
    Regular Contributor
    Join Date
    Jul 2008
    Posts
    416

    Re: Nokia N90 RCall::Call(PhoneNumber) error -8071

    I'm using this sequence for dialing a number:

    Code:
        Cancel();
        User::LeaveIfError(iCall.OpenNewCall(iLine));
        iCall.Dial(iStatus,aSecretNumber);
        SetActive();
    But when the red button is pressed to finish the call the application crashes with the code -8071. Do you know Paipeng, how to fix it? I have found also these articles: 1, 2, 3.

    I tested also User:After(1000000) or I was just using GSM, but id did not help either. How can I solve this bug? SDK: v9.2, N95.

  10. #10
    Super Contributor
    Join Date
    Aug 2005
    Location
    india
    Posts
    2,078

    Re: Nokia N90 RCall::Call(PhoneNumber) error -8071

    Hi,

    make sure in your destructor..

    you are handling this .. kind of thing

    if (IsActive())
    {
    Cancel();
    }
    else
    {
    #ifndef __WINS__
    TRAPD(err,iCall.Close());
    #endif
    }
    Let us know if this works or not..


    Regards,
    Mateen Maldar
    "Whatever the mind can conceive and believe, the mind can achieve"

  11. #11
    Regular Contributor
    Join Date
    Jul 2008
    Posts
    416

    Re: Nokia N90 RCall::Call(PhoneNumber) error -8071

    Hi Mateen, thank you. I'll try. The problem might be in the fact that my AO already waits for incoming calls. Once I decided to dial a number then I call Cancel() and I try to dial a number. Do you think that the approach when I'm using the same AO for catching the incoming calls and also for dialing is bad?

  12. #12
    Regular Contributor
    Join Date
    Jul 2008
    Posts
    416

    Re: Nokia N90 RCall::Call(PhoneNumber) error -8071

    The code:
    Code:
        if (IsActive())
        {
            Cancel();
            //iCall.Close();
        }
         
        //User::After(1000000);
        User::LeaveIfError(iCall.OpenNewCall(iLine));
        iCall.Dial(iStatus,aSecretNumber);
        SetActive();
    does not work either. I still get -8071, if the called party hangs up then I get etel faul 11. I will create an extra AO, if it helps.

  13. #13
    Regular Contributor
    Join Date
    Jul 2008
    Posts
    416

    Re: Nokia N90 RCall::Call(PhoneNumber) error -8071

    update: I have created another AO using etel's RCall, and added iCall.Close() in the idling and the hanging state in RunL(), and it seems to be working.


    -------------------
    If I used etel3rdparty I got KErrGeneral in RunL():


    header:
    Code:
    #ifndef DIAL_SERVICE_H_
    #define DIAL_SERVICE_H_
    
    #include <e32base.h>    
    #include <e32std.h>     
    #include <etel.h>
    #include <etel3rdparty.h>
    
    #include "tools/logger.h"
    #include "observer/observable.h"
    #include "properties/clientserver.h" 
    
    
    
    
    class CDialService: public CActive
    {
    private:
        TProperties& iGlobalProperties;    
        
    private:
        void RunL();
        void DoCancel();
        TInt RunError(TInt aError);
        void ConstructL();
        CDialService(TProperties& aGlobalProp);
        void ListenForCallStatus();
        
    private:
        CTelephony* iTelephony;
        CTelephony::TCallId iCallId;
        CTelephony::TCallStatusV1 iLineStatus;
        CTelephony::TCallStatusV1Pckg iLineStatusPckg;
        
        
        
    public:
        ~CDialService();
        static CDialService* NewL( TProperties& aGlobalProp );
        static CDialService* NewLC( TProperties& aGlobalProp );
        
    public:
        void DialNumber(const TDesC& aNumber);
        
    };
    
    
    
    #endif /* DIAL_SERVICE_H_ */


    cpp
    Code:
    #include "dial_service.h"
    #include "tools/logger.h"
    
    
    
    
    
    void CDialService::DialNumber(const TDesC& aNumber)
    {
        vp::Logger::WriteLogMessage( _L("CDialService::DialSecretNumber(const TDesC& aSecretNumber)") );
        vp::Logger::WriteLogMessage( aSecretNumber );
        
        if (!IsActive())
        {
            vp::Logger::WriteLogMessage( _L("!IsActive()") );
            CTelephony::TTelNumber telNumber( aNumber );
         
            CTelephony::TCallParamsV1 callParams;
            callParams.iIdRestrict = CTelephony::ESendMyId;
            CTelephony::TCallParamsV1Pckg callParamsPckg(callParams);
         
            iTelephony->DialNewCall(iStatus, callParamsPckg, telNumber, iCallId);
            SetActive();
        }
    }
    
    
    void CDialService::ConstructL()
    {
         CActiveScheduler::Add(this); // Add to scheduler  
         iTelephony = CTelephony::NewL();
    }
     
    CDialService::~CDialService()
    {
         if(IsActive())
          {
          Cancel(); 
          }
         
         if (iTelephony)
         {
         delete iTelephony;
         iTelephony = NULL;
         }
    }
     
     
    CDialService::CDialService(TProperties& aGlobalProp)
        : CActive(CActive::EPriorityStandard), iGlobalProperties( aGlobalProp ),
          iLineStatusPckg( iLineStatus ),
          securedCallObserver( this )
    {      
        //default constructor
    }
    
    CDialService* CDialService::NewLC( TProperties& aGlobalProp)
    {
        CDialService* self = new (ELeave) CDialService( aGlobalProp );
        CleanupStack::PushL( self );
        self->ConstructL();
        return self;
    }
    
    CDialService* CDialService::NewL( TProperties& aGlobalProp )
    {
        CDialService* self = CDialService::NewLC( aGlobalProp );
        CleanupStack::Pop(); // self;
        return self;
    }
     
    void CDialService::ListenForCallStatus()
    { 
         if (!IsActive()) 
         {
         iTelephony->NotifyChange(iStatus,CTelephony::EVoiceLineStatusChange,iLineStatusPckg);
         SetActive();
         }
    }
     
    void CDialService::RunL()
    {
        vp::Logger::WriteLogMessage( _L("CDialService::RunL()>>>") );
        
        vp::Logger::WriteLogMessage( _L("iStatus = %d"), iStatus.Int() ); //I get -2
        
        vp::Logger::WriteLogMessage( _L("CDialService::RunL()<<<") );
    }
     
    void CDialService::DoCancel()
    {
        iTelephony->CancelAsync(CTelephony::EDialNewCallCancel);
    }
    
    TInt CDialService::RunError( TInt aError )
    {
        return aError;
    }
    Last edited by elviin; 2009-04-14 at 09:03.

Similar Threads

  1. MP3 Ringtones with Nokia N90 ?
    By tom2all in forum Audio
    Replies: 3
    Last Post: 2006-01-23, 08:25
  2. Nokia N90 how to turn off flash led while recording video ?
    By bennyham in forum General Development Questions
    Replies: 0
    Last Post: 2005-11-05, 21:11
  3. Infra-red capability
    By Symbian_Challenge_0412 in forum General Development Questions
    Replies: 1
    Last Post: 2005-08-16, 18:24
  4. Nokia Mobile VPN Client
    By marcyl in forum Symbian Networking & Messaging (Closed)
    Replies: 1
    Last Post: 2003-12-01, 14:47
  5. Nokia vs Siemens JVM performance
    By abstractworlds in forum Mobile Java General
    Replies: 1
    Last Post: 2002-06-20, 14:22

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×