I’ve been using the FRITZ!Box 7170 as ADSL modem and telephone interface for some time now:
It has a nifty feature: when you enable the built-in call monitor by typing in “#965“, you can connect to TCP/IP port 1012 to get real-time messages about all phone calls.
This is easy to hook up to JeeMon. I added a new “FritzBox.tcl” file with the following code:
(Some experimental code was omitted from the above listing)
To enable this, the following line was added to application.tcl:
Here’s an example of an incoming call, as shown in the JeeMon log:
And here’s an outgoing call:
Neat! I’ll hook this up as events once the JeeMon event system is ready.
These experiments are very useful to see how the current design is working out. The above code depends on the “MessageStream” class in the “Serial” rig. It doesn’t really add much value in this case, but some class hierarchies seem to be emerging. This socket connection is an example of a similar-but-not-quite-the same case as serial connections, requiring its own class. A socket connection is very similar to a serial connection once initialized – but this doesn’t show as clearly in the code as I would like and there’s already a bit of code duplication.
Will probably need some re-shuffling later, to better match concepts / design and implementation.
My favourite key code for the Fritz!Box is #966 in conjunction with a CLIP capable telephone. ;)