diff --git a/Makefile.am b/Makefile.am index f499fb3e..f422ee63 100644 --- a/Makefile.am +++ b/Makefile.am @@ -341,6 +341,7 @@ test_scripts = test/backtrace \ test/enable-modem \ test/enter-pin \ test/hangup-all \ + test/hangup-active \ test/set-context \ test/list-contexts \ test/list-modems \ diff --git a/test/hangup-active b/test/hangup-active new file mode 100755 index 00000000..52dd2c6a --- /dev/null +++ b/test/hangup-active @@ -0,0 +1,23 @@ +#!/usr/bin/python + +import sys +import dbus + +bus = dbus.SystemBus() + +manager = dbus.Interface(bus.get_object('org.ofono', '/'), + 'org.ofono.Manager') + +modems = manager.GetModems() +path = modems[0][0] + +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), + 'org.ofono.VoiceCall') + +call.Hangup()