
phone-caller
Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net
The phone-dialer is a small and simple perl-program that uses an analogous modem to dial.
I used it to enhance kaddressbook, so phone numbers are clickable (see screenshot). That's the reason why I post it here, though it is not really a KDE application ...
It works with my modem and my system, but I have no experiences gathered with other configurations. However, the Hayes-AT-commandset for modems is a standard and should work for every modem.
Install:
Just copy or move the phone.pl file somewhere in your $PATH.
Usage:
A few command line options are described in the file itself. The most important are:
"call 'number'" or "dial 'number'" -- dials
"hangup" -- hangs up the modem
"--device=/dev/modem" -- selects the device file
Something about the number:
You can use numbers with leading + and country code ("+33 2 123456" for a number in france). If the country code is equal with your given area-code (--area=33), then +33 is omitted and replaced by a 0 (zero). Otherwise (if the number is not startet by +), nothing is changed, except that "-" _within_ numbers are removed ("069-1234-5678-90"). Spaces whithin numbers are allowed, but then the whole number has to be in ".
Of course, I give absolutely no guaranty, that phone.pl does not kill you, your system, the president or anybody else ;-)
16 years ago
0.9.2:
- GUI-interface for hangup (use --ui=kde or --ui=tk as option)
- minor bugfixes
0.9.1:
- using Getopt::Long for handling of options
- more general default-values
16 years ago
0.9.2:
- GUI-interface for hangup (use --ui=kde or --ui=tk as option)
- minor bugfixes
0.9.1:
- using Getopt::Long for handling of options
- more general default-values
BryanFRitt
11 years ago
read() on closed filehandle FHR at ./16319-phone.pl line 163.
errors, and nothing else.
Report
BryanFRitt
11 years ago
Can't locate Tk.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.8.8 /usr/local/share/perl/5.8.8 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl .) at /usr/bin/phone.pl line 6.
BEGIN failed--compilation aborted at /usr/bin/phone.pl line 6.
Report
bbroeksema
15 years ago
Report
zdravo
16 years ago
I tried your script, but although it brings up the dial tone it doesn't dial the number.
I'm using a conexant winmodem on mandrake 10.1 with drivers from linuxant.
Any ideas would be welcome, as would an idiots guide on how to "plug" this in to kde3 address book.
Ta
Simon
Report
stegru
16 years ago
But how do you manage dialing and hanging-up after picking up the phone
from within Kadressbook with the Perl-Program?
You can call phone.pl either for a
call or for hangup, don't you?
What about adding a simple dialog
for this task like the shell-script
above?
Stefan
Report
reiter
16 years ago
But I am working on a better solution:
I think of a small window too, but since the script itself is not dependent on KDE, I think I shouldn't use something like kdialog.
Report
sarahb523
16 years ago
I wrote a very simple bash script without any "intelligence" and it works great:
#!/bin/bash
# phone.sh
BEEP=`which beep`
if [ -n $BEEP ]; then
beep -f 800
fi
echo "ATDT$1;" >> /dev/modem
sleep 1
kdialog --msgbox "After the connection is established, pick up the phone and press ok. "
echo "ATH0" >> /dev/modem
#end.
The only thing I have to do is the removal of any non numeric character in the number string.
Report
reiter
16 years ago
I don't deny that your script works well, but phone.pl gives you more (not documented ... (-: ) comfort. Not only that it does some initialization (volume of the modem for example). Other commands like "redial" are as well as possible ("phone redial").
Report