stktest: merge cusatt
[platform/upstream/ofono.git] / test / cdma-dial-number
1 #!/usr/bin/python
2
3 import sys
4 import dbus
5
6 bus = dbus.SystemBus()
7
8 manager = dbus.Interface(bus.get_object('org.ofono', '/'),
9                                                 'org.ofono.Manager')
10
11 if len(sys.argv) > 2:
12         path = sys.argv[1]
13         number = sys.argv[2]
14 else:
15         modems = manager.GetModems()
16         path, properties = modems[0]
17         number = sys.argv[1]
18
19 print "Using modem %s" % path
20
21 manager = dbus.Interface(bus.get_object('org.ofono', path),
22                                         'org.ofono.cdma.VoiceCallManager')
23
24 manager.Dial(number)