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
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
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.---