Results 1 to 2 of 2

Thread: Phone call listener

  1. #1
    Join Date
    Apr 2007
    Posts
    3
    Qt products

    Default Phone call listener

    Hello,
    Currently, I'm working on an application that runs in the background to watch the phone call event using qtopia-greenphone-sdk 4.1.7.
    I use following code sample to achieve the target.

    connect(phoneLine,newCall(const QPhoneCall),this,callAdded(const QPhoneCall));

    void MyClient::callAdded(const QPhoneCall& call)
    {
    //
    }
    The problem is:
    When I dial a number, the application can't enter into "callAdded" function unless the dialed part answers the call (the call is in "connected" state).
    But I think the call should be added when it still is in "dialing" state.

    How can I implement to be notified when a phone call is in "dialing" state?

    Thanks

  2. #2
    Join Date
    Jan 2006
    Location
    Florida
    Posts
    24
    Thanks
    6
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Phone call listener

    OK, I see your problem. QPhoneCallManager (phoneLine) has a statesCahnged() signal, but that's only after the call has been placed on the calls list, which doesn't happen until after it has been dialed. The only thing I can suggest is that when you call the create() method to place a call, grab and save the QPhoneCall instance that is returned and use QTimer to poll the QPhoneCall::state() (or QPhoneCall::dialing()) at some reasonably fast rate. At least you have a mechanism to actually do something about the call before it is dialed (like hang up if dialing takes too long, etc). I looked through QPhoneCall for some type of signal you could tie into, but it doesn't have any!

Similar Threads

  1. call bash/terminal command with QT
    By myta212 in forum Newbie
    Replies: 1
    Last Post: 13th November 2006, 15:38
  2. Call on Parent Object
    By hufgardm in forum Newbie
    Replies: 1
    Last Post: 7th September 2006, 15:11
  3. Trolltech's own phone.
    By Spockmeat in forum General Discussion
    Replies: 7
    Last Post: 30th August 2006, 19:05
  4. why cant i call setGeometry
    By freegnu in forum Qt Programming
    Replies: 1
    Last Post: 14th June 2006, 04:59
  5. virtual overloaded functions and base class function call...
    By nouknouk in forum General Programming
    Replies: 7
    Last Post: 11th March 2006, 21:26

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.