On Fri, 30 Apr 2004, Martin Moeller wrote:

> I'm totally new to FreeBSD programming, so please forgive my troll-like
> question! I'd like to write a nifty little program showing if somebody is
> calling me via an ISDN line. In the far future, the program should show the
> caller's telephone number.

I am using this ince-quickly-hacked script with c4b and isdnd:

tail -100f /var/log/isdnd.log | perl bin/parse-isdnd-log.pl

--- cut ---
#!/usr/bin/perl

$|=1;

while (<>) {

        s/^(\w+ \d+ \d+:\d+:\d+) \w+ \w+\[\d+\]/$1/;

        if (/CHD/) {
                s/CHD \d+ //;
                print $_;
        }
}

# End;
--- cut ---

Gives me s.th. like this:

Apr 28 16:30:35: <unknown> incoming call from NotAvailable to 41 ctrl 3
or
Apr 28 17:23:30: <unknown> incoming call from 01234567890 to 41 ctrl 3


-- 
Bjoern A. Zeeb                          bzeeb at Zabbadoz dot NeT
56 69 73 69 74                          http://www.zabbadoz.net/
_______________________________________________
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to