* [PATCH] Add the possibility to specify the modem in test/dial-number
@ 2011-03-14 13:06 Bertrand Aygon
2011-03-14 14:27 ` Denis Kenzior
0 siblings, 1 reply; 2+ messages in thread
From: Bertrand Aygon @ 2011-03-14 13:06 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 1999 bytes --]
---
test/dial-number | 31 +++++++++++++++++++++++++------
1 files changed, 25 insertions(+), 6 deletions(-)
diff --git a/test/dial-number b/test/dial-number
index d66a878..8e250ea 100755
--- a/test/dial-number
+++ b/test/dial-number
@@ -3,21 +3,40 @@
import sys
import dbus
+if (len(sys.argv) < 2):
+ print "Usage: %s [modem] <number> [hide_callerid]" % (sys.argv[0])
+ sys.exit(1)
+
bus = dbus.SystemBus()
manager = dbus.Interface(bus.get_object('org.ofono', '/'),
'org.ofono.Manager')
modems = manager.GetModems()
+modem = modems[0][0]
+
+hide_callerid = "default"
+
+if (len(sys.argv) == 2):
+ number = sys.argv[1]
+elif (len(sys.argv) == 3):
+ if (sys.argv[2] == "default") or (sys.argv[2] == "enabled") or \
+ (sys.argv[2] == "disabled"):
+ number = sys.argv[1]
+ hide_callerid = sys.argv[2]
+ else:
+ modem = sys.argv[1]
+ number = sys.argv[2]
+else:
+ modem = sys.argv[1]
+ number = sys.argv[2]
+ hide_callerid = sys.argv[3]
-path, properties = modems[0]
+print "Using modem %s" % modem
-manager = dbus.Interface(bus.get_object('org.ofono', path),
+vcm = dbus.Interface(bus.get_object('org.ofono', modem),
'org.ofono.VoiceCallManager')
-if len(sys.argv) > 2:
- path = manager.Dial(sys.argv[1], sys.argv[2])
-else:
- path = manager.Dial(sys.argv[1], "")
+path = vcm.Dial(number, hide_callerid)
print path
--
1.7.1
---------------------------------------------------------------------
Intel Corporation SAS (French simplified joint stock company)
Registered headquarters: "Les Montalets"- 2, rue de Paris,
92196 Meudon Cedex, France
Registration Number: 302 456 199 R.C.S. NANTERRE
Capital: 4,572,000 Euros
This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Add the possibility to specify the modem in test/dial-number
2011-03-14 13:06 [PATCH] Add the possibility to specify the modem in test/dial-number Bertrand Aygon
@ 2011-03-14 14:27 ` Denis Kenzior
0 siblings, 0 replies; 2+ messages in thread
From: Denis Kenzior @ 2011-03-14 14:27 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 243 bytes --]
Hi Bertrand,
On 03/14/2011 08:06 AM, Bertrand Aygon wrote:
> ---
> test/dial-number | 31 +++++++++++++++++++++++++------
> 1 files changed, 25 insertions(+), 6 deletions(-)
>
Patch has been applied, thanks.
Regards,
-Denis
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-03-14 14:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-14 13:06 [PATCH] Add the possibility to specify the modem in test/dial-number Bertrand Aygon
2011-03-14 14:27 ` Denis Kenzior
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.