Open Source Telephony
 help / color / mirror / Atom feed
From: Marit Henriksen <maritsofie.henriksen8@gmail.com>
To: ofono@ofono.org
Subject: [PATCH] test: Find the active call and do hangup on that.
Date: Thu, 03 Feb 2011 14:14:08 +0100	[thread overview]
Message-ID: <1296738848-23648-1-git-send-email-maritsofie.henriksen8@gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 819 bytes --]

From: Marit Henriksen <marit.henriksen@stericsson.com>

---
 test/hangup-active |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/test/hangup-active b/test/hangup-active
index 52dd2c6..6444b23 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()
-- 
1.7.1


             reply	other threads:[~2011-02-03 13:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-03 13:14 Marit Henriksen [this message]
2011-02-03 16:20 ` [PATCH] test: Find the active call and do hangup on that Denis Kenzior

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1296738848-23648-1-git-send-email-maritsofie.henriksen8@gmail.com \
    --to=maritsofie.henriksen8@gmail.com \
    --cc=ofono@ofono.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox