×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Sep 2006
    Posts
    37

    about phone call

    I want to make phonecall .
    like this I want let the phone to make 10 times call to a number.
    but not display in screen. when Completes to send a message to me.
    but i use this code, it will display call messagebox.
    How can I not display the call messageBox;.

    void DialNumberL(const TDesC& aPhoneNumber)
    { // emulator does not support dialing
    #if __WINS__
    NEikonEnvironment::MessageBox (KEmulatorError);
    #else

    //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;
    User::LeaveIfError(phone.GetLineInfo(0, 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
    User::LeaveIfError(call.Dial(aPhoneNumber));

    //Close the phone, line and call connections and remove them from the cleanup stack
    //NOTE: This does not hang up the call
    CleanupStack::PopAndDestroy(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
    CleanupStack::PopAndDestroy(&server);

    #endif
    }

  2. #2
    Nokia Developer Champion
    Join Date
    Mar 2006
    Location
    Helsinki, Finland
    Posts
    8,344

    Wink Re: about phone call

    Hello dear,

    This is a Java section. And your question belongs to Symbian C++.
    However crossposted on Symbian Section also:
    http://discussion.forum.nokia.com/fo...ad.php?t=96515

    Regards.
    Kiran.

Similar Threads

  1. Phone restarts after every call
    By ajaysinghajay in forum Mobile Java General
    Replies: 1
    Last Post: 2006-02-22, 13:53
  2. How to make simultaneous VOICE and DATA call on a Nokia Phone?
    By venkat_nokia in forum PC Suite API and PC Connectivity SDK
    Replies: 0
    Last Post: 2004-04-28, 12:15
  3. Application error due to answering a phone call
    By mikeaf in forum Mobile Java General
    Replies: 0
    Last Post: 2003-04-24, 18: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
  •  
×