logging from a serial port

KJC KJC
Tue Jan 18 17:43:04 CST 2000


I first posed this question to the Anchorage Perl group list. This is a
recap for them, since I've cross posted this to the AkLUG for more people
to give me insight:

I've got a PBX that sends calling info out via a serial port. It waits
until a call is finished and the 'spurts' info all jumbled together in the
following format:

0!KA0101280018284  01181259090118125912	     000010010844
0000			  0

where the first block of characters is mostly throw away--except the last
four digits are the 'calling from' extension. The next block is begin and
end time in this format 
mo.day.beg-hour.beg-min.beg-sec.end-mo.end-day.....

And the third block is trunk route data and ends with the actual number
dialed being the last whatever digits (844 in this instance).

This is the dilemma: I want to hook this serial line up to a unix serial
port, capture it, and parse it out. In the end I want to be able to hit a
web page running on the box and view it. All the point after the 'capture'
I think I can handle.

How do I capture it to the point where I can start parsing it via Perl?
Could it go straight to a file, and let my script retreive the data and
empty the file?

Help, I'm just a naive guy who loves to do things in unix.  

I may have the luxury of doing this in a low power Linux box; or I may use
HP-UX; naturally I'd prefer the former even if it is a small lightbulb in
comparison.




=================================================
Mailing list info:  If at any time you wish to (un|re)subscribe to
the list send the request to majordomo at hfb.pm.org.  All requests
should be in the body, and look like such
                  subscribe anchorage-pm-list
                  unsubscribe anchorage-pm-list



More information about the Anchorage-pm mailing list