diff --git a/Makefile.am b/Makefile.am index b80f5016..9cb490d4 100644 --- a/Makefile.am +++ b/Makefile.am @@ -585,7 +585,8 @@ test_scripts = test/backtrace \ test/cdma-connman-enable \ test/set-context-property \ test/test-gnss \ - test/swap-calls + test/swap-calls \ + test/release-and-answer if TEST testdir = $(pkglibdir)/test diff --git a/test/release-and-answer b/test/release-and-answer new file mode 100755 index 00000000..10570ce7 --- /dev/null +++ b/test/release-and-answer @@ -0,0 +1,22 @@ +#!/usr/bin/python + +import dbus + +bus = dbus.SystemBus() + +manager = dbus.Interface(bus.get_object('org.ofono', '/'), + 'org.ofono.Manager') + +modems = manager.GetModems() + +for path, properties in modems: + print "[ %s ]" % (path) + + if "org.ofono.VoiceCallManager" not in properties["Interfaces"]: + continue + + mgr = dbus.Interface(bus.get_object('org.ofono', path), + 'org.ofono.VoiceCallManager') + + mgr.ReleaseAndAnswer() + break