Goodbye bypass NAT obstacle: Reverse Connections with Socat That the Fritz Box from the house of AVM Berlin GmbH is among the most popular DSL router in Germany is one, is certainly not a miracle. (If also clear, inside Linux, send out: D) The features are really first class, these processes can, even a
Telnet access unlock, so you can directly access the interior of the red box.
However, I was still surprised when I searched today after a caller monitor for Linux. While there are some programs and scripts on the net, but nothing that really appealed to me right. At first I thought that this information may also be provided via UPnP
be, but it is much easier: Simply select on a telephone connected to the combination # 96 * 5 * and wait for the beep. Then opens Fritz! Box
the TCP port 1012
and outputs on this information on all incoming calls. It's simple, but brilliant! The key combination
# 96 * 4 * Other key combinations such as
# 96 * 1 * or # 96 * 0 *
to the WiFi on or off I had already known, but this neat feature remained undetected for years.
Linux users can easily view the way the information available with
netcat or socat favorite of mine
. The solution is obviously not very nice and elegant, but for a quick test it is always enough: fritz.box nc-u 1012 socat TCP: fritz.box: 1012 STDOUT stefan @ stefan-desktop: ~ $ socat-u TCP: fritz.box: 1012 STDOUT 17:04:10 10:04:33; RING, 0, 015xxxxxxxxx; 03xxxxxxxxx; Sxxx; 17:04:10 10:04:36; DISCONNECT, 0, 0,
I've done the fun and me small shell script written, which the incoming data from the Fritz Box reads and displays about the notification system:
# / bin / sh
get_element () {
echo "$ line"!
=
message =
if [ "$cmd" = "CALL" ] ; then
interface = $( get_element 4 )
caller = $( get_element 5 )
target = $( get_element 6 )
title = "Outgoing Call"
message = "Target: $ target \u0026lt;br> Caller: caller \u0026lt;br> $ interface: $ interface" elif [ "$ cmd" = "RING" ] ; then caller = $ ( get_element 4) target = $ ( get_element 5) = $ ( interface get_element 6 )
if [ -z "$caller" ] ; then
caller = "hidden"
fi
title = "Incoming Call"
message = "Caller: $caller<br>Target: $target<br>Interface: $interface"
elif [ "$cmd" = "CONNECT" ] ; then
interface = $( get_element 4 )
number = $( get_element 5 )
title = "Connection Established"
message = "Number: $caller<br>Interface: $interface"
elif [ "$cmd" = "DISCONNECT" ] ; then
length = $( get_element 4 )
length_min = $(( length/60 ))
length_s = $(( length%60 ))
title = "Connection Closed"
message = "Length: $length_min min $length_s s"
fi
if [ "(" -n "$ title" ")"-a "(" -n "$ message" ")" ] ; then message = "Date: $ date time \u0026lt;br> Connection ID: $ connid \u0026lt;br> $ message" notify-send-i "gtk-dialog -info " " $ title " "$ message" fi done} while true; Thurs sleep list 60 done syntax highlighter: Pygments . Here in the blog to display the script wraps may! Simply copy a file and it should work. should the way for other manufacturers to cut a slice of quiet times. Negative glaring example is of course Apple, all of their really excellent (and overpriced: D) restrict devices so so much that they reach their full potential can not even begin to. Settings and simplicity are not mutually exclusive and to keep the user for the last few morons in my opinion is not a good concept ...