diff --git a/Makefile.am b/Makefile.am index 56c12b52..a413a479 100644 --- a/Makefile.am +++ b/Makefile.am @@ -512,7 +512,8 @@ test_scripts = test/backtrace \ test/cdma-connman-disable \ test/cdma-connman-enable \ test/set-context-property \ - test/test-gnss + test/test-gnss \ + test/swap-calls if TEST testdir = $(pkglibdir)/test diff --git a/test/swap-calls b/test/swap-calls new file mode 100755 index 00000000..4996e0c9 --- /dev/null +++ b/test/swap-calls @@ -0,0 +1,20 @@ +#!/usr/bin/python + +import sys +import dbus + +bus = dbus.SystemBus() + +manager = dbus.Interface(bus.get_object('org.ofono', '/'), + 'org.ofono.Manager') + +modems = manager.GetModems() +modem = modems[0][0] + +if (len(sys.argv) == 2): + modem = sys.argv[1] + +manager = dbus.Interface(bus.get_object('org.ofono', modem), + 'org.ofono.VoiceCallManager') + +manager.SwapCalls()