Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 4 Jun 2003 16:46:24 +0200
From:      Alexander Leidinger <Alexander@Leidinger.net>
To:        freebsd-isdn@freebsd.org
Subject:   Re: using isdnd as incoming call logger
Message-ID:  <20030604164624.535ce970.Alexander@Leidinger.net>
In-Reply-To: <200306031527.h53FRecf079820@tower.berklix.org>
References:  <200306031527.h53FRecf079820@tower.berklix.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 3 Jun 2003 17:27:40 +0200 (CEST)
Julian Stacey <jhs@berklix.org> wrote:

> Me too, with names of humans, not numbers, shown in 24x80 xterm 
> that invokes isdns, but also in a wide short xterm I leave marked
> `sticky' so it stays at bottom of whichever pane my window manager
> is in.

I use a popup window instead of a permanent one:
---snip---
#!/bin/sh

from=$(awk 'BEGIN {for (i = 4; i < ARGC-3 ; i++) printf "%s ", ARGV[i]; printf "%s", ARGV[ARGC-3]; exit}' $1)
to=$(awk 'BEGIN {printf "%s", ARGV[ARGC-1]; exit}' $1)
date=$(date "+%d. %b, %H:%m")

if [ -x /usr/X11R6/bin/gdialog -a -f /home/netchild/.ssh_auth_sock ]; then
        su - netchild -c "DISPLAY=:0 /usr/X11R6/bin/gdialog --title \"Anruf: ${date}\" --msgbox \"\n    von $from an $to   \n\" 3 100" || logger ISDN-Call "gdialog failed"
fi
---snip---

Note: 
- I create .ssh_auth_sock when I login via X11 (I use it to let
  automatic scripts use my ssh-agent when I'm logged in, the scripts don't
  have to run when I'm not logged in), so if it exists there will be a
  display gdialog can use
- because of the string substitution in isdntel.alias we can't just use
  "print $4" for $to


I tried also to display waiting calls, but failed.

Specifying multiple regexpr doesn't work:
---snip---
regexpr = "CW from"
regprog = display_phone_call.sh

regexpr = "Call from"   # look for matches in log messages
regprog = display_phone_call.sh         # execute program when match is found
---snip---

I also tried regexpr = "(CW|Call) from", but this results in no dialog
at all...

Bye,
Alexander.

-- 
               Speak softly and carry a cellular phone.

http://www.Leidinger.net                       Alexander @ Leidinger.net
  GPG fingerprint = C518 BC70 E67F 143F BE91  3365 79E2 9C60 B006 3FE7



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030604164624.535ce970.Alexander>