Re: Accessing (the i4b) device driver

From: Bjoern A. Zeeb (bzeeb-lists_at_lists.zabbadoz.net)
Date: 04/30/04


Date: Fri, 30 Apr 2004 19:31:42 +0000 (UTC)
To: Martin Moeller <moeller_ml@gmx.de>

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/
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"


Relevant Pages

  • Accessing (the i4b) device driver
    ... I'd like to write a nifty little program showing if somebody is ... calling me via an ISDN line. ... The ISDN kernel options are set and compiled ok, ...
    (freebsd-hackers)
  • Accessing (the i4b) device driver
    ... I'd like to write a nifty little program showing if somebody is ... calling me via an ISDN line. ... The ISDN kernel options are set and compiled ok, ...
    (freebsd-hackers)
  • Re: Accessing (the i4b) device driver
    ... I'd like to write a nifty little program showing if somebody is ... >> calling me via an ISDN line. ...
    (freebsd-hackers)