Solved

Capture input through a modem

Posted on 2007-03-22
5
300 Views
Last Modified: 2013-12-27
Is it possible to capture input (ex. someone hits the number '2' on their phone pad to answer 'no' to a question) through a modem?  Currently I'm using the following to make the phone calls...
            TelePhone = CREATEOBJECT('Form')
            TelePhone.ADDOBJECT("Dial","Olecontrol","MSCOMMLib.MSComm")
            TelePhone.Dial.CommPort = CommPortUsed && Use Serial Port.
            TelePhone.Dial.Settings = "14400,N,8,1"  && 14.4 Kbaud, No Parity, 8 data Bits, 1 Stop Bit
                  TelePhone.Dial.PortOpen = .T.
            TelePhone.Dial.OUTPUT = M.tele + CHR(13) && Dial the number
etc.
0
Comment
Question by:LexLuthar
  • 2
  • 2
5 Comments
 
LVL 33

Accepted Solution

by:
CarlWarner earned 250 total points
ID: 18776158
How to receive from the serial port by using MScomm32.ocx in Visual FoxPro
http://support.microsoft.com/default.aspx?scid=kb;en-us;140525
0
 

Author Comment

by:LexLuthar
ID: 18777770
I've tried my best guess at the proper syntax.   What would be the specific code knowing this code...?
            TelePhone = CREATEOBJECT('Form')
            TelePhone.ADDOBJECT("Dial","Olecontrol","MSCOMMLib.MSComm")
            TelePhone.Dial.CommPort = CommPortUsed && Use Serial Port.
            TelePhone.Dial.Settings = "14400,N,8,1"  && 14.4 Kbaud, No Parity, 8 data Bits, 1 Stop Bit
                  TelePhone.Dial.PortOpen = .T.
            TelePhone.Dial.OUTPUT = M.tele + CHR(13) && Dial the number
------
is it
Telephone.Dial.input
or
Telephone.Dial.Buffer
or
buffer=Telephone.Dial.input
or
Telephone.Dial.inputlen=0
etc.
Help:(

0
 
LVL 8

Expert Comment

by:suhashegde
ID: 18777946


with Telephone.Dial
.inputlen = 0 && read the whole char in buffer
lcstr = .input
endwith

Now you will have to parse lcstr to check for the dialed number 2


0
 

Author Comment

by:LexLuthar
ID: 18780864
I added...
DO WHILE .T.
with Telephone.Dial
.inputlen = 0 && read the whole char in buffer
lcstr = .input
? lcstr
endwith
WAIT WINDOW TIME(.5)
ENDDO
the only thing printing on the screen was whatever value I gave to .inputlen.
If .inputlen=10 then the screen would fill up with '10' scrolling down the screen no matter what button I pushed on the phone:(
0
 
LVL 8

Assisted Solution

by:suhashegde
suhashegde earned 250 total points
ID: 18806342
sorry abt the last post.
Having Re-read your question
You will need to use TAPI in your application

Initialiseline()
..

0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question