×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Aug 2006
    Posts
    92

    Problem in makeing Phone Call in 2nd edition

    Hi All,

    My application make a call by using foollwing code.


    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
    }


    And call :

    TRAPD(err, DialNumberL(KPhoneNumber); );
    if (err)
    {
    User::InfoPrint(_L("Error dialing"));
    }
    }



    Problem:

    When reciever not answering to this call then " no answer " msg displayed and my app dies.I m not getting this problem why this is happen so.
    If anyone having solution of this problem then plz reply me soon.

    Waiting for Replay.....

    Yogesh

  2. #2
    Registered User
    Join Date
    Aug 2004
    Location
    Hyderabad,India
    Posts
    808

    Re: Problem in makeing Phone Call in 2nd edition

    Hi,

    your problem is not clear. you are saying that app is dying what does it mean. is app is getting crashed.If so at which place.

    Basically you need to implement this using active object mechanism and have to monitor the status of line and call.

    Moroever which SDK u are working with.

    BR,
    Sudhakar
    Regards,
    Sudhakar

  3. #3
    Super Contributor
    Join Date
    Jun 2006
    Location
    India
    Posts
    3,037

    Re: Problem in makeing Phone Call in 2nd edition

    can you explain the error code.

  4. #4
    Registered User
    Join Date
    Oct 2006
    Posts
    7

    Re: Problem in makeing Phone Call in 2nd edition

    the same code in Nokia7710 ( making a phonecall ) ......

    it work good at 3.50ver, Nokia default dial ui can be seen;

    but at 4.50 or 4.58ver , Nokia default dial ui can't be seen, so the phonecall can not be closed.

    anyone know why? please help me ....

  5. #5
    Registered User
    Join Date
    Aug 2006
    Posts
    92

    Re: Problem in makeing Phone Call in 2nd edition

    Hey thanks,

    for looking this is code .

    But after this calling i access the recent log.I think there may be problem.But it happens only when reciever not answering.

    When this call make then the states as follows.

    Dialing --> connecting-->hanging up

    After or in hanging up state app. get closed.
    Last edited by yogesh.bhople; 2006-11-18 at 11:52.

Similar Threads

  1. Where is SDK for S60 1st Edition?
    By MDWPPC in forum Mobile Java Tools & SDKs
    Replies: 5
    Last Post: 2007-02-08, 07:04
  2. Problem with Phone call Extension dialing
    By awasthi_vivek in forum Symbian Networking & Messaging (Closed)
    Replies: 0
    Last Post: 2004-03-06, 09:07
  3. Problem with recording on N6600 during a phone call.
    By Igor Pchelko in forum Symbian C++
    Replies: 0
    Last Post: 2004-02-11, 00:25
  4. Replies: 0
    Last Post: 2002-12-04, 15:46

Posting Permissions

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