How to use DTMF in TCL!

11 views
Skip to first unread message

Vincent Bandille

unread,
May 18, 1999, 3:00:00 AM5/18/99
to
HELP!

I need to write a script in TCL that will send a page via DTMF. Being
completely brand new to TCL, I'm having a hard time determining just how I
should go about this.

Any help would be greatly appreciated.

Should you have any help to give, please e-mail me at
vincent....@ion-networks.com

Thanks in advance...

Vince


Paul Duffin

unread,
May 19, 1999, 3:00:00 AM5/19/99
to

Do you really mean DTMF ? If so then it would depend on the telephony
system interface that you are using.

--
Paul Duffin
DT/6000 Development Email: pdu...@hursley.ibm.com
IBM UK Laboratories Ltd., Hursley Park nr. Winchester
Internal: 7-246880 International: +44 1962-816880

dhag...@my-dejanews.com

unread,
May 20, 1999, 3:00:00 AM5/20/99
to vincent....@ion-networks.com
In article <7hrrnb$t5h$1...@holly.prod.itd.earthlink.net>,

"Vincent Bandille" <vin...@earthlink.net> wrote:
> HELP!
>
> I need to write a script in TCL that will send a page via DTMF. Being
> completely brand new to TCL, I'm having a hard time determining just
how I
> should go about this.

Assuming you are using a modem on a serial port, say /dev/term/a
(Solaris) or com1: (Win32), something like the following should
work, :

set devname "/dev/term/a"
set phonenum "888-8888"
set commas1 ",,,," ;# most modems delay 2 secs per ,
set message "999"
set commas2 ","
set end "#" ;# most paging svcs expect # to end msg
set pauseSecs 30

set port [open $devname RDWR]
fconfigure $port -mode 9600,n,8,1
puts -nonewline $port "ATDT$phonenum$commas1$message$commas2$end;\r"
after [expr {$pauseSecs*1000}]
close $port

The ";" at the end of the dial string should return an OK
immediately, though this code does nothing to read.

You could do more interesting stuff with fileevent if your modem
could detect tones and hangups on the remote end, rather than just
waiting a fixed amount of time. That's a *much* harder problem,
though.


--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---

Reply all
Reply to author
Forward
0 new messages