Hi Marcel, On 03/08/2012 18:58, Marcel Holtmann wrote:
Hi Guillaume,Makefile.am | 3 ++- test/hangup-call | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 1 deletions(-) create mode 100755 test/hangup-call diff --git a/Makefile.am b/Makefile.am index 7e8f12c..8cf6920 100644 --- a/Makefile.am +++ b/Makefile.am @@ -625,7 +625,8 @@ test_scripts = test/backtrace \ test/swap-calls \ test/release-and-answer \ test/hold-and-answer \ - test/hangup-multiparty + test/hangup-multiparty \ + test/hangup-callif TESTtestdir = $(pkglibdir)/test diff --git a/test/hangup-call b/test/hangup-call new file mode 100755 index 0000000..bc77acf --- /dev/null +++ b/test/hangup-call @@ -0,0 +1,36 @@ +#!/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() +if (len(calls) == 0): + print "No calls available" + sys.exit(1) + +if (len(sys.argv) < 2): + i = 0 + for path, properties in calls: + multi = properties["Multiparty"] + print "Call Path [ %s ] Multiparty %d" % (path, multi) + print + i += 1 + + print "Usage: %s [ Call Path ]" % (sys.argv[0]) + print + sys.exit(1)we have list-calls for this. So why not make this really simple and and require the call object path as input.
Ok, I will only check if there is an argument and don't list the call. Kind regards, Guillaume _______________________________________________ ofono mailing list [email protected] http://lists.ofono.org/listinfo/ofono
