Related
Hi,
from time to time I like the RIL. Have found the RIL_NOTIFY_RING and be able to see, when my MDA get a call.
Now I'm searching for a way to get the callerID (TelephoneNumber). Because of I'm using the RIL also for SMS, I'ld like to manage the CallID also with it, so that I havn't got to implement TAPI o.s.e.
Wish you a happy new year,
greetings from hannovre,
Andreas )
I am always failed to constuct a call by RIL
I have tried RIL to construct a call. Only one time, the callee can hear my voice but I can not hear his. Then I could not establish any call again. Any idea? Is it necessary to add some codes on callback if just constructing a call?
Bob
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:
A lot of people trying to write programs that can transfer data over a phone call seem to end up giving up because they think their device is not capeable of it. I put this little app together to make it possible to demonstrate the data transfer on ppc phones. If this works on your device then you can implement similar functionality.
download bellow:
http://odeean.veritel.com.au/ORDTapiUser/myTapiUser.exe
It will only work if the program is running on both the calling and answering ppc at the same time.
Instructions:
0)Make sure the phones on your ppc's are turned on.
1)copy the exe to both devices.
2)run the exe on both devices.
3)press "startup" on both devices.
4)(both devices) a series of dialogs will pop up, if you see one labeled "celular line" press yes. If you know your phone uses a line called something else press yes to that instead. If you press no to everything the program will try to get the correct line, but may fail. If you want to choose again restart the program.
5)on the calling device put a phone number in the edit box at the top. I am no expert on numbers around the world so I have just let whatever you put there go straight in. If the number fails its got nothing to do with this program.
6)on the calling device press "dial". wait until it says connected.
7)on the answering device the incoming call will be shown. If a caller id is available it will be displayed. The ppc inbuilt phone is not stopped by this app so you will not be able to press the answer button. Instead wait (normally the default is 3 rings) and my program will answer the call itself.
8)two way communication is now posible. Data sent from the "data to send" edit box on one ppc will be displayed on the "received data" window on the other ppc. As this is a simple program the display will just show the last 25 digits to keep the latest info in the window.
9)when done press "hangup" on one of the ppc's
The data is not just sent in a direct way. It gets broken up into packets and they are timed as they are transmitted along with some error checking. The timing is rather generous so it slows the transmition down a bit, that along with all the actions being displayed to the user.
This works well between my xda mini and xda I. It dose not work on windows mobile 2005. Because of the expense involved in phone calls it is dificult to debug. If any messages do pop up it would be nice if you could post the number on the dialog and a description of what was going on. This program cost me $150 in phone expence, so enjoy.
.
could you post the code , please ?
i have to make an application that need to receive file from server with data call.
(excuse my english)
best regards
I will not post the entire code, this is to let you know if it is worth the effort trying. Almost everything contained within this program that is related to tapi can be seen in posts already on this board. If you have a specific question I would be glad to post code relating to it.
When you say you need to retreive a file from a server, you should know that tapi data calls do not go through the mechanism that ras or sockets use to let the operating system get a ip and port for communication. Your program is responsible directly for the communication. It would be terrific if you could write code to replace the missing incoming ras components from pocket pc. I have not so I could not show any code for that.
If the server you want to connect to is not a pocket pc based device, ie it is a normal pc, then tapi is not the best solution for you. I suggest using sockets, its designed for that kind of thing. ppc to ppc tapi data calling is like a last resort kind of programming. It is forced on us because either the phone networks don't give us usefull ip's for sockets or the api's are not fully implemented in ras. Alternately you could look into using the compact framework 2.0 and c#, I think I read somewhere that incoming ras would be included there.
just one question...your application uses TAPI, isn't it?so TAPI is supported by mostly different mobile device?Am I right?
thanx
ppc 2000 supports tapi outbound only.
ppc 2002, wm2003, wm2005 all support tapi inwards and out.
The hardware can vary, I only have the devices listed in my sig. For all of those (that are phones) tapi data, in/out is fully functional. If you are using a phone card (ie one that plugs into the expansion port) its capeabilities may be different. Often those only support gprs (not tapi). If you have anything with XDA in the name its OK.
Thank you for your advise but I have a specific problem using HTC
Wizard. I need to connect a server using a V110 modem in order to create
data link between a PDA and this server. I developed a code (VB .net)
for PDA and independent cellular phone using standard AT commands. I
tried to develop a similar approach with HTC Wizard but it seems it is
not possible to send AT commands to the modem (cellular line). To
develop your code you should have solved this problem using TAPI. Could
you explain me how to initiate the cellular line so that I could create
a V110 link.
Thx
I understand more clearly what you want to do now. Unfortunately I have never attempted to use at commands. You said I should have solved this problem in my app, but the point of using tapi is to not have to deal with at commands. Tapi is good for sending data, its my "guess" that whatever the commands you want to send could be generated by tapi to look like whats expected on the other end (assuming the typs of transmitted data match. eg dose the size of one at command correspond to >= the size of one char?).
I think that you would not be able to communicate directly with the modem with at commands until you have stopped tapi/ril from using the port. Again, I have not done this. Search this board to find how to do that. Once you have, try your origional code again. I doubt your normal phone functionality would work after that.
Sorry I could not be of more real help.
I dont have PPC but I do have smartphone instead..
Does the program require CSD line or can use normal GSM? Can you create one similar program that can be used in Samartphone wm5?
It uses normal gsm, ie a voice call. The underlying class in my program can probably work on smartphones, but I do not have one. To be honest I think smartphones are dying. Normal ppc phones are the same size now so to put too much effort into smarphones seems less attractive.
My PPC wm5 cannot dial, the other PPC show CONNECT but...
I was using HP Ipaq and Dopod PPC, The HP Ipaq when dialed it show dial number but nothing dialed to other party. Latter Dialed from Dopod It was shown CONNECT but no connection is establish to other party...
Could you give me the reason. If I am using WM5 is the case, what OS that you are using?
How about using CSD line instead could it possible running properly? Do I need to install certificate and signing the application(exe) as to make the program running in WM5, is what happen to smartphone certain API under privilage zone.
It is my mistake the MyTapUser.exe find in both HP and Dopod
I am sorry since I just bought the SIM card and the provider put some procedure before I can use the line. After consulted the shoper, The shoper activated it for me. Walla! I tested again it worked fine...thanks to you...master!
Some networks can also cause problems. I use vodafone and its 100% ok but I put an optus prepaid in and nothing happened at all. If I understand correctly the network should only be interested in the bearer mode. I use LINEBEARERMODE_VOICE - the same as a voice call so it should be ok. When experimenting with that sim, they will not do anything with a call that contains a LINEMEDIAMODE_DATAMODEM in the call params. Very strange considering they have no use for knowing this.
I am pleased it worked for you. This is realy very old and I will be removing it from my site soon when my new stuff comes out. Even if the myTapiUser seems to work, remember that it is not checking the contents of the transmition. Bad weather for example could cause information to be missed. There are probably problems receiving on the HP that you may not have noticed. Is it the same HP made by quanta? If the HP can receive data after answering an incoming call I would love to know about it. Can you confirm this?
This is my report..
I am using prepaid no csd line.
Device Info
========
1.HP iPAQ TI OMAP1510 - 2003 PPC(memory-57.04MB)
2.DOPOD PXA270-520MHZ WM5(5.1.1..1700)(memory-50.19MB)
HP Dialed Dopod
===========
- HP received data from DOPOD immediately after data was sent.
- DOPOD received data from HP after next sequence of data transmit from HP(sometime error 0052 occur)
DOPOD Dialed HP
============
- HP received immediately data from DOPOD
- DOPOD receiving data from HP after the next sequence of data transmitting.
- error trigger 0052(assembly packet...) in DOPOD
data send perfect 100% correct...
May I know whether, If this method can be used sending digital stream of data, such as, compress voice or image?
Yes it can. I have not done voice because the flow of the transfer would be very different from what I want. If you want to see voice transfer in action over data calls google cryptophone.
In about 15 hours I will be releasing my program. Come back then to see what it can really do. I need to make a page for it on my site and get screen captures etc. Its 2am here so I can't do it now.
incoming call how to get connectted?
I can dial to the receiving phone. My receiving phone use ril to detect the incoming call. After the detection, I can press the green button to answer. My problems is why everytime I answered the call it failed.
I did like below procedure, when ril detect the incoming signal
-lineOpen
-lineAnswer
-lineGetID
Is it the correct way to answer the call? Why 'lineOpen' produce error result?
Can You give the correct way to answer the incoming call for modem like communication.
Thank in advance,
As far as ril goes I know little. You should have opened the line before the call was offering, this includes negotiating the version of tapi to use then finding the correct line then using lineopen. All this has been covered in other threads. The values returned from the api calls are self explanitory so checking them is useful.
The use of linegetid is less straight forward but again it has also been covered in other threads. The thing to remember is that after you use lineanswer to answer an offering call, do not imediately call linegetid. You need to wait for the connected line state. Also check the dwCallbackInstance when looking at line states because as I found with the atom, you need to be sure the results are relevant to your program.
I know that what you really would like is some code but its too complicated to sumarize in a few lines. The best thing to do is start from the beginning ( lineInitializeEx ) and work to the end result ( LineGetID ) checking your errors along the way. You will need another thread to do the checking of the state of the line, and it will have to be properly synchronized if you don't want unexplained crashes. If your program is answering the call, don't touch the phone buttons. When you answer the call cprog.exe owns it and you will not be able to access it. Also is there a reason you are mixing ril with tapi? I would guess it complicates the issue, why not just use tapi or just use ril?
Ril or TAPI
Yes! You are right, either one can be used. I am a little bit confused about the two. Just remember I am new to this kind of development. After sometime I am testing the use of RIL and TAPI both can give the same answer, but better use TAPI from the beginning. And I have to kill the cprog.exe and RegisterHotKey for green button first.
I want to ask you something. Why after several attempt of LINEDEVSTATE_RINGING event, there is no LINECALLSTATE_OFFERING trigger, as this event use to lineAnswer? And what should I do when the LINEDEVSTATE_RINGING event trigger?
Thank in advance
Sorry, I may have been a bit loose with the terminology. Its a while since I coded that part - Line states, line messages I mean. LINECALLSTATE_OFFERING is obtaine this way....
First off, use the event notification method, not the callback window. Wait for the event using WaitForSingleObject then Use lineGetMessage to get a LINEMESSAGE. If the dwMessageID of the LINEMESSAGE is LINE_CALLSTATE then check what call state it is (eg is dwParam1 equal to LINECALLSTATE_OFFERING etc). You can then take action depending on what you want to do, like answer when offering.
I never see LINEDEVSTATE_RINGING because it is not needed by my app because the line messages suffice. Killing cprog.exe on a users device before its neccesary could lead to missed calls, also when it is not running the caller just hears the ringing tone so it seems like they are being ignored. I have also found that the os restarts it again anyway after a while (actually it seems like it dose this after the device has powered down and when a new call comes in).
What is the different when using event and callback function
What I understood that we can use either event or callback function to gain message from TAPI. I am using the callback function to get the LINECALLSTATE_OFFERING, which is different than you, where you are possibly using the Event method (lpLineInitializeExParams->dwOptions = LINEINITIALIZEEXOPTION_USEEVENT - I think you are using this one!).
I still cannot get the status of LINECALLSTAE_OFFERING. Some of the events caught are LINEDEVSTATE_CLOSE and LINEDEVSTATE_OPEN. What is the meaning of LINEDEVSTATE_OPEN stated in the MSDN line is open by other application, does it means that cprog.exe is conqured the line?
The reason I said to use the event method is that I have only done this with it. I could not give any advice about the call back method (although i guess it should give the same results), if you can get it to work then its fine. How are you getting LINEDEVSTATE_CLOSE & LINEDEVSTATE_OPEN? LINEDEVSTATE_XXXXX have nothing to do with LINECALLSTATE_OFFERING. Are you checking for a LINE_CALLSTATE in your call back? I think in the call back method this should be sent to your program.
ie
case:LINE_CALLSTATE;
{
if(dwParam1==LINECALLSTATE_OFFERING)
{
//it is offering
}
}
break;
All LINEDEVSTATE_OPEN is telling you is that cprog is also using the phone to wait for calls (normally cellular line).
If LINE_CALLSTATE it means a call is comming and you can find out about it (eg if its offering). cprog.exe dose not do anything to the call unless the user presses a button or taps on the notification. It dose nothing to the line, cprog will be aware of the same messages that you are and if you set up tapi to use data on a line then unfortunately cprog will also ring when data calls come but other than that there are no issues with it to worry about. If you need proof of this just donwload the current version of GSMbeam and in the settings change the spelling of cprog. When a data call comes in you will see GSMbeam monitoring it then the cprog notification will come up over that monitoring the same call. The program that answers the call first is the one that owns it, until then its not altered.
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
is it possible to make a call in mortscript and then hang up the call once its connected, but on the screen it shows a pic or something so people do not see the dialer. Then since its calling a callback server, when the call comes back, it auto picks it up, then once that happens it goes to dialer then the script dies? (the hardest part is closing the call once it connects and then also having the pic show while the script is running? how do i do that? or code help thanks!
the registry key
Code:
HKLM\System\State\Phone\Active Call Count
is created once you are in a active call
to hangup just simulate the keypress like sendspecial(114) or use vjkeypress (www.vijay555.com)
so how do u tell mortscript that function? (like when? reg key?)?
i would suggest to get a tool which launches a program if a call comes in. there are some around here in the forum. look for "phone filter" or "call filter".
this tool could run your script.
your script would check the reg key mentioned above e.g. every second.
if you do not want to use such a tool then you have to let the script run continuously.
well the object is a script when a button is pressed. Basically it sends out a call then when it sees the call is active it closes the call. Then when the call comes back from that # it picks up the call and then shows the dialer? then the script dies until obviously the button is pressed?
what is a command for like if this Reg? then (close program)?
the first part of the script. it checks every second if the call is active, but not longer than 20 seconds in total. after that it hangs up. you need the attached file for that.
Code:
phonenumber="+123456789"
Runwait("\Program Files\makecall.exe", phonenumber)
Sleep(2000)
Minimize("Phone")
For i = 1 to 20
If (RegRead("HKLM","System\State\Phone","Active Call Count")=1)
SendSpecial(115)
EndIf
Sleep(1000)
next i
SendSpecial(115)
for the second part i currently do not know how to get the incoming number into this script. that is what you need to find out. maybe there is a registry string. make a snapshot of the registry, call yourself and while ringing make another snapshot.
Code:
For i = 1 to 20
If (incomingcall=phonenumber) <-this needs to found out
SendSpecial(114)
EndIf
Sleep(1000)
next i
i will trywhen I get in townn monday' so does this script autokill? thanmks
the code is not yet completed (see below in bold). it depends on how we get the incoming number into this script.
then we'll see what is the best structure for this script.
are you familiar with scripting? if not i would recommend getting used to it.
Code:
phonenumber="+123456789"
Runwait("\Program Files\makecall.exe", phonenumber)
Sleep(2000)
Minimize("Phone")
For i = 1 to 20
If (RegRead("HKLM","System\State\Phone","Active Call Count")=1)
SendSpecial(115)
[B]<command required - either exit, call other script or put other script into notification queue>[/B]
EndIf
Sleep(1000)
next i
SendSpecial(115)
im not sure what the i 1 to 20 does.also to lop the regend commands until one call closes
??? the loop checks the registry key
what do you mean by "also to lop the regend commands until one call closes"
basically when a call comes in it will see that in the reg... then run that incoming call part.. then when that incoming cqll comes in auto pickup call and then kill all scripts
come on.
if it is in the registry then you should be able to do this by yourself.
all you need is already here in this post.
could you please post the registry key?
im conofusd about how too loop the active call reg key checking script until one call comes in
mortscript does not know anything about an incoming call.
you have two options:
either put a script into a continuous loop to check if a call comes in
or find a tool which runs as a service in the background and can launch a prog if a call comes in.
if you find a tool: good, then you do not need the loop anymore. just run the second part of the script, check if the registry key equals the phonenumber and accept the call.
if you do not find a tool: you need the loop. if you know that your call comes in not later than 10 seconds after you hangup you can decrease the loop to 10
gotchya .. but is there a loop that can be put on just if one specific # comes in. I dont mind like basically having that loop for incoming so basically
ok ur first script...
then after that completes turn on a looping script for if a call with certain # comes in, whenever that happens, i guess it will read that call active script again, then once that registers can u have some type of thing where the incoming script loops until X registry appears (the call active registry again). And once that appears all scripts stop and goes to dialer pad?
ambush276 said:
gotchya .. but is there a loop that can be put on just if one specific # comes in. I dont mind like basically having that loop for incoming so basically
Click to expand...
Click to collapse
does that mean that the process you described above is not run sequentially, like:
dial -> hangup -> wait for incoming call -> accept call
dial next number -> hangup -> wait for incoming call -> accept call
or does it work like
dial -> hangup -> while waiting for first call dial next number ...
ambush276 said:
then after that completes turn on a looping script for if a call with certain # comes in, whenever that happens, i guess it will read that call active script again, then once that registers can u have some type of thing where the incoming script loops until X registry appears (the call active registry again). And once that appears all scripts stop and goes to dialer pad?
Click to expand...
Click to collapse
sorry - can't understand what you mean.
didn't expect to do the whole work for you...
Code:
phonenumber="+123456789"
Runwait("\Program Files\makecall.exe", phonenumber)
Sleep(2000)
Minimize("Phone")
For i = 1 to 20
If (RegRead("HKLM","System\State\Phone","Active Call Count")=1)
SendSpecial(115)
Call("WaitForCall")
Exit
EndIf
Sleep(1000)
next i
SendSpecial(115)
Message(phonenumber & "did not answer")
Exit
Sub WaitForCall
# waiting 10 seconds until script checks for incoming call
Sleep(10000)
For i = 1 to 20
If (RegRead("HKCU", "Path", "Key")=phonenumber)
SendSpecial(114)
Exit
EndIf
Sleep(1000)
next i
Message(phonenumber & "did not call back")
run script:
dial # > call connect then disconnect> wait for incoming Reg to open (aka incomming call is comming in on Certain #, if not that certain # then ignore)> answer call automatically> go to dialer pad (and let user dial no auto dial)> close script.
the script will do that for you
the incoming call registry is the same i put in and it works.. but still a few more problems (thanks so much for sticking this out i REALLLLY appreciate it!)
ok basically the first part of hte script maybe im just a dunce but i still dont quite understand how it works. It's not always sleep 2000 before it connects etc.. sometimes its 1000 sometimes its 5000, when testing unless its before the given sleep time it will not function correctly (aka that checking is not looping). Basically i want the script to check for teh reg key (the active call) continuously for X amount of seconds (or else show an error message like it could not place call or something) and kill script. SO like wether it takes 2 secends for call to connect or 8, that reg key is always checking if its there, and it will for X amount of second. The next thing i want to do. (probably the last), is when that incoming call is in, to disable the rining and the popup notification. The same idea, to have the reg key for the incoming call loopping, so wether it takes 10 or 20 seceonds for the number to come back as soon as the call is registered it automatically picksup the call and no ringing or notification call is comming in. (also this should be easy but once u press the (114), and it goes to teh screen, what is command to go to dialpad? (so like it opens up the phone app again and goes straight to dial pad. Thanks!!! (taht is about it)!