mirror of git://git.sysmocom.de/ofono
test: Add test script for ReleaseAndAnswer
This commit is contained in:
parent
8fb761efb0
commit
fe1ced212f
|
@ -585,7 +585,8 @@ test_scripts = test/backtrace \
|
||||||
test/cdma-connman-enable \
|
test/cdma-connman-enable \
|
||||||
test/set-context-property \
|
test/set-context-property \
|
||||||
test/test-gnss \
|
test/test-gnss \
|
||||||
test/swap-calls
|
test/swap-calls \
|
||||||
|
test/release-and-answer
|
||||||
|
|
||||||
if TEST
|
if TEST
|
||||||
testdir = $(pkglibdir)/test
|
testdir = $(pkglibdir)/test
|
||||||
|
|
|
@ -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.ReleaseAndAnswer()
|
||||||
|
break
|
Loading…
Reference in New Issue