Get the incoming call's phone number (Caller ID) - Windows Mobile Development and Hacking General

Hi all,
How can I catch the incoming call's phone number (Caller ID) using the MFC?
If I use .NET there is SystemState and the SystemProperty PhoneIncomingCallerNumber. But what is similar with MFC?
Has anybody maybe a code snippet?
Joline

For WindowsMobile 5.0 and above you can read it from the registry.
Don't remember the exact reg key... but look in the SDK for:
SN_PHONEINCOMINGCALLERNUMBER_ROOT
SN_PHONEINCOMINGCALLERNUMBER_PATH
SN_PHONEINCOMINGCALLERNUMBER_VALUE
Best regards
Øystein

Thanks. This works.
I wrote a program which uses notifications and catches an incoming call. To see if that works the program opens a message box if there is an incoming call. But regrettably first I get the notification from the system and AFTER hang up the message box from my program appears.
What can I do that my program catch the call BEFORE all other programs notify this (e.g. to change the ring tone depending on the caller id)?
Joline

IMHO iits not so easy. You must use TAPI library and/or directly Ril.

Where can I find useful information about how to use TAPI and RIL (maybe with examples)?
Joline

For RIL exists only fragmentary informations - good source is forum http://www.teksoftco.com/forum/viewforum.php?f=15.
For TAPI examples search Windows Mobile SDK.

I need the same phone number catching in PHP
Hi ,
I need to generate the popup using PHP while the call is landed in our phone.
how can we do this?
Thanks and Regards,
JayarajMohan.J

Related

Naive Tapi question

Hi,
I'm new to programming the SX56. I'd like to do some simple tapi apps, but I don't know what dll to reference -- coredll.dll? I'm using C# and the compact framework, and am familiar with using P/Invoke. I see a file on my device called coredll-dll.sig - what does it contain? Also, where do I get the coredll.dll (if that is what I should be using) as it does not appear in the Windows folder on my device. What is the TSP - Unimodem?
Thanks for any help.
Helen
I used Tapi with Embedded Visual Tools in plain C. I used tapi.h and linked with tapi.lib. You can't just open a comm port on the device and use AT commands, you have to use Tapi to control the phone.
I found a good book explaining it all and giving examples was "Windows CE Application Programming" by Nick Grattan and Marshall Brian ISBN 0-13-025592-0
I attach a sample of code that uses Tapi to make a phone ring for a fixed number of seconds you should make sense of the steps involved.
Do you have an example for answering TAPI call?
My dialing program is similar to the example. However, I can only make "voice" call work but not the data call. For data call I use "LINEMEDIAMODE_DATAMODEM" instead of "LINEMEDIAMODE_INTERACTIVEVOICE". I never got a ring message from the callee. and the caller side, I got a LINE_DEVSPECIFIC message with 40.
Does anyone have any idea?
- David

Get the telephone number in a program by starting a call

I develope a software which uses the phone of windows ce. So the user of the software can use the telephone. But it should be forbidden for the users to call any numbers. So I need to check the number the user puts in before he can start the call. How can I do that. Can I work with the RIL? In the past I have worked with the RIL and I get the message when someone starts a call but I don't know how I can get the number.
bye
Barney0021
I am not a programmer but could you not scan the keyboard input for this, used to be easy in the days of basic programming.
Thank you for answering, but I don't think this will work.
Mr.barney
can u provide me the code to use the phone
i dont know how to Initializing TAPI on EVB .... i saw the help file but i couldn't know how to do it well>>>pls
Barney0021: you may hook the COM1 and intercept all AT commands coming to the modem and filter the prohibited ATD commands. Or you can use TAPI functions like lineGetCallInfo. It should return the dialed number of the given call, but I have not tested this.
@ corv3:
I am programming with eVC++. And the phone application I use in my program is not written by myself. Instead I use the telephone application Windows CE owns. In my program I need only to start the telephone application. This is very easy. When you are still interested in the code (eVC++) then mail me again.
Greetings
@ mamaich:
Thanks, this is good, but the function needs a parameter called HCALL. How can I get this?
Greetings
Mr.Barney >>>
i want my program these functions:
-answer call by it self or by win ce phone program
-know the caller number
even on EVC ++
so if u know about the code of these functions pls tell me about them
Barney0021 said:
@ mamaich:
Thanks, this is good, but the function needs a parameter called HCALL. How can I get this?
Greetings
Click to expand...
Click to collapse
Look into TAPI samples coming with PPC 2003 SDK! There are several good examples.
The other variant is visiting www.cryptophone.de and downloading their source code. The code is a bit difficult to understand, but you'll se how everything can be done. Even interception of phone calls so that "Phone" application does not popup. Of cause you cannot use their source code because it is copyrighted, but you can do the similar things.
@ corv3:
At the moment my program only uses the Win CE phone. For this I've programmed a function that opens the telepbone. The following three lines will do that:
SYSTEMTIME systime;
GetSystemTime(&systime);
CeRunAppAtTime(L"\\Windows\\cprog.exe",&systime);
Ohter activities with the phone are still in progress but not properly working.
thanx alot Mr.Barney ....
Hi, I have the same problem
I want to get keypad numbers to block out going calls but i don't know how, key words I used are TAPI Windows mobile get caller number, call control, call management I searched in codeproject.com also but I found nothing, please help...I feel the wrong thing is from me

replace the caller ID notification screen

Hi,
I need to develope an application that basically replaces the caller ID screen that pops up when you have an incoming call and show some more information on the caller, then let the user answer or decline the call.
any help on where to look first (or maybe code snipets if i'm lucky) highly appreciated.
Cheers,
Shafa
I think you may have a hard time if it is truly a seperate application you wish to write. I have written a program to try to be used at the same time as cprog.exe and when that incoming call window comes up nothing I have tryed will let the user interact with any windows I create. You could stop that process but most users will not want to do this. I ended up having my program automatically determine if it wants to accept the incoming call and answer it itself. This was particularly anoying because my incoming call interest was set to data only and cprog dose not normally even register an incoming call that is purly data. But after I had initialized tapi with my settings cproc unexpectedly shared the same interest for incoming data calls.
Just as speculation - if your program was constantly running, when an incoming call is offering, you could enumerate the desktop windows using EnumWindows and its associated callback function to get the hwnd of the ballon that comes up. Then perhaps you could close the incoming call window or send it to the bottom of the z order and use your own to replace it. I do not know what effect this would have on cprog.
code related to tapi tends to be long so your not that lucky
:lol:

Phone application cprog.exe

Hi,
I want some information about default phone application cprog.exe.
I want to know how does it communicate with outlook and other application.
I guess most probably it should be via message posting.
But, unfortunately wheni tested the same with spy running on cprog and then i called a contact from outlook contacts.
I see many messages posted to cprog but I found no message or Parameter(WPARAM/LPARAM) to cprog that contains the number to call.
can anyone help me out to get information how to fetch that number? the number passed to phone/cprog.exe from contact.
The same thing i need for sddialer.exe that after matching the sound tag, how it informs cprog that which number to call?
Please help! I am looking these since long...
Good Luck
Best of luck trying to find any doco on cprog (if you do, please post back here!).
If you have a look at this thread you may find what you are looking for (at least how to initiate a call from the PC is there):
http://forum.xda-developers.com/showthread.php?t=295585
Look for LINE_REQUEST message
There a two ways, that an application can make a call; using tapiRequestMakeCall or lineMakeCall. tapiRequestMakeCall is by far the simplest to use. Examples of their use can be found in two sample cellcore progams available from microsoft, CeDialer, and HelloTapi. You could try this and see which produces messages simular to outlook. I'll guess that it's HelloTapi (tapiRequestMakeCall).
When an application uses tapiRequestMakeCall a LINE_REQUEST message is sent to the call-control application. This application must then call lineGetRequest to get information on the request. It then must execute the request.
See the remarks on the lineRegisterRequestRecipient page at microsoft
http://msdn2.microsoft.com/en-us/library/ms736043.aspx
I wish there was a similar Hello USSD example for the lineSendUSSD API. There's very little information on it... No one seems to be able to capture the responses past the first call.
oops missed part of your question
After the call app places the call, it should get a series of messages, mostly LINE_CALLINFO and LINE_CALLSTATE. The messages contain a handle for the call. Once you have the call handle you should be use the lineGetCallInfo and lineGetCallState functions to get info about the call. I think lineGetCallInfo includes the number that was called. The callstate typically goes through dialling, progressing, and then connected. I believe your not supposed to use the call handle until after a LINE_REPLY message is sent, saying the call didn't fail. If there are problems perhaps you should wait a short time.
To find out more about the messages, you could play with the CeDialer sample. It's linecallbackfunc looks at the messages, it would be easy to put in a few logging statements to see what's in each message. It think CeDialer will only get messages for inbound calls, and calls that it originated. (not ones by cprog.) Although you should check to be sure that I'm correct.
Good luck! Please, let us know whatever you might find out.
Hi,
I will look into this and post reply according As soon as possible.
Thanks
Where i can find the original cprog.exe to install in my non phone PDA? it's the dialer for voip.
Many thanks

Help with cprog

Hi, I have started to write a parental control phone application for wm6 which would let my kids answer only selected numbers and dial only a few numbers, however I am having a few issues where I need help:
1- I am trapping the Notification Event for incomming call (RegistryNotifyCallback) and put my window topmost (to hide the Phone Incoming Window) but I don't know how to prevent the use of the Green and Red hardware buttons (I need to disable them so the phone can't be answered if the number is not approved)
2- For outgoing calls, I need my app to be started with the Green phone button instead of cprog, but again, how do I trap those buttons.
Thank you
Replacing CPROG: bad idea
You just need to create a dialParser dll (signed) that will block outgoing calls that are not allowed, and maybe some TAPI wrapper to block incoming calls.
Replacing cprog is just a wrong solution.
How to make a dialParser? look at Google! it's an undocumented API (MS doesn't want you to know how to do it if you don't pay the partnership...) but leaks are everywhere!

Categories

Resources