View Single Post
evad's Avatar
Posts: 354 | Thanked: 151 times | Joined on Mar 2008 @ London (UK) / Zielona Góra (PL)
#3
Originally Posted by cb22 View Post
Hope this helps some people out, if people could also test it and report back that would be great. It shouldn't really take too long to write a simple GUI and package this up properly. Also, other things, like only on WiFi / only on GPRS should be quite easy to implement.
I did give it a try, but it doesn't seem to work for me. First I checked my connections and accounts:

Code:
user@n900:~/MyDocs/Dev$ python list-connections.py 
adlnet-14 - 5d2108f0-a1ac-40db-bae0-6c17de4f86e5
Code:
user@n900:~/MyDocs/Dev$ /usr/bin/dbus-send --type=method_call --print-reply --dest=org.freedesktop.Telepathy.AccountManager /org/freedesktop/Telepathy/AccountManager org.freedesktop.DBus.Properties.Get string:org.freedesktop.Telepathy.AccountManager string:ValidAccounts
method return sender=:1.20 -> dest=:1.369 reply_serial=2
   variant       array [
         object path "/org/freedesktop/Telepathy/Account/sofiasip/sip/evad002_40sip_2eipfon_2epl0"
      ]
I just want to connect to that one SIP account while connected to adlnet-14, which is my home WiFi. So I've amended main script by adding:

Code:
accounts = {
"/org/freedesktop/Telepathy/Account/sofiasip/sip/evad002_40sip_2eipfon_2epl0": ["5d2108f0-a1ac-40db-bae0-6c17de4f86e5"],
}
Then I run the script as normal user:

Code:
user@n900:~/MyDocs/Dev$ python im-per-connection.py
And wait... but nothing happens, ie. despite being connected to adlnet-14 network (or manually re-triggering a connection), status for that SIP account doesn't change.

Any suggestions?
__________________
Dawid 'evad' Lorenz * http://dawid.lorenz.co
_______________________________________________