Hi,

Sorry for the long delay in responding, and thanks for the fix.  What's
the advantage in using ncid?  What does it do for you?

Cheers,

Max

smst Wrote: 
> Max,
> 
> First, thanks for the plugin -- now I've read it I see how the display
> stuff is done, whereas before I had no clue!
> 
> Second, there's a small bug on line 140: the 'sendAndReceive' call uses
> the literal value 30 instead of $displayTime.
> 
> Third, I've managed to get 'NCID' (http://ncid.sourceforge.net/)
> working through your script, with some modifications.  The 'client
> program' (http://ncid.sourceforge.net/ncid/ncid.html) can be set to
> call any external program when a call comes in, passing date, time,
> number and name on separate lines of stdin.  It can also use an aliases
> file to match up names to numbers, so that all clients can use the same
> data.
> 
> I modified the script to not take arguments from ARGV, but to read the
> four lines from stdin.  I replaced this:> 
Code:
--------------------
  >   > # Number that's calling
  > my $number = $ARGV[1];
--------------------
> > ...with this (although I ignore the date/time):> 
Code:
--------------------
  >   > my $incoming_date = <STDIN>; chomp($incoming_date);
  > my $incoming_time = <STDIN>; chomp($incoming_time);
  > 
  > # Number that's calling
  > my $number = <STDIN>; chomp($number); $number = uri_escape($number);
  > if ($debug && $debugLog) {
  > open(STDOUT, ">>$debugLog");
  > }
--------------------
> > 
> 
> The use of 'uri_escape' was to deal with spaces etc in the data
> passed in by NCID; it requires the following near the top of the
> file:> 
Code:
--------------------
  >   > use URI::Escape;
--------------------
> > 
> 
> Because I don't use the CSV feature of the script, I removed that
> whole section:> 
Code:
--------------------
  >   > # Read the phone number csv file
  > ...
  > $debug && print "Caller: $name\n";
--------------------
> > ...and replaced it with this:> 
Code:
--------------------
  >   > my $name = <STDIN>; chomp($name);
  > if($name eq "NO NAME") {
  > $name = "Unknown: $number";
  > }
  > $name = uri_escape($name);
  > $debug && print "Caller: $name\n";
--------------------
> > 
> To invoke this, one should first get ncidd (the daemon) running and
> confirmed working.  Then run this:> 
Code:
--------------------
  >   > ncid --no-gui --all --call-prog --program /usr/local/bin/ncid-slim.pl &
--------------------
> > ...where "ncid-slim.pl" is the modified "cid.pl", living in
> "/usr/local/bin" and given execute permissions.  (The trailing
> ampersand is to make this a background process when launching from a
> terminal; I don't know what the best way is to launch this
> automatically, but I think the ampersand is not required then.)
> 
> I have this setup running on an old P90 with a cheap ISA modem (which
> I bought when I saw your original script available!), which also acts
> as my firewall etc.  SlimServer is on a separate box, so of course I
> modified $serverAddress appropriately (tip there for anyone else who
> may find it doesn't work initially, as I did)...


-- 
max.spicer

The wild things roared their terrible roars and gnashed their terrible
teeth
and rolled their terrible eyes and showed their terrible claws
but Max stepped into his private boat and waved good-bye
------------------------------------------------------------------------
max.spicer's Profile: http://forums.slimdevices.com/member.php?userid=23
View this thread: http://forums.slimdevices.com/showthread.php?t=18377

_______________________________________________
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/lists/listinfo/plugins

Reply via email to