[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference hydra::amiga_v1

Title:AMIGA NOTES
Notice:Join us in the *NEW* conference - HYDRA::AMIGA_V2
Moderator:HYDRA::MOORE
Created:Sat Apr 26 1986
Last Modified:Wed Feb 05 1992
Last Successful Update:Fri Jun 06 1997
Number of topics:5378
Total number of notes:38326

4024.0. "Amiga as Tone dialer" by BELFST::MCCLINTOCK (Peter) Sun Aug 19 1990 15:47

    Does anyone know what are the correct frequencies for tone dial
    telephones (a la British Telecom if it is not an international
    standard)?                         
                                       
    If I knew what they were, then I could write a basic prog to play the
    right tones, hold the telephone handset near one of the speakers and
    the Amiga could dial the correct numbers; it could also enter telephone
    charge card numbers and PINs etc. 
                                            
    I suppose it could also be done with samples.
                                                      
    As you may have gathered I don't have an auto dial modem.
                                             
    Peter
T.RTitleUserPersonal
Name
DateLines
4024.1Try it before you write itGOBAMA::WILSONTLTony, the HOSS TRUMPETSun Aug 19 1990 15:5910
    Find an Amiga with Write 'n' File or the newer Pen Pal.  It can issue
    DTMF sounds from its database section when you double-click a phone
    number.  I say that because you should test it on a phone before
    putting the effort into writing a program.  I have Write 'n' File, but
    when I try to sound off a phone number, the phone ends up on the floor
    laughing!
    
    (In other words, it don't work!)
    
    Best of luck............................Tony
4024.2Will work on my phoneBELFST::MCCLINTOCKPeterSun Aug 19 1990 18:589
    If I get the tones correct it's bound to work ... I know this because
    I already use a tone dialler to enter charge card info and it also
    will dial numbers OK.

    
    I'm afraid though that I don't have access to the software that you
    suggest. 
    
    Peter    
4024.3Prototype is 100% successfulBELFST::MCCLINTOCKPeterMon Aug 20 1990 21:2148
    I got the correct frequencies from the ASKENET conference (and have
    attached the relevant note) and I know have a successful tone dialer
    prog written in Amigabasic.
    
    My procedure for logging in is now:
    
    1 click "Dial" icon
    2 lift handset and hold near a speaker
    3 press return and amiga will play tones for 144 to get chargecard
      direct dial
    4 press return to play chargecard number and PIN
    5 press return to play the number to be dialed
    6 dial exits and I invoke VLT for terminal session
      
    This saves me dialing a total of 27 digits manually with the associated
    risk of error.  The prog could be enhanced in many ways, not to
    mention writing it in C, but my prototype is a major effort saver
    (in the absence of an autodial modem).
      
    Peter
     
               <<< MEIS::NOTES$:[NOTES$LIBRARY]ASKENET.NOTE;4 >>>
                            -< Ask The Easynet V4 >-
================================================================================
Note 2011.1                  Touch Tone Frequencies?                      1 of 5
RAMBLR::MORONEY "How do you get this car out of sec" 19 lines  27-OCT-1989 01:12
--------------------------------------------------------------------------------

Each button is a pair of tones, a low tone and a high.  The low tones are the
same for the horizontal rows on a standard telephone, while the high tones
correspond to the vertical columns.

The low tones are: 697 Hz  (123)
                   770 Hz  (456)
                   852 Hz  (789)
                   941 Hz  (*0#)

High tones are:   1209 Hz  (147*)
                  1336 Hz  (2580)
                  1477 Hz  (369#)

Example:  "8" is 852 Hz and 1336 Hz simultaneously.

There is a fourth high tone defined (1633 Hz) which could allow 4 additional
keys.  Probably for some sort of special function codes of some sort.
    
-Mike
      
4024.4telephone.basMILKWY::JANZENMon Aug 20 1990 21:46326
'Telephone.bas copyright 1990 Thomas E. Janzen for Commorodor Amiga (TM)
'Uses internal Amiga voices for line telephone sound effects
'suitable for radio and television drama sound effects.
'Tom Janzen 2 Feb 1989 Telephone tone signals program Commodore
' Amiga BASIC    Reference Understanding Telephone Electronics
' Texas Instruments Learning Center

DIM numbers(20,2)
DIM clickwave%(256)
FOR n=1 TO 256
  clickwave%(n)=0
NEXT n
FOR n=1 TO 128
  clickwave%(n)=120
NEXT n
DEF FNseconds(SECS)=SECS*18.2
'METRONOME MARKING
dtmfdur=FNseconds(.075)
MM60=FNseconds(1!)
MM120=FNseconds(.5)
goout=0
busyf1=480
busyf2=620
busydur=FNseconds(.5)
ringbackf1=440
ringbackf2=480
ringbacknormaldur=FNseconds(2)
ringbacknormalrest=FNseconds(4)
ringbackpbxdur=FNseconds(1)
ringbackpbxrest=FNseconds(1.5)
congestionf1=480
congestionf2=620
congestiondur=FNseconds(.2)
congestionrest=FNseconds(.3)
reorderdur=FNseconds(.3)
reorderrest=FNseconds(.2)
offhookf1=1400
offhookf2=2060
offhookf3=2450
offhookf4=2600
offhookdur=FNseconds(.1)
dialf1=350
dialf2=440
c1=1209
c2=1336
c3=1477
c4=1633
r1=697
r2=770
r3=852
r4=941
'DURATIONS
SUB one(freq1,freq2) STATIC
SHARED c1,c2,c3,c4,r1,r2,r3,r4
  freq1=c1
  freq2=r1
END SUB

SUB two(freq1,freq2) STATIC
SHARED c1,c2,c3,c4,r1,r2,r3,r4
  freq1=c2
  freq2=r1
END SUB

SUB three(freq1,freq2) STATIC
SHARED c1,c2,c3,c4,r1,r2,r3,r4 
 freq1=c3
  freq2=r1
END SUB

SUB four(freq1,freq2) STATIC
SHARED c1,c2,c3,c4,r1,r2,r3,r4  
freq1=c1
  freq2=r2
END SUB

SUB five(freq1,freq2) STATIC
SHARED c1,c2,c3,c4,r1,r2,r3,r4 
 freq1=c2
  freq2=r2
END SUB

SUB six(freq1,freq2) STATIC
SHARED c1,c2,c3,c4,r1,r2,r3,r4 
 freq1=c3
  freq2=r2
END SUB

SUB seven(freq1,freq2) STATIC
SHARED c1,c2,c3,c4,r1,r2,r3,r4
  freq1=c1
  freq2=r3
END SUB

SUB eight(freq1,freq2) STATIC
SHARED c1,c2,c3,c4,r1,r2,r3,r4
  freq1=c2
  freq2=r3
END SUB

SUB nine(freq1,freq2) STATIC
SHARED c1,c2,c3,c4,r1,r2,r3,r4
  freq1=c3
  freq2=r3
END SUB

SUB zero(freq1,freq2) STATIC
SHARED c1,c2,c3,c4,r1,r2,r3,r4
  freq1=c2
  freq2=r4
END SUB

SUB star(freq1,freq2) STATIC
SHARED c1,c2,c3,c4,r1,r2,r3,r4
  freq1=c1
  freq2=r4
END SUB

SUB pound(freq1,freq2) STATIC
SHARED c1,c2,c3,c4,r1,r2,r3,r4
  freq1=c3
  freq2=r4
END SUB

SUB A(freq1,freq2) STATIC
SHARED c1,c2,c3,c4,r1,r2,r3,r4
  freq1=c4
  freq2=r1
END SUB

SUB B(freq1,freq2) STATIC
SHARED c1,c2,c3,c4,r1,r2,r3,r4
  freq1=c4
  freq2=r2
END SUB

SUB C(freq1,freq2) STATIC
SHARED c1,c2,c3,c4,r1,r2,r3,r4
  freq1=c4
  freq2=r3
END SUB

SUB D(freq1,freq2) STATIC
SHARED c1,c2,c3,c4,r1,r2,r3,r4
  freq1=c4
  freq2=r4
END SUB

SUB tone(freq1,freq2) STATIC
SHARED dtmfdur,fff,soprano,alto
  SOUND WAIT
  SOUND freq1,dtmfdur,fff,soprano
  SOUND freq2,dtmfdur,fff,alto
  SOUND RESUME
  SOUND 0,dtmfdur,0,soprano
  SOUND 0,dtmfdur,0,alto
END SUB

QUARTR=MM120
EIGHTH=QUARTR/2
sixteenth=EIGHTH/2
SIXTEENT =sixteenth*.995
TRIPLET=QUARTR/3
HALF=QUARTR*2

'VOICES
soprano=0
alto=1
tenor=2
bass=3

fff=255

WAVE 0,SIN
WAVE 1,SIN
WAVE 2,SIN
WAVE 3,SIN
MENU 1,0,1,"Telephone Sounds"
MENU 1,1,1,"              Busy"
MENU 1,2,1,"         Dial Tone"
MENU 1,3,1,"     Dial a Number"
MENU 1,4,1,"   Ringback,Normal"
MENU 1,5,1,"      Ringback,PBX"
MENU 1,6,1,"        Congestion"
MENU 1,7,1,"           Reorder"
MENU 1,8,1,"          Off hook"
MENU 1,9,1,"    No Such Number"
MENU 1,10,1,"              EXIT"
MENU ON
MOUSE ON
ON MENU GOSUB updatemenu
here:
IF (goout = 0) THEN GOTO here:
ON MENU GOSUB 0
MENU STOP
MENU 1,0,0
MENU OFF
MENU RESET
MOUSE OFF
STOP

updatemenu:
  IF MENU(1) = 1 THEN GOSUB busy
  IF MENU(1) = 2 THEN GOSUB DialTone
  IF MENU(1) = 3 THEN GOSUB PhoneNumber
  IF MENU(1) = 4 THEN GOSUB RingbackNormal
  IF MENU(1) = 5 THEN GOSUB RingbackPBX
  IF MENU(1) = 6 THEN GOSUB Congestion
  IF MENU(1) = 7 THEN GOSUB Reorder
  IF MENU(1) = 8 THEN GOSUB OffHook
  IF MENU(1) = 9 THEN GOSUB nosuchnumber
  IF MENU(1) = 10 THEN goout = 1
RETURN

DialTone:
  FOR t=1 TO 5
    SOUND dialf1,77,fff,soprano
    SOUND dialf2,77,fff,alto
  NEXT t
RETURN

busy:
  FOR t=1 TO 15
    SOUND WAIT
    SOUND busyf1,busydur,fff,soprano
    SOUND busyf2,busydur,fff,alto
    SOUND 0,busydur,0,soprano
    SOUND 0,busydur,0,alto
    SOUND RESUME
  NEXT t
RETURN

PhoneNumber:
  INPUT "Enter number ,A,B,C,D,* or # ",number$
  lenstr=LEN(number$)
  FOR posit=1 TO lenstr
    character$=MID$(number$,posit,1)
    IF character$="1" THEN CALL one(f1,f2)
    IF character$="2" THEN CALL two(f1,f2)
    IF character$="3" THEN CALL three(f1,f2)
    IF character$="4" THEN CALL four(f1,f2)
    IF character$="5" THEN CALL five(f1,f2)
    IF character$="6" THEN CALL six(f1,f2)
    IF character$="7" THEN CALL seven(f1,f2)
    IF character$="8" THEN CALL eight(f1,f2)
    IF character$="9" THEN CALL nine(f1,f2)
    IF character$="0" THEN CALL zero(f1,f2)
    IF character$="*" THEN CALL star(f1,f2)
    IF character$="#" THEN CALL pound(f1,f2)
    IF character$="A" THEN CALL A(f1,f2)
    IF character$="B" THEN CALL B(f1,f2)
    IF character$="C" THEN CALL C(f1,f2)
    IF character$="D" THEN CALL D(f1,f2)
    numbers(posit,1)=f1
    numbers(posit,2)=f2
  NEXT posit
  FOR posit=1 TO lenstr
    CALL tone(numbers(posit,1),numbers(posit,2))
  NEXT posit
RETURN

RingbackNormal:
  FOR t=1 TO 5
    SOUND WAIT
    SOUND ringbackf1,ringbacknormaldur,fff,soprano
    SOUND ringbackf2,ringbacknormaldur,fff,alto
    SOUND RESUME
    SOUND 0,ringbacknormalrest,0,soprano
    SOUND 0,ringbacknormalrest,0,alto   
  NEXT t
RETURN

RingbackPBX:
  FOR t=1 TO 5
    SOUND WAIT
    SOUND ringbackf1,ringbackpbxdur,fff,soprano
    SOUND ringbackf2,ringbackpbxdur,fff,alto
    SOUND RESUME
    SOUND 0,ringbackpbxrest,0,soprano
    SOUND 0,ringbackpbxrest,0,soprano
  NEXT t
RETURN

Congestion:
    FOR t=1 TO 15
    SOUND WAIT
    SOUND congestionf1,congestiondur,fff,soprano
    SOUND congestionf2,congestiondur,fff,alto
    SOUND RESUME
    SOUND 0,congestionrest,0,soprano
    SOUND 0,congestionrest,0,alto
  NEXT t
RETURN

Reorder:
  FOR t=1 TO 15
    SOUND WAIT
    SOUND congestionf1,reorderdur,fff,soprano
    SOUND congestionf2,reorderdur,fff,alto
    SOUND RESUME
    SOUND 0,reorderrest,0,soprano
  NEXT t
RETURN

OffHook:
  FOR t=1 TO 30
    SOUND WAIT
    SOUND offhookf1,offhookdur,fff,soprano
    SOUND offhookf2,offhookdur,fff,alto
    SOUND offhookf3,offhookdur,fff,tenor
    SOUND offhookf4,offhookdur,fff,bass
    SOUND RESUME
    SOUND 0,offhookdur,0,soprano
  NEXT t
RETURN

nosuchnumber:
  FOR n=1 TO 10
    FOR t=1 TO 48
     SOUND 200+(SIN(2*3.14159*t/48)+1)*100,FNseconds(1/48),fff,soprano
    NEXT t
  NEXT n
RETURN

END

4024.5..Dial.shar..WELSWS::FINNISWed Aug 22 1990 17:5611
    
    Hi,
    	Not sure if this is what you want , but here goes..
    
    	Just Uploaded to TAPE:: dial.shar  This is a C and AREXX 
    	version of .4
    
    	The readme says that it has only been tested in Holland
    
    
    			- Pete -