Very Hot Topic (More than 25 Replies) Phone Dialer (Read 11014 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
 
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 #15 - Mar 14th, 2005 at 5:29pm
Print Post Print Post  
Please see the following link:
http://www.pcplus.co.uk/tips/default.asp?pagetypeid=2&articleid=5545&subsectioni...

dial.exe <phonenumber>  command line dials the phone.  It works fine.
  
Back to top
 
IP Logged
 
walk-2-fly
Ex Member


Re: Phone Dialer
Reply #16 - Mar 14th, 2005 at 6:27pm
Print Post Print Post  
Spencer,

all well understood, you simply want to own a "wielding stick" to slash down the problem, so, I think, this tool:

http://www-2.cs.cmu.edu/~citrine/CitrineDialer.exe

is what you are looking for, you drag the cursor above the phone number to copy it to the dialer and off you go ... Cheesy
  
Back to top
 
IP Logged
 
SpencerWulwick
Senior Member
Members
*****
Offline



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Re: Phone Dialer
Reply #17 - Mar 14th, 2005 at 7:05pm
Print Post Print Post  
Bharat -

Thanks for the download info; that is getting me closer to what I want.  Ironically, I do believe it is simply accessing a Windows XP utility.  It is frustrating that I can't access it in Windows directly.  If I use dialer.exe, it brings up a more elaborate screen with provisions for video, conferencing, etc. .... not what I want.

In any event, I CAN get the Dial.Exe that I downloaded to execute from the RUN command in Windows by providing the path followed by a space followed by a valid phone number.  Try as I may, however, I cannot come up with programming to use @shell to run the Dial.Exe and pass a phone number from my database.

If you have manageed to do this, since you said "problem solved," can you PLEASE provide me a sample of the code you used.

Thanks!
  

- Spencer

    ** Practice random kindness & senseless acts of beauty!
Back to top
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2480
Joined: Aug 20th, 2003
Re: Phone Dialer
Reply #18 - Mar 14th, 2005 at 7:12pm
Print Post Print Post  
Hello Spencer,

The programming is just

Code
Select All
 Var vReturn as Int
vReturn = @Shell("C:\Utilities\dial.exe " + Phone) 



Phone is the name of the phone number element and dial.exe is located in C:\Utilities

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
SpencerWulwick
Senior Member
Members
*****
Offline



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Re: Phone Dialer
Reply #19 - Mar 14th, 2005 at 7:22pm
Print Post Print Post  
Ray -

I've tried that all variations of that.  I see the black screen flashing, but the program is not executed. 

I'm totally baffled.
  

- Spencer

    ** Practice random kindness & senseless acts of beauty!
Back to top
IP Logged
 
walk-2-fly
Ex Member


Re: Phone Dialer
Reply #20 - Mar 14th, 2005 at 7:34pm
Print Post Print Post  
Spencer,

another aspect, the Citirine Dialer automatically turns field formatted (813) 286-8498 into 813 286 8498 ..., and works everywhere in Windows and the Web.
  
Back to top
 
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2480
Joined: Aug 20th, 2003
Re: Phone Dialer
Reply #21 - Mar 14th, 2005 at 7:40pm
Print Post Print Post  
Spencer,

Where is dial.exe located on your computer? If it is in a directory with a space in it you have to change the code to

Code
Select All
vReturn = @Shell(@Chr(34) + "C:\Program Files\dial.exe" + @Chr(34) + " " + Phone) 



-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
SpencerWulwick
Senior Member
Members
*****
Offline



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Re: Phone Dialer
Reply #22 - Mar 14th, 2005 at 11:24pm
Print Post Print Post  
HALLELUJAH!  ......  HALLELUJAH!


THANK YOU!  THANK YOU!  THANK YOU!

I thought + " " would take care of the space; however, apparently it didn't.  I don't need the last + " " in the code you provided because the ASCII character took care of that one, too.  

I am having a little problem dialing long-distance calls but, hopefully, I'll resolve that when I have time to play with it.

Also, I have 6 phone fields so I have to decide whether I want to have a command button for each one or whether I can use a list box to select which phone number I want to dial.

But I am so ENCOURAGED that indeed this can be done without Bat files and without 3rd party software.

THANK YOU!  THANK YOU!  THANK YOU!

  

- Spencer

    ** Practice random kindness & senseless acts of beauty!
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 #23 - Mar 14th, 2005 at 11:41pm
Print Post Print Post  
The following code will go on the Element Entry event of the the command button

Code
Select All
var VSuccess as Int
var vPhonenumber as String = Phone1    //phone element name
var vAreacode as string = "773"   //Area code
var vName as String = Name    //if firstname and last name change accordingly
var vPath as String = "C:\utilities\"  //path for dial.exe utility


vPhonenumber = @num (vPhonenumber)

If @len (vPhonenumber) = 10 then
      {
            If @left (vPhonenumber, 3) = vAreacode then
            {      
                  vPhonenumber = @Right (vPhonenumber, 7)
            }
            Else
            {
                  vphonenumber = 1 + vPhonenumber
            }
      }

vsuccess = @Shell(@Chr(34) + vPath + "dial.exe" + @Chr(34) + " " + vPhonenumber  + " [" + vName +"]")

If not vSuccess = 0 then
      {
            @msgbox ("Problem!!! Dialer did not work.", "", "")

      }

 



The above code will also display the name of the person you are calling. It will also remove the various format element like (    ) -     - from the phone# and add 1 in the begining if it is required. If you are calling locally, it will dial only seven digits as required.

You have to download free dialing utility from following site
http://www.pcplus.co.uk/tips/default.asp?pagetypeid=2&articleid=5545&subsectioni...

As such the above utilizes dialer.exe that comes with the operating system.
  
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 #24 - Mar 15th, 2005 at 12:00am
Print Post Print Post  
Quote:
Also, I have 6 phone fields so I have to decide whether I want to have a command button for each one or whether I can use a list box to select which phone number I want to dial.


Spencer,
It would be more practical to put a small command button beside the phone# with just an arrow on it with each phone# field.
What you have to do is to put the above code in the Globalcode area as subroutine procedure and you can point to it from various command buttons having a simple code like -

vPhonenumber = CellularPhone //cellular Phone
DialPhone ( )


Globalcode:
var vPhonenumber as String

Subroutine DialPhone ( )

(the code mentioned in the previous post will go here as subroutine in Globalcode are)

end Subroutine

  
Back to top
 
IP Logged
 
SpencerWulwick
Senior Member
Members
*****
Offline



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Re: Phone Dialer
Reply #25 - Mar 15th, 2005 at 7:06am
Print Post Print Post  
I am still having the most horrific time working with the phone dialer (although I am still delighted that parts of it are working just fine).

It may help to know that my (10-digit) telephone numbers are formatted (on element exit) as (123) 123-1234.

I am currently using the following code:

Code
Select All
Var vReturn as Int

if @lt(home,5) = "(813)" or @lt(home,5) = "(727)" then
Vreturn = @shell(@chr(34) + "C:\Program Files\sesame\utilities\dialer.exe" + @Chr(34) + Home)

if not @lt(home,5) = "(813)" or @lt(home,5) = "(727)" then
Vreturn = @shell(@chr(34) + "C:\Program Files\sesame\utilities\dialer.exe" + @Chr(34) + Home)

If not vReturn = 0 then
    
            @msgbox ("Problem!!! Dialer did not work.", "", "")  



If the number I am dialing begins with area code (813) or (727) it works just fine.

I am making some assumptions based on this:

1)  FOR AREA CODE 813:  The utility program itself must know to ignore the symbols ( ) and - because it shows that the number I am dialing as (123) 123-1234 ... and dials it properly.  It does NOT dial the area code and this, perhaps, is because of my windows settings.

(In the control panel under Phones & Modems, the Dialing Rules reflect that the area code from which I am dialing is 813).

2) FOR AREA CODE 727:  I MUST first dial the area code but must NOT dial the 1 first.  In this case, my programming is apparently accepted "as is."

3) FOR ALL OTHER AREA CODES:  Naturally, I have to dial a 1 first and apparently the utility program does not know to automatically do this because - using the above code - I get a "wrong number" each and every time.

I have tried DOZENS and DOZENS of code variations to get the 1 prefix added to the number.  I have tried the following code:

Code
Select All
Var vReturn as Int

if @lt(home,5) = "(813)" or @lt(home,5) = "(727)" then
Vreturn = @shell(@chr(34) + "C:\Program Files\sesame\utilities\dialer.exe" + @Chr(34) + Home)

if not @lt(home,5) = "(813)" or @lt(home,5) = "(727)" then
Vreturn = @shell(@chr(34) + "C:\Program Files\sesame\utilities\dialer.exe" + @Chr(34) + 1 + Home)

If not vReturn = 0 then
    
            @msgbox ("Problem!!! Dialer did not work.", "", "")  



In this case, the msgbox appeared.

I have also tried many variations of the code Bharat recommended and nothing has worked.

In one case (which unfortunately I can't replicate at present) I got a message that windows could not find:  C:\Program Files\Sesame\Utilities\Dialer.exe11232331234. 

Woe is me!!!
  

- Spencer

    ** Practice random kindness & senseless acts of beauty!
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 #26 - Mar 15th, 2005 at 7:43am
Print Post Print Post  
The code I have posted above take care of all of that.  The new posting that I have posted in the "Focus" topic, you do not have to worry about the Element Name in  your application. Just simply place that code in respective elements, substitute the vpath, vName and vAreacode for the value that suites you and your system as suggested and it should just work just fine.
  
Back to top
 
IP Logged
 
SpencerWulwick
Senior Member
Members
*****
Offline



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Re: Phone Dialer
Reply #27 - Mar 15th, 2005 at 7:52am
Print Post Print Post  
Bharat -

I'll definitely try the code you recommended (even though it apparently is not necessary for me to strip the ()- symbols or disect the area code & phone number in the 813 or 727 area codes).  But I am still concerned that having limited my programming to just one field, I istill can't get it to work with area code other than 813 or 727.  I did try a variation that included using the variable for the phone number and using the coding you did.  As I said I am unable to replicate it right now; however, it should have worked and didn't.

I want to assure you that I appreciate and will use the code you suggested.  It is important to me, though, to fully understand any "gift" code so that I am able to manipulate it if I need to and, hopefully, to be able to use variations of it at a future date.

Right now, I am going to take a break (to play Spades on the Internet) even though I should be in bed.  But, I need a little recreation other than Sesame.  Smiley
  

- Spencer

    ** Practice random kindness & senseless acts of beauty!
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 #28 - Mar 15th, 2005 at 7:59am
Print Post Print Post  
Quote:
In one case (which unfortunately I can't replicate at present) I got a message that windows could not find:  C:\Program Files\Sesame\Utilities\Dialer.exe11232331234.   


Are you using dial.exe or Dialer.exe?  What you downloaded was dial.exe.  Dial.exe uses Dialer.exe which comes with the operating system. I could not get the dialer.exe work properly by itself.

You may be missing a space - Dial.exe11232331234 should be Dial.exe 11232331234
  
Back to top
 
IP Logged
 
SpencerWulwick
Senior Member
Members
*****
Offline



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Re: Phone Dialer
Reply #29 - Mar 15th, 2005 at 9:26am
Print Post Print Post  
I renamed Dial.exe Dialer.exe

As far as I know my programming provides for the space
  

- Spencer

    ** Practice random kindness & senseless acts of beauty!
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 #30 - Mar 15th, 2005 at 12:58pm
Print Post Print Post  
Quote:
if @lt(home,5) = "(813)" or @lt(home,5) = "(727)" then
Vreturn = @shell(@chr(34) + "C:\Program Files\sesame\utilities\dialer.exe" + @Chr(34) + Home)

if not @lt(home,5) = "(813)" or @lt(home,5) = "(727)" then
Vreturn = @shell(@chr(34) + "C:\Program Files\sesame\utilities\dialer.exe" + @Chr(34) + 1 + Home)


Your code above did not provide for the spacee.

Vreturn = @shell(@chr(34) + "C:\Program Files\sesame\utilities\dialer.exe" + @Chr(34) + Home)

is missing a space, it should be

Vreturn = @shell(@chr(34) + "C:\Program Files\sesame\utilities\dialer.exe" + @Chr(34) + " " + Home)

Renaming the Dial.exe to Dialer.exe could be the part of the problem, since Dial.exe works through the Dialer.exe, it might be pointing to the same executable file.
  
Back to top
 
IP Logged
 
BOBSCOTT
Senior Member
Members
*****
Offline


That Darn Computer #$X#
{curse words}

Posts: 1195
Joined: Nov 22nd, 2002
Re: Phone Dialer
Reply #31 - Mar 15th, 2005 at 2:56pm
Print Post Print Post  
Bharat,

The dialer and code is great. Smiley
It should probably be added to programming examples so others can use this as a starting point.

I was doing something similar using a utility called Easydial32 by Wolfgang John. Unfortunately he has retired and removed the product from availability and the older version does not work as well with the newer operating systems.

The nice part about easydial32 was the ability to have it dial and then automatically exit. This allowed for pressing a command button the number was dialed and logged and then all the user needed to do was pickup the handset and talk. No need to do anything to remove the pop-up screen or hang up the phone.

Has anyone found documentation on dial.exe that allows us to control how it functions, such as display positions, log off times etceteras. 

Thanks
  

Team – Together Everyone Achieves More
Back to top
 
IP Logged
 
SpencerWulwick
Senior Member
Members
*****
Offline



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Re: Phone Dialer
Reply #32 - Mar 15th, 2005 at 5:50pm
Print Post Print Post  
Bharat -

I do not think that renaming Dial.exe to Dialer.exe presented any problem because as I said, for certain area codes it was working just fine.

Nevertheless your thoughts about it make perfectly good sense and I have gone ahead and renamed it back to Dial.exe (and, of course, changed my programming accordingly).

Something is really 'funny' about the 'space' issue.  I never had it in the portion of code for dialing area codes (813) and (727) and it presented no problem.

So naturally, I simply 'copied' that portion of the code to the portion for all other area codes. For some reason (unclear to me - but that doesn't matter), it does need the space when adding the '1' to the number .... so I put it in (but only for long distance calls).

And, guess what?
                                 
IT WOIKED!!!


So,  BLESS YOU, BLESS YOU, BLESS YOU!!!!

Now, I can hardly wait to try your other suggested code for being able to dial the number using the focused element.  Guess what I am going to do .....

RIGHT NOW?!!!!
lol

Thanks, so much for all the help.  Will be back later (I hope) with my 'final' code.
  

- Spencer

    ** Practice random kindness & senseless acts of beauty!
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 #33 - Mar 15th, 2005 at 9:48pm
Print Post Print Post  
Bob Scott,

As per your suggestion, I have placed the information in the programming examples. Thank you.

Quote:
Has anyone found documentation on dial.exe that allows us to control how it functions, such as display positions, log off times etceteras.  


dial.exe is basically using dialer.exe (TAPI) that comes with the MS Windows operating system.  It basically points to dialer.exe that does not seem to have command line code that includes picking up the phone and name, etc.  I believe documentation for dialer.exe will be also applicable to dial.exe.  
  
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 #34 - Mar 16th, 2005 at 12:13am
Print Post Print Post  
Spencer:

You may be setting yourself up for a future problem, or a problem on another system by renaming dial.exe to dialer.exe.

I don't remember the source, but I seem to recall being cautioned about that very thing.  Appareantly Windows (some versions?) include dialer.exe as a normal file.  Many modem packages will remove the file named dialer, and replace it with its own.

I would suggest that before you rename dial.exe to dialer.exe, that:
1.  If it exists, make a copy of existing dialer.exe as win_dialer.exe.
2.  Keep another copy of your dial.exe, maybe a copy as my_dialer.exe.

That way, if you need to install/update some modem/fax drivers/files, if they delete dialer.exe you will have a copy of the file you need readily available.

------------------------------------------------------
I am curious, why bother to rename dial.exe at all?  Why not keep it as that name?
  



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 #35 - Mar 16th, 2005 at 6:00pm
Print Post Print Post  
Bob -

I had simply changed the name to Dialer.exe because it seemed to be more 'definitive.'

As soon as Bharat pointed out the possible conflict, I changed it back to Dial.exe. I imagine that you didn't see my response to him.

Thanks!
  

- Spencer

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



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
DialPhone ( ) Re: Phone Dialer
Reply #36 - Mar 16th, 2005 at 7:05pm
Print Post Print Post  
Bharat -

I am:     ECSTATIC!!!!

You have absolutely come up with THE definitive solution I was looking for.   As most people can tell from the previous posts, I have been playing with this for the past couple of weeks and for the past couple of days have worked on practically nothing but this.  What is ironic, is that the solution is extremely simple, the programming code is minimal and the results are phenomenal.

To summarize, here's what I did and here's my 'final' code.

First, I downloaded Dial.exe from the link you provided as  [url]http://www.pcplus.co.uk/tips/default.asp?pagetypeid=2&articleid=5545 &subsectionid=390 [/url] and I installed it in the Utilities folder of my Sesame program files.  (It still 'bugs' me because I know that this utility is included in Windows XP and I just don't know how to access it).

Before I provide the code, please remember that I have six separate phone fields. Here, see for yourself:



Also, while most people need to dial local numbers without an area code and long-distance prefixed with 1, I had one additional need.  When I call St. Petersburg (727) I have to dial the area code but cannot use the 1 prefix.  (This seems to be coming more common for 'regional' call dialing).

Based on your suggested code which you posted in another section of the forum ...  http://www.lantica.com/Forum2/cgi-bin/yabb/YaBB.pl?board=gen_disc;action=display... ....
I simply placed the following code in my global code element:

Code
Select All
var vPhonenumber as String

Subroutine DialPhone ( )
var VSuccess as Int
var vAreacode as string = "813"
var vName as String = Mail Name  
var vPath as String = "C:\program files\sesame\utilities\"  
  
  
vPhonenumber = @num (vPhonenumber)
  
If @len (vPhonenumber) = 10 then
 {
  If @left (vPhonenumber, 3) = vAreacode then
  {  
   vPhonenumber = @Right (vPhonenumber, 7)
  }
  Else
  If @left (vPhonenumber, 3) = "727" then
  {  
   vPhonenumber = (vPhonenumber)
  }
  Else
  {
   vphonenumber = 1 + vPhonenumber
  }
 }
  
vsuccess = @Shell(@Chr(34) + vPath + "dial.exe" + @Chr(34) + " " + vPhonenumber  + " [" + vName +"]")  
  
If not vSuccess = 0 then
 {
  @msgbox ("Problem!!! Dialer did not work.", "", "")
  
 }  
end subroutine  



Next, I placed the - incredibly simple and consistent code - in each of my six phone field elements in the On Element Entry event:

Code
Select All
vPhonenumber = ThisElement 



The last thing I did was  place the following code in the Command Button (Place Call) in the On Element Entry event:

Code
Select All
DialPhone ( ) 



That's it - that's all there is to it.  Now, all I have to do to dial a call is click on the appropriate phone number (any one of the six) and click on Place Call.  The call is placed and here's what I get:



I simply wait until I hear the modem dialing, pick up the receiver, and click on 'disconnect' and both of the extra windows disappear.  (As an aside, I always thought that 'disconnect' was a poor choice of words, because I thought that if I clicked on it, I would disconnect the call. All you are disconnecting is the MODEM, so that you don't get background noise).

This works EXACTLY as it worked in MS Access so I am both familiar and very comfortabale with it.

As I said before, thanks to Bharat, we now have the definitive answer (in my opinion, anyhow) to the issue of having a phone dialer in Sesame.

BRAVO!!!!!

« Last Edit: Mar 16th, 2005 at 9:11pm by SpencerWulwick »  

- Spencer

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



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Re: Phone Dialer
Reply #37 - Jul 11th, 2007 at 2:01pm
Print Post Print Post  
Hi -

I hope Bharat is still around, since he was so helpful with helping me set up my dialer in a Sesame database ... and I need help once again.

For two years, I have been enjoying the convience of using my dialer command button.

Out of the clear blue sky, it stopped working and it is driving me CRAZY!!!  Apparently, it has nothing to do with the programming.  The reason I say this is that if I open dialer.exe directly, it still doesn't work.

As I dial, I take the phone off the hook and, up until now,  I would hear the dial tone and then the "tones" of the number being dialed.  While nothing has changed, it simply won't dial the number (I still hear the dial tone but no longer hear any "tones" of numbers being dialed) and after several seconds I get a message "Failed:  could not connect the call"

I have tried to troubleshoot everying I could think of, including changing the modem.  When I perform diagnostics on the modem, I get a "success" message.  I have a dial tone and have changed the cords and everything.

I am totally baffled as to why this has stopped working and won't "rest" until I can use it again.  Any suggestions to help me fix my problem will be greatly appreciated.

Thanks!
  

- Spencer

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



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Re: Phone Dialer
Reply #38 - Jul 12th, 2007 at 2:43am
Print Post Print Post  
Hi -

Well, it turns out that it was my modem after all.  A new modem did the trick.

Now, however, my programming is not working in any of my databases, both old and those I converted.

I'll give Ray a call and hope that he'll have "mercy."  Smiley
  

- Spencer

    ** Practice random kindness & senseless acts of beauty!
Back to top
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2480
Joined: Aug 20th, 2003
Re: Phone Dialer
Reply #39 - Jul 12th, 2007 at 8:32pm
Print Post Print Post  
Hello All,

Spencer's problem turned out to be a different exe in place of the correct one. His Sbasic code was running fine in both 1.X and 2.0 but the correct dial.exe had been replaced with an incorrect one. I got him sorted out and he's off calling people with the click of a button.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
SpencerWulwick
Senior Member
Members
*****
Offline



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Re: Phone Dialer
Reply #40 - Jul 12th, 2007 at 9:11pm
Print Post Print Post  
And if someone could tell me how I could properly "thank" Ray - other than just in words - I would really appreciate it.

I was on the phone yesterday with MicroSoft for at least 4 hours and I got absolutely nowhere.

Within a very short time, Ray figured it out, solved it, and got me up and running.  We are truly lucky to have him.  I'm so happy to have my dialer back that I'm calling people "just for the heck of it."  lol



  

- Spencer

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


That Darn Computer #$X#
{curse words}

Posts: 1195
Joined: Nov 22nd, 2002
Re: Phone Dialer
Reply #41 - Jul 13th, 2007 at 5:24am
Print Post Print Post  
SpencerWulwick wrote on Jul 12th, 2007 at 9:11pm:
And if someone could tell me how I could properly "thank" Ray - other than just in words - I would really appreciate it.

I hear he is a huge Frank Zappa fan  Grin

SpencerWulwick wrote on Jul 12th, 2007 at 9:11pm:
We are truly lucky to have him.


That is a FACT!

  

Team – Together Everyone Achieves More
Back to top
 
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2480
Joined: Aug 20th, 2003
Re: Phone Dialer
Reply #42 - Jul 13th, 2007 at 1:13pm
Print Post Print Post  
BOBSCOTT wrote on Jul 13th, 2007 at 5:24am:
I hear he is a huge Frank Zappa fan  Grin


Roll Eyes

Robert if I recieve a Frank Zappa CD I'm gonna cut you off from support.  Grin

-Ray

  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged