Page Index Toggle Pages: [1] 2 3  Send Topic Send Topic Print Print
Very Hot Topic (More than 25 Replies) Phone Dialer (Read 11013 times)
SpencerWulwick
Senior Member
Members
*****
Offline



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Phone Dialer
Mar 13th, 2005 at 12:47pm
Print Post Print Post  
Can someone please help me with the "installation" of a phone dialer.  I knew (many years ago) how to do it in Q&A but that doesn't even give me a clue where to start, because I have long, long ago totally forgotten.

What I want to do is select (click on) any field containing a phone number and then click on a command button to have it dialed for me, so that all I would have to do, at the appropriate time, is lift the phone off the hook and be connected to the dialed number.

If it is any help, here is the code that someone gave me (I wouldn't have a clue how to write it myself), also many years ago, for MS Access.

Code
Select All
Private Sub CmdAutoDialer_Click()
On Error GoTo Err_CmdAutoDialer_Click

    Dim stDialStr As String
    Dim PrevCtl As Control
    Const ERR_OBJNOTEXIST = 2467
    Const ERR_OBJNOTSET = 91

    Set PrevCtl = Screen.PreviousControl

    If TypeOf PrevCtl Is TextBox Then
	stDialStr = IIf(VarType(PrevCtl) > V_NULL, PrevCtl, "")
    ElseIf TypeOf PrevCtl Is ListBox Then
	stDialStr = IIf(VarType(PrevCtl) > V_NULL, PrevCtl, "")
    ElseIf TypeOf PrevCtl Is ComboBox Then
	stDialStr = IIf(VarType(PrevCtl) > V_NULL, PrevCtl, "")
    Else
	stDialStr = ""
    End If

    Application.Run "utility.wlib_AutoDial", stDialStr

Exit_CmdAutoDialer_Click:
    Exit Sub

Err_CmdAutoDialer_Click:
    If (Err = ERR_OBJNOTEXIST) Or (Err = ERR_OBJNOTSET) Then
	Resume Next
    End If
    MsgBox Err.Description
    Resume Exit_CmdAutoDialer_Click

End Sub
 



Perhaps, for those of you more knowledgeable in programming, the code will provide some help for use in Sesame.

In any event, however it's done, it is critical to the database that I converted from Access to Sesame.    Looking forward to your suggestions.
  

- Spencer

    ** Practice random kindness & senseless acts of beauty!
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Phone Dialer
Reply #1 - Mar 13th, 2005 at 3:15pm
Print Post Print Post  
This is completely untested. I do not have a computer on hand that has anything attached to any of the serial ports (modems). Note: this uses COM1:. You may want a different communications port, and in any case, you will need to map the COM you do use to the appropriate hardware (if that has not been done already).

The following sets the DOS defaults for COM1: - It would be better to use the Windows device manager to preconfigure the port to the appropriate baud setting to get 56K.
Code
Select All
var sh as int

sh = @Shell("mode com1: baud=9600 parity=n data=8 stop=1")
 



Code
Select All
var fileNo as int

fileNo = FileOpen("COM1:")
FileWriteLn(fileNo, "+++") // Send command mode
FileWriteLn(fileNo, "ATZ") // Send modem reset
FileWriteLn(fileNo, "ATDT555-555-5555") // Dial the number
// Wait for connection
// Here write the data to the modem
FileWriteLn(fileNo, "+++ATH0") // Hang up.
FileClose(fileNo)
 


The code above assumes that you have a Hayes compatible modem. It also assumes that you are using tone dialing (use ATDP for pulse dialing). It should also use FileReadLn to read back the modem's responses. Hayes modems will usually reply "OK" if a command works and is done.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
SpencerWulwick
Senior Member
Members
*****
Offline



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Re: Phone Dialer
Reply #2 - Mar 13th, 2005 at 4:14pm
Print Post Print Post  
"Cow"  -

My modem has already been configure in Windows XP.  It is a "Generic 56K HCF Data Fax Modem" attached to COM3 (and uses tone dialing).  I assumed, therefore, that I do not need to use the first portion of code you provided and that, in the second portion of code I simply needed to replace "Com1" with "Com3" (which, of course, I did).

I tried the programming on element entry in the CommandButton element.  When it didn't work, I also tried it in one of the phone fields.  Still no luck.

I went back to my original MS Access database, clicked on the command button and it worked just fine.  So I know that the communications are working.  The code in Sesame isn't.

Any suggestions as to where I go from here ... and, please, remember that this is a public forum.  lol

Seriously, I desparately need this feature.  I would think that someone else already has this "in place" since it is a fairly common need in any type of contact database.

Thanks!
  

- Spencer

    ** Practice random kindness & senseless acts of beauty!
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Phone Dialer
Reply #3 - Mar 13th, 2005 at 4:20pm
Print Post Print Post  
Quote:
I went back to my original MS Access database, clicked on the command button and it worked just fine.  So I know that the communications are working.  The code in Sesame isn't.


I assumed that you were trying to connect using a modem (not a telephone to another person). If all you are trying to do is dial the phone (not send data), there are a number of third party phone dialers available that can be "shelled" - including one built into windows. In Win2000, it is at c:\Program Files\Windows NT\dialer".
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: Phone Dialer
Reply #4 - Mar 13th, 2005 at 5:55pm
Print Post Print Post  
Will have to dig deeper in some old stuff, but I seem to recall just doing "echo atdt1234567890 >com1" or something like that.   Will have do some homework.....
  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
SpencerWulwick
Senior Member
Members
*****
Offline



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Re: Phone Dialer
Reply #5 - Mar 13th, 2005 at 7:02pm
Print Post Print Post  
Hey Bob -

As I said before, I'm very surprised that this hasn't become a "routine task" by now. 

In any event, I looked through my Q&Answerman database again and, this time, I found a record dealing with the issue (that I must have overlooked previously).  It had the "original solution" for Q&A 5.0 using the @shell command to a .bat file (I believe those things are still available in Windows XP).  (If you're interested in looking at the Q&Answerman solution [and the article I had written in the April 1996 issue of The Q&Answerman newletter], just search for a keyword of "Dialer."  It should bring up only the correct record).

So, if necessary (and for now at least), I will try playing with a batch file.   For some reason, though, I feel like I am going back into the "dark ages" and can't help but feel that there must be an easier  - more direct - way to do this in a program as sophisticated as Sesame.

  

- Spencer

    ** Practice random kindness & senseless acts of beauty!
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Phone Dialer
Reply #6 - Mar 13th, 2005 at 7:14pm
Print Post Print Post  
Spencer,
The code posted before should dial just fine. Remove the lines that hang up the phone - and you should have what you need. If it does not dial, when connected to a modem on the same line as the phone, check the COMn: port, using the mode command.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
walk-2-fly
Ex Member


Re: Phone Dialer
Reply #7 - Mar 13th, 2005 at 7:21pm
Print Post Print Post  
http://www.quickanswer.com/dnlds2.htm

contains the Q&A 5.0 tool DIALER.zip to download...
  
Back to top
 
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: Phone Dialer
Reply #8 - Mar 13th, 2005 at 8:37pm
Print Post Print Post  
I may have been right. 
The contents of the batch file in the Dialer referenced above is
"Echo ATDT %1 > Com1",
identical to my earlier posting.

And I just located this site that discusses how to communicate to your modem from the command line.

You should be able to test these out from a Command Prompt (DOS) window before putting into your batch file.  Change the COM Port as needed, in your case, use COM3.  And I think that you will also need to start that process  first with the MODE command that Mark noted in his earlier code.

Syntax for MODE is:
MODE COMm[:] [BAUD=b] [PARITY=p] [DATA=d] [STOP=s] [RETRY=r]

In Sesame call a batch file (dialer.bat) sending phone number as %1 with these contents:
Code
Select All
mode com3: baud=9600 parity=n data=8 stop=1
echo atdt%1>com3 



Code
Select All
var vDial as Int
var  vPhoneNumber as INT //Number to be dialed

vPhoneNumvber = PhoneNumber LE

vDial = @Shell("dialer.bat vPhoneNumber")  



(Also untested, no active modem connection to serial port for testing)

  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
walk-2-fly
Ex Member


Re: Phone Dialer
Reply #9 - Mar 13th, 2005 at 8:53pm
Print Post Print Post  
Spencer,

switching the .bat batch file content of:

http://www.quickanswer.com/Dnloads/dialer.zip

from current COM 1 to COM 3 and after treatment by Sesame´s Q&A file translator along with some modifications to link up your customer database content to the dialer, you would then not only own a dialing tool but a phone log book along with a searchable comment field too... ( imagine, just typing the nickname of your girl friend and BINGO, you are almost connected..., and drop a rendezvous-date within the comment lines sequel to the motto: NEVER FORGET - NEVER REGRET..., a meeting with your loved one)
  
Back to top
 
IP Logged
 
Bharat_Naik
Senior Member
Members
*****
Offline


Ever ready to learn and
share

Posts: 1202
Location: Chicago,  Illinois
Joined: Dec 16th, 2003
Re: Phone Dialer
Reply #10 - Mar 14th, 2005 at 2:34pm
Print Post Print Post  
Did anybody get the dialer to work? On Windows XP, I could not get any above codes to work.  As such it is not essential for me to have it but just wondering why the above batch file as well as Mark's code is not working.

I have  phonetools and it dials out fine to send Fax and make dial up connection in case of need. Also Hyper Terminal dials out. I do not have any command line info on any one of them.

It is good to have this in place in Sesame for application such as Contact Manager.
  
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Phone Dialer
Reply #11 - Mar 14th, 2005 at 3:49pm
Print Post Print Post  
Quote:
I went to a command prompt and typed:

     Echo ATDT > Com3

Do you have a file called "Com3" sitting in the directory you were in when you ran the above command. I think it is necessary for the com name to be followed by a colon: "Echo ATDT > COM3:" The colon tells DOS that you are using a device, not a file.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: Phone Dialer
Reply #12 - Mar 14th, 2005 at 3:51pm
Print Post Print Post  
I saw reference here to Hyper Terminal which made me think of Dial-UpNetworking (DUN).

Dial-Up Networking can be called from the command line, but it only works for predefined numbers.

1.  Create a named connection in Dial-Up Networking.
2.  Have Sesame call something like the following lines:
Code
Select All
var vDial as Int
vDial = @Shell("rundll rnaui.dll,RnaDial MyConnectionName")  



The only problem here is that a named Dial-Up Networking Connection must already exist.  It is called by name, does not accept a number.  This is also space and case sensitive .  So it does not lend itself to running from a LE in individual records unless you have already made a DUN connection for every unique number in all of the records.

If still interested, see this page for Dial-Up networking comand line information
  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
SpencerWulwick
Senior Member
Members
*****
Offline



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Re: Phone Dialer
Reply #13 - Mar 14th, 2005 at 3:53pm
Print Post Print Post  
Unfortunately, I have still not gotten my phone dialer set up.  I discovered, however, that there must be a very basic problem.

I went to a Command Prompt and typed:

    Echo ATDT >Com3   

which - from everything I've read here in the forum, in the communication link Bob Hansen was kind enough to provide and elsewhere - SHOULD work and I should HEAR a dial tone.  I do NOT hear a dial tone.

Alternatively I added the colon, as suggested and typed:

     Echo ATDT >Com3:

and that did not work.  (I also tried tried it including %1 and with an actual phone number and that made no difference).

I know that the echo command works because when I typed:

     Echo Hello World

I saw Hello World on the screen.

I know that the piping works because when I typed:

    Echo Hello World > LPT1

Hello World printed on my HP Laserjet 5 printer.

I know that the modem itself works because when I use MS Access' built-in phone dialer (WOULDN'T IT BE NICE TO HAVE ONE IN SESAME!!! - hint hint)  Smiley  the dial-tone works just fine and my call is properly executed.

So, now, I am waiting until I can discuss this with my 'hardware/Windows XP' expert to see whether he has any suggestions.

Walk-To-Fly - I appreciate your suggestion about the Q&A 5.0 phone dialer file; however, I would prefer not having to convert a database from Q&A (which I haven't done yet) and I don't necessarily need the other features (such as reminders which I can handle within Sesame).  Also, I prefer to get the batch file working because then I can make my own choices such as whether I want to provide a command button for each phone number (home, work, etc.) or whether I can handle it by on-focus of the layout element, or a list, etc. etc.  I will certainly keep this software in mind, though and thank you for recommending it.

It is just very frustrating that I was able to do this so easily with Q&A 5.0 as long as nine years ago and am having so much difficulty getting it to work in Sesame (and/or Windows XP).

Finally, in case anyone is interested, when I typed

     mode com3: baud=9600 parity=n data=8 stop=1

this was my on-screen result:

C:\>mode com3: baud=9600 parity=n data=8 stop=1

Status for device COM3:

     Baud            9600
     Parity:            None
     Data Bits:            8
     Stop Bits:            1
     Timeout:            ON
     XON/XOFF:      OFF
     CTS handshaking:      OFF
     DSR handshaking:      OFF
     DSR sensitivity:      OFF
     DTR circuit:      ON
     RTS circuit:      ON

(whatever that means)  Smiley
  

- Spencer

    ** Practice random kindness & senseless acts of beauty!
Back to top
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: Phone Dialer
Reply #14 - Mar 14th, 2005 at 3:58pm
Print Post Print Post  
Hi Spencer...

From the Command Prompt, did you run the MODE command first?
mode com3: baud=9600 parity=n data=8 stop=1

Then follow that with the echo
echo atdt 1234567890>com3

--------------------------------------
The normal ehco output is to the screen
The redirection ">" is normally to a file or a port.
The Mode command configures the port defined in the mode command.
  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
Page Index Toggle Pages: [1] 2 3 
Send Topic Send Topic Print Print