locked
How to know that incoming call is picked up? RRS feed

  • Question

  • Hi all,

    I am working on callback application in vc++(2005) for windows mobile. I am able to make call by using PhoneMakeCall(&phCallInfo) function defied in phone.h header file  but what i want that how can my application knows that incoming call is received .I have searched that keybd_event(VK_TTALK, 0, KEYEVENTF_KEYDOWN, 0) function can be used but i am confused where this function to use.

     

     

    thanks ,

    rohit negi

    Thursday, February 10, 2011 1:29 PM

Answers

  • You should be able to subscribe to the

    ////////////////////////////////////////////////////////////////////////////////
    // PhoneCallCalling
    // Gets a value indicating whether the phone is currently attempting to connect an outgoing call.
    #define SN_PHONECALLCALLING_ROOT HKEY_LOCAL_MACHINE
    #define SN_PHONECALLCALLING_PATH TEXT("System\\State\\Phone")
    #define SN_PHONECALLCALLING_VALUE TEXT("Status")
    #define SN_PHONECALLCALLING_BITMASK 0x20000

    and

    ////////////////////////////////////////////////////////////////////////////////
    // PhoneActiveCallCount
    // Gets the number of active phone calls.
    #define SN_PHONEACTIVECALLCOUNT_ROOT HKEY_LOCAL_MACHINE
    #define SN_PHONEACTIVECALLCOUNT_PATH TEXT("System\\State\\Phone")
    #define SN_PHONEACTIVECALLCOUNT_VALUE TEXT("Active Call Count")

    and

    ////////////////////////////////////////////////////////////////////////////////
    // PhoneCallTalking
    // Gets a value indicating whether there is currently a phone call in the talking state.
    #define SN_PHONECALLTALKING_ROOT HKEY_LOCAL_MACHINE
    #define SN_PHONECALLTALKING_PATH TEXT("System\\State\\Phone")
    #define SN_PHONECALLTALKING_VALUE TEXT("Status")
    #define SN_PHONECALLTALKING_BITMASK 0x20000000

    notifications defined in snapi.h to get that information.

    -PaulH

    • Marked as answer by Jesse Jiang Thursday, February 17, 2011 8:04 AM
    Friday, February 11, 2011 3:47 PM

All replies

  • The state and notification broker will alert your application with that information.

    http://msdn.microsoft.com/en-us/library/aa455748.aspx

    http://www.developer.com/ws/pc/article.php/3547381

     

    -PaulH

    Thursday, February 10, 2011 4:44 PM
  • I have used state and notification broker .It helps to know to my application that incoming is coming . But the problem is that my application tells about an incoming after phone is disconnected .I want as soon as when green button is pressed to receive an incoming my application send the dtmf while phone is in connected state.
    Friday, February 11, 2011 8:56 AM
  • You should be able to subscribe to the

    ////////////////////////////////////////////////////////////////////////////////
    // PhoneCallCalling
    // Gets a value indicating whether the phone is currently attempting to connect an outgoing call.
    #define SN_PHONECALLCALLING_ROOT HKEY_LOCAL_MACHINE
    #define SN_PHONECALLCALLING_PATH TEXT("System\\State\\Phone")
    #define SN_PHONECALLCALLING_VALUE TEXT("Status")
    #define SN_PHONECALLCALLING_BITMASK 0x20000

    and

    ////////////////////////////////////////////////////////////////////////////////
    // PhoneActiveCallCount
    // Gets the number of active phone calls.
    #define SN_PHONEACTIVECALLCOUNT_ROOT HKEY_LOCAL_MACHINE
    #define SN_PHONEACTIVECALLCOUNT_PATH TEXT("System\\State\\Phone")
    #define SN_PHONEACTIVECALLCOUNT_VALUE TEXT("Active Call Count")

    and

    ////////////////////////////////////////////////////////////////////////////////
    // PhoneCallTalking
    // Gets a value indicating whether there is currently a phone call in the talking state.
    #define SN_PHONECALLTALKING_ROOT HKEY_LOCAL_MACHINE
    #define SN_PHONECALLTALKING_PATH TEXT("System\\State\\Phone")
    #define SN_PHONECALLTALKING_VALUE TEXT("Status")
    #define SN_PHONECALLTALKING_BITMASK 0x20000000

    notifications defined in snapi.h to get that information.

    -PaulH

    • Marked as answer by Jesse Jiang Thursday, February 17, 2011 8:04 AM
    Friday, February 11, 2011 3:47 PM