diff options
author | Marit Henriksen <marit.henriksen@stericsson.com> | 2011-02-03 14:14:08 +0100 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2011-02-03 10:20:23 -0600 |
commit | 1031664a9eda1a0dfb58ae8eedf4b2637b688e9f (patch) | |
tree | a81aa6f591195344336a6a52aad764cf84216d75 /test/hangup-active | |
parent | aad3b22924a80961a6fe4b5f1f8fa7cae19663b5 (diff) | |
download | ofono-1031664a9eda1a0dfb58ae8eedf4b2637b688e9f.tar.bz2 |
test: Find the active call and do hangup on that
Diffstat (limited to 'test/hangup-active')
-rwxr-xr-x | test/hangup-active | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/test/hangup-active b/test/hangup-active index 52dd2c6a..6444b23d 100755 --- a/test/hangup-active +++ b/test/hangup-active @@ -15,9 +15,15 @@ manager = dbus.Interface(bus.get_object('org.ofono', path), 'org.ofono.VoiceCallManager') calls = manager.GetCalls() -path = calls[0][0] -call = dbus.Interface(bus.get_object('org.ofono', path), +for path, properties in calls: + state = properties["State"] + print "[ %s ] %s" % (path, state) + + if state != "active": + continue + + call = dbus.Interface(bus.get_object('org.ofono', path), 'org.ofono.VoiceCall') -call.Hangup() + call.Hangup() |