mirror of git://git.sysmocom.de/ofono
test: Add release-and-swap script
This commit is contained in:
parent
3d57bf37d0
commit
e4b284860e
|
@ -624,6 +624,7 @@ test_scripts = test/backtrace \
|
|||
test/test-gnss \
|
||||
test/swap-calls \
|
||||
test/release-and-answer \
|
||||
test/release-and-swap \
|
||||
test/hold-and-answer \
|
||||
test/hangup-multiparty
|
||||
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
#!/usr/bin/python
|
||||
|
||||
import dbus
|
||||
|
||||
bus = dbus.SystemBus()
|
||||
|
||||
manager = dbus.Interface(bus.get_object('org.ofono', '/'),
|
||||
'org.ofono.Manager')
|
||||
|
||||
modems = manager.GetModems()
|
||||
|
||||
for path, properties in modems:
|
||||
print "[ %s ]" % (path)
|
||||
|
||||
if "org.ofono.VoiceCallManager" not in properties["Interfaces"]:
|
||||
continue
|
||||
|
||||
mgr = dbus.Interface(bus.get_object('org.ofono', path),
|
||||
'org.ofono.VoiceCallManager')
|
||||
|
||||
mgr.ReleaseAndSwap()
|
||||
break
|
Loading…
Reference in New Issue