Generate DTMF digits - Windows Mobile Development and Hacking General

Hello,
I have used TAPI to make a phone call, but I can't generate DTMF digits. I'm trying to use lineGenerateDigits, but it doesn't work!!
Another solution for me : send AT commands to the GSM part of my XDA, but I don't know how I can have access to this part (how can I have access to the serial device driver without TAPI?).
Is there somebody who has a tip for one of these solution?
Gizmo

generateDTMF
Did you ever figure this one out?

Related

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

test tapi on your device

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.

DTMF on 8525

Can anybody tell me how to send DTMF tone in Cingular 8525? I searched this forum and the internet infact, but not able find the answer.
I need it to be able to set up the phone number in the address book to do this:
dial the 877-xxx-xxxx number
manual wait
DTMF a 10 digit number followed by a #
manual wait
DTMF a 4 digit number followed by a #
manual wait
DTMF a 11 digit number followed by a #
This is for calling my parents in India and it's always been really convenient to just program the whole thing.
One way would be to enter a 'p' wherever you want a pause in the dialing. This produces a second or two pause between sending the numbers.
Thanks for the quick reply. I tried that and even tried adding w but it is not working.
Also my requirement is a manual pause meaning the automated message takes a while to finish, so I need to send the tones manually.
Hmmm. I dunno. I used to be able to do something like that on an OLLLLD Motorola and some home (non-cellular) phones by using several speed-dial locations, and calling up each one as it was needed. But I never tried it with my 8525 (and don't really need that usability now).
Maybe you can give that a shot and let us all know if it works????
Good luck!
Thank you for that suggestion. Since it is a lot of combinations I would prefer to use DTMF. I really don't know wherther you can send DTMF tones on 8525. Also I saw in the install notes of HTweakC 2.1 for Hermes that it would enable DTMF support. I guess I don't know how to use that feature. Can somebody please tell what I am missing?
DTMF
I had issues with this also.
I used the HTweakC 2.1 to turn on (then off / then back on again with soft resets each time.) (Don't forget to "save and exit" after changes.) the DTMF support.
Opened the phone app and went into options. Set DTMF to short.
Used the following format for the contact phone number.
(111) 111-1111w11111#w11111#
Everytime you get to a w, the phone will wait for you to press the send key.
I also was able to use the p to do a 2 second pause.
For some reason I had to redo the contact several times before it would work.
Good luck.

[search] DTMF dialer

I think i saw a program here wich was able to work as a DTMF dialer, but i´m not shure.
I need a program wich can generate the dtmf-tones from my outlook contacs and add some special number in front of them.
My problem: here at work we only have dect-phones with a storage for 20 numbers. I have all numbers im my private phone so i´d like to have my private phone make my work phone dial the given number plus a special string ( "01" and my password) and so on.
Does anybody know such a tool?

mystery bug -using an access code to dial internationally - TouchHD/WM6.1

Hello,
I often use an access code to dial internationally, and once I am connected to that access number, I have to enter the number of the person I am calling.
I have an HTC Touch HD with WM6.1pro and cannot find a way to do it. If I connect to the access number, then at the prompt go to my address book and dial a second number, it assumes I want to have two separate calls and puts the access code on Hold... which is not what I want! I do not remember all my friend's numbers, so I do have to use the address book.
With my old nokia n95, once connected I could go to the menu and say I want to dial a DTMF which is the tone you hear when dialing a normal phone. This allows me to follow on with calling the number I need while connected to the call.
Is there a way of doing this on WM6?
I have a kind of work around. I edit my international friends phone numbers as a "car phone" and the numbers look like this
02081802828 p 0027115555555
the access code, then I add p to pause then their number.
The HUGE problem is that when I dial any of my international contacts, the phone displays the same person... so no matter who I call internationally, it always shows a photo of my friend Ian, and displays his name instead of the person I am actually speaking to. I think this is a bug where WM6.1 only looks at the first 11 characters of a number, but the problem is, all my intl numbers have the same first 11 numbers.
Help MUCH appreciated, thanks,
Mark.
livegod said:
Hello,
I often use an access code to dial internationally, and once I am connected to that access number, I have to enter the number of the person I am calling.
I have an HTC Touch HD with WM6.1pro and cannot find a way to do it. If I connect to the access number, then at the prompt go to my address book and dial a second number, it assumes I want to have two separate calls and puts the access code on Hold... which is not what I want! I do not remember all my friend's numbers, so I do have to use the address book.
With my old nokia n95, once connected I could go to the menu and say I want to dial a DTMF which is the tone you hear when dialing a normal phone. This allows me to follow on with calling the number I need while connected to the call.
Is there a way of doing this on WM6?
I have a kind of work around. I edit my international friends phone numbers as a "car phone" and the numbers look like this
02081802828 p 0027115555555
the access code, then I add p to pause then their number.
The HUGE problem is that when I dial any of my international contacts, the phone displays the same person... so no matter who I call internationally, it always shows a photo of my friend Ian, and displays his name instead of the person I am actually speaking to. I think this is a bug where WM6.1 only looks at the first 11 characters of a number, but the problem is, all my intl numbers have the same first 11 numbers.
Help MUCH appreciated, thanks,
Mark.
Click to expand...
Click to collapse
Don't know if it will work... but you coud try (using Advanced Config) to increase the number of digits used to "match" the numbers in the contacts... for example to 18 or 19 numbers... but I cannot immagine what other "consequencies"could happen...
Let us know !
Regards,
K
Hi Kostas
It seems that the problem is actually with spb Mobile Shell and not windows mobile.
When I dial using the windows mobile dialler, it gets the name and picture right, but when I use spb's dialler it shows the wrong person and name...
I will chase it up with them... and thanks for the good idea, unfortunately the Call ID Match does not help the problem.
Efgaristo!
Mark.

Categories

Resources