?
Solved

Dialing a phone number

Posted on 1998-11-14
16
Medium Priority
?
175 Views
Last Modified: 2010-04-04
I'd like to add to my application the ability to make telephone calls. How can I reach a modem and make a call, as well as check if the line is busi.
0
Comment
Question by:sassas081597
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
16 Comments
 
LVL 2

Expert Comment

by:lortega
ID: 1346835
At this time the best that you can do is open the ports manualy using the windows APIs...

to open the port call CreateFile where the filename is the word "COM" and the port number...

to read and write to the file you must use WriteFile and ReadFile

and then CloseHandle to close the file...

after you have the port opened you must write the string ATDT for tones lines or ATDP for pulse line and wait for responce... that responce can be retreive using ReadFile...


good luck,
luis
0
 
LVL 4

Expert Comment

by:dwwang
ID: 1346836
There are many dial components on the Internet, you can go to DSP and search for 'dialer'.
0
 
LVL 4

Expert Comment

by:dwwang
ID: 1346837
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 1

Author Comment

by:sassas081597
ID: 1346838
Thank you dwwang!
I try to look through the file you proposed and if it works, I will grade you.
0
 
LVL 4

Expert Comment

by:dwwang
ID: 1346839
I must say that there are many such kind of components on the Internet, I think this one will surely work, but maybe one can find better ones.
0
 
LVL 1

Author Comment

by:sassas081597
ID: 1346840
I've looked through the components on DSP, including one you called. They are inacceptable. They use only a standart function, that calls Windows Dialer (forgetting to close it after dial). What do I really want is, as far as I know yet, is a TComponent like the following:

TDialer=class(TComponent)
public
  function Dial(...): Boolean;//Dials and if OK returns true
  function HangUp(): Boolean;//try to hang up
  procedure PlayGreetingMessage(aFileName: String,...);
published
  property PhoneNumber: String;
  property CalledParty: String;//Who do you reach by phone
  property LineStatus: TLineStatus;{TLineStatus=(lsFree, lsBusy, lsUsedByYou,...)}
  property TimesToRedial: ShortInt;
  property BeforeDial: TNotifyEvent;
  property AftrerDial: TNotifyEvent;
  property AfterHangUp: TNotifyEvent;
end;
Of course I do not show here the private and protected sections, as well as constructor and destructor. The properties are also incomplete - so all other is on your site.
I can accept not only the component I showed above but also all answers, that can help me to create this component. I can accept answers where the standart Windows Dialer is used only in case that it is closed after Dial.
0
 
LVL 4

Expert Comment

by:dwwang
ID: 1346841
Hi, sorry for not testing it before suggestion.
As I said, there are many such components over Internet, although might not fully according to your requires. Such as:

http://www.argosoft.com/tdialer.html

or the full TAPI translation which let you develope your own telephone softwares:

http://www.delphi-jedi.org/jediteams/files/J_TAPI.ZIP

Good luck.
0
 
LVL 1

Author Comment

by:sassas081597
ID: 1346842
Hi,
I dowmloaded all units you wrote. As to TDialer - it is a new version of one of the components I downloaded from DSP. It is good but not for me. Another time they realized only the dial property (however in a very interesting measure).
As to J_TAPI - it is a good TAPI interface and I try to use it after I study the TAPI Help. However it takes time - the time I tried to save not studiing Help files but asking experts.
Nevertheless I still wait for comments and answers.
SASSAS
0
 
LVL 4

Expert Comment

by:dwwang
ID: 1346843
Hi, I forgot to say that I have a MsgVoc component, implementing many telephone functions, it can even send RAW file format voices through telephone. However, it requires Voice modem, do you like to have a try?
0
 
LVL 1

Author Comment

by:sassas081597
ID: 1346844
Of course. My address is smoliak@usa.net.
As to me - this program is for Voice modems.
0
 
LVL 4

Expert Comment

by:dwwang
ID: 1346845
Hi, the component is sent. I'll be on a trip tomorrow, so if it helps, just leave me a message, and I'll "answer" this question after I get back. :)
0
 
LVL 1

Author Comment

by:sassas081597
ID: 1346846
Thank you dwwang. I received your mail. However now I cannot test it because of time shortage. Let me do it on Saturday. Then I could grade you.
0
 

Expert Comment

by:Till
ID: 1346847
You shouldn't do the stuff via the COM ports but using the RAS API. Search the help file on the win32 api for all functions that begin with Ras... - RasDial, for example, is the function that lets you dial a phone number. As a parameter to the function, you can also specify a callback function that tells you when the connection is established, the user has authenticated and so on.
0
 
LVL 1

Author Comment

by:sassas081597
ID: 1346848
Till
I tried to use RAS for a week, creating my own component, however I found out that this is not for me. I need to use a modem as telephone not as connector to another computer.
That is why I reject your answer and prefer the comment dwwang.
0
 
LVL 4

Accepted Solution

by:
dwwang earned 150 total points
ID: 1346849
That's great :)
0
 

Expert Comment

by:strang
ID: 1346850
hi,i'm finding a phonecall component,can you give me one copy?
strang@263.net
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses
Course of the Month11 days, 20 hours left to enroll

752 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