I see… But maybe it is just a trouble of your type of modem because I never had troubles with DUN state… I use NetStat and it detects very good the state of connection for lauching/closing programs. You can detect the state by four methods: Non-local & non-private, Any non local IP address, RAS connection, Tray connect (testing mode).
Maybe someone from Alwil could say something about the detection :-*