Retrieving the dialed number in P800/P910.

For a long time there has been this issue about retrieving the dialed number in UIQ devices. There have been numerous posts about the same where developers have complained about getting empty values when they query the number being dialed in the current call.

So here is the code for getting the dialed number of the present call. This blocking version of the code is only for the article. I have provided both the blocking/non-blocking versions in the demo application. Only the non-blocking version seems to run on the phone. The code as such is self explanatory .

void CExampleAppUi::GetRemotePartyNumber()
{
        TApaTaskList iTaskList(CEikonEnv::Static()->WsSession());       
        const TUid KUiduiqCall = { 0x101F6163 };
        TApaTask iThisTask = iTaskList.FindApp(KUiduiqCall);

        RAdvGsmPhone iPhone;
        RTelServer iServer;
        RTelServer::TPhoneInfo iPhoneInfo;
        RPhone::TLineInfo iLineInfo;
        RCall::TStatus iCallStatus;
        RAdvGsmCall iCall;
        RLine iLine;
        TRequestStatus iStatus;

        iServer.Connect();
        iServer.LoadPhoneModule( KGsmModuleName );
        TInt enumphone;
        User::LeaveIfError(iServer.EnumeratePhones(enumphone));
        if (enumphone < 1) {
                   User::Leave(KErrNotFound);
        }
        //Initialise the phone object
        User::LeaveIfError(iServer.GetPhoneInfo(0, iPhoneInfo));
        User::LeaveIfError(iPhone.Open(iServer, iPhoneInfo.iName));
        User::LeaveIfError(iPhone.GetLineInfo(0,iLineInfo));
        User::LeaveIfError(iLine.Open(iPhone,iLineInfo.iName));
       
        iStatus = KRequestPending;
        //first send the app to the background
        iThisTask.SendToBackground();
       
        iLine.NotifyStatusChange(iStatus, iCallStatus);
        User::WaitForRequest(iStatus);
        if(iStatus.Int()==KErrNone){
                switch(iCallStatus){
                        case RCall::EStatusDialling :
                        {
                                //come to the foreground
                                iThisTask.BringToForeground();
                                //now get the number of the present call
                                 RLine::TLineInfo lineInfo;
                             iLine.GetInfo(lineInfo);
                              iCall.OpenExistingCall(iLine, lineInfo.iNameOfLastCallAdded);
                              TBuf<20> myDialedNumber;
                              TBuf<20> myRemoteNumber;
                                RAdvGsmCall::TDialledNumberInfo myDialedNumberInfo;
                                RAdvGsmCall::TRemotePartyInfo myRemoteNumberInfo;
                                iCall.GetDialledNumberInfo(myDialedNumberInfo);
                                iCall.GetRemotePartyInfo(myRemoteNumberInfo);
                                myDialedNumber = myDialedNumberInfo.iNumber.iTelNumber;
                                myRemoteNumber = myRemoteNumberInfo.iNumber.iTelNumber;
                              iCall.HangUp();                               
                                CEikonEnv::InfoWinL(_L("Dialed number : "),myDialedNumber);
                                CEikonEnv::InfoWinL(_L("Remote party number : "),myRemoteNumber);

                      }
                        break;
                }
        }
        //cleanup stuff ,close all sessions        
        iCall.Close();
        iLine.Close();
        iPhone.Close();
        iServer.UnloadPhoneModule(KGsmModuleName);
        iServer.Close();


}

Also please do READ the readme.txt provided with the demo application as it has directions about the files which you need to compile the demo application.

Lastly , I would like to thank Tomer Egozi for helping me.

uiqCall.zip
uiqCall.zip

Please post all the queries regarding this issue on the forum.
Tutorial posted August 29th, 2005 by mayur241 categories [ ]

Hi Mayur Kankanwadi,

Hi Mayur Kankanwadi,

I compiled your demo uiqcall for UIQ2.1 but i get the following linking errors for RAdvGsmPhone i have add all headers,libs and dll in my sdk which you mention in readme.txt provided by you kindly look into the matter.

Thanks In Advance

Doing first-stage link by name
link.exe @C:\DOCUME~1\Computer\LOCALS~1\Temp\nma03324.
   Creating library \Symbian\UIQ_21\EPOC32\BUILD\SYMBIAN\UIQ_21\UIQEXAMPLES\UIQCALL\UIQCALL\WINS\UDEB\UIQCALL.lib and object \Symbian\UIQ_21\EPOC32\BUILD\SYMBIAN\UIQ_21\UIQEXAMPLES\UIQCALL\UIQCALL\WINS\UDEB\UIQCALL.exp
LINK : warning LNK4005: no objects used from library \Symbian\UIQ_21\EPOC32\RELEASE\WINS\UDEB\ETELMM.LIB
UIQCALL_APPUI.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall RAdvGsmCall::GetRemotePartyInfo(struct MAdvGsmCallInformation::TRemotePartyInfo &)const " (?GetRemotePartyInfo@RAdvGsmCall@@UBEHAAUTRemotePartyInfo@MAdvGsm
CallInformation@@@Z)
UIQCALL_APPUI.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall RAdvGsmCall::GetDialledNumberInfo(struct MAdvGsmCallInformation::TDialledNumberInfo &)const " (?GetDialledNumberInfo@RAdvGsmCall@@UBEHAAUTDialledNumberInfo
@MAdvGsmCallInformation@@@Z)
\Symbian\UIQ_21\EPOC32\BUILD\SYMBIAN\UIQ_21\UIQEXAMPLES\UIQCALL\UIQCALL\WINS\UDEB\UIQCALL.APP : fatal error LNK1120: 2 unresolved externals
NMAKE : fatal error U1077: 'link.exe' : return code '0x460'
Stop.
if exist "\Symbian\UIQ_21\EPOC32\BUILD\SYMBIAN\UIQ_21\UIQEXAMPLES\UIQCALL\UIQCALL\WINS\UDEB\UIQCALL.exp" del "\Symbian\UIQ_21\EPOC32\BUILD\SYMBIAN\UIQ_21\UIQEXAMPLES\UIQCALL\UIQCALL\WINS\UDEB\UIQCALL.exp"
Stopped the build by removing the export object,
if present, because the pre-link stage failed
Linking...
LINK : fatal error LNK1104: cannot open file "\Symbian\UIQ_21\EPOC32\BUILD\SYMBIAN\UIQ_21\UIQEXAMPLES\UIQCALL\UIQCALL\WINS\UDEB\UIQCALL.exp"
Error executing link.exe.
Creating browse info file...

UIQCALL.APP - 5 error(s), 2 warning(s)

Regards
Abrar Ahmed.

Build it for WINSCW not WINS

As I see it you are building it for WINS,just build it for WINSCW and it will work fine.
--Mayur.

Build for WINSCW

HI Mayur,

Thanks for your Reply.

As you sugest to build it for winscw sdk for uiq2.1 i'm still getting the linking error for RAdvGsmCall as have all the headers libraries and DLL`s the linking errors are as follows below.Kindly look into the matter.

Link Error   : Symbian/UIQ_21/EPOC32/BUILD/SYMBIAN/UIQ_21/UIQEXAMPLES/UIQCALL/UIQCALL/WINSCW/uiqCall_Data/THUMB_UREL/ObjectCode/CALLTRAPOBJ.o)(.text+0x238):CALLTRAPOBJ.cp: undefined reference to `RAdvGsmCall::GetDialledNumberInfo(MAdvGsmCallInformation::TDialledNumberInfo &) const'

Link Error   : Symbian/UIQ_21/EPOC32/BUILD/SYMBIAN/UIQ_21/UIQEXAMPLES/UIQCALL/UIQCALL/WINSCW/uiqCall_Data/THUMB_UREL/ObjectCode/CALLTRAPOBJ.o)(.text+0x238):CALLTRAPOBJ.cp: relocation truncated to fit: ARM_THUMB23 RAdvGsmCall::GetDialledNumberInfo(MAdvGsmCallInformation::TDialledNumberInfo &) const

Link Error   : Symbian/UIQ_21/EPOC32/BUILD/SYMBIAN/UIQ_21/UIQEXAMPLES/UIQCALL/UIQCALL/WINSCW/uiqCall_Data/THUMB_UREL/ObjectCode/CALLTRAPOBJ.o)(.text+0x246):CALLTRAPOBJ.cp: undefined reference to `RAdvGsmCall::GetRemotePartyInfo(MAdvGsmCallInformation::TRemotePartyInfo &) const'

Link Error   : Symbian/UIQ_21/EPOC32/BUILD/SYMBIAN/UIQ_21/UIQEXAMPLES/UIQCALL/UIQCALL/WINSCW/uiqCall_Data/THUMB_UREL/ObjectCode/CALLTRAPOBJ.o)(.text+0x246):CALLTRAPOBJ.cp: relocation truncated to fit: ARM_THUMB23 RAdvGsmCall::GetRemotePartyInfo(MAdvGsmCallInformation::TRemotePartyInfo &) const

Link Error   : Symbian/UIQ_21/EPOC32/BUILD/SYMBIAN/UIQ_21/UIQEXAMPLES/UIQCALL/UIQCALL/WINSCW/uiqCall_Data/THUMB_UREL/ObjectCode/UIQCALL_APPUI.o)(.text+0x274):UIQCALL_APPUI.: undefined reference to `RAdvGsmCall::GetDialledNumberInfo(MAdvGsmCallInformation::TDialledNumberInfo &) const'

Link Error   : Symbian/UIQ_21/EPOC32/BUILD/SYMBIAN/UIQ_21/UIQEXAMPLES/UIQCALL/UIQCALL/WINSCW/uiqCall_Data/THUMB_UREL/ObjectCode/UIQCALL_APPUI.o)(.text+0x274):UIQCALL_APPUI.: relocation truncated to fit: ARM_THUMB23 RAdvGsmCall::GetDialledNumberInfo(MAdvGsmCallInformation::TDialledNumberInfo &) const

Link Error   : Symbian/UIQ_21/EPOC32/BUILD/SYMBIAN/UIQ_21/UIQEXAMPLES/UIQCALL/UIQCALL/WINSCW/uiqCall_Data/THUMB_UREL/ObjectCode/UIQCALL_APPUI.o)(.text+0x280):UIQCALL_APPUI.: undefined reference to `RAdvGsmCall::GetRemotePartyInfo(MAdvGsmCallInformation::TRemotePartyInfo &) const'

Link Error   : Symbian/UIQ_21/EPOC32/BUILD/SYMBIAN/UIQ_21/UIQEXAMPLES/UIQCALL/UIQCALL/WINSCW/uiqCall_Data/THUMB_UREL/ObjectCode/UIQCALL_APPUI.o)(.text+0x280):UIQCALL_APPUI.: relocation truncated to fit: ARM_THUMB23 RAdvGsmCall::GetRemotePartyInfo(MAdvGsmCallInformation::TRemotePartyInfo &) const

Link Error   : Link failed

Thanking you in Advance and have a nice day...

Regards
Abrar Ahmed.

Use these commands...

I am assuming that you have copied the libs and the headers from the Series 60 sdk.
Also the targets supported are only WINSCW and ARMI.
So if you try to compile it for other targets it is not going to work.
Can you post what commands are you using for the build?
--Mayur.

Using WINSCW and Thumb

HI Mayur,

yes mayur i have copied the headers and Libs from S60 sdk and i'm building with these commands
" abld build winscw udeb "for emulator and " abld build thumb urel " for the target device and for winscw its not showing any linking error where as for the thumb its showing linking error i`m also tried with armi urel but the result is same linking error.can u please mail me the libs and headers which you use to build its very kind of you and my mail ID is " " please its very urgent.

Thanking you,
Abrar Ahmed.