×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Feb 2011
    Posts
    37

    Getting own MSISDN

    I want to get my own SIM number using code.
    I have tried the below code but without success, any input is appreciated.

    RTelServer telServer;
    telServer.Connect();

    TInt n;
    telServer.EnumeratePhones(n); // n is 1;

    qDebug() <<"Enumerate phones"<<n;
    TFileName tsyName;
    telServer.GetTsyName(0, tsyName);

    TBool isSupported = EFalse;
    telServer.IsSupportedByModule(tsyName, KETelFuncMobileOwnNumberStore, isSupported); // is-supported is True

    RTelServer::TPhoneInfo info;
    telServer.GetPhoneInfo(0, info);

    RMobilePhone phone;
    int error = phone.Open(telServer, info.iName);
    qDebug()<<"RMobilePhone open"<< error;

    RMobileONStore ownNumberStore;
    error = ownNumberStore.Open(phone);
    RMobileONStore::TMobileONEntryV1 ownNumberEntry;
    ownNumberEntry.iIndex = 0;
    RMobileONStore::TMobileONEntryV1Pckg ownNumberEntryPckg(ownNumberEntry);

    AsyncWaiter* waiter1 = AsyncWaiter::NewL();
    ownNumberStore.Read(waiter1->iStatus,ownNumberEntryPckg);
    waiter1->StartAndWait();


    The result is an empty buf...?

    -thanks

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,167

    Re: Getting own MSISDN

    that's because most SIM cards are not having the number stored in the SIM card.

Similar Threads

  1. Replies: 3
    Last Post: 2007-01-25, 21:09

Posting Permissions

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