mirror of git://git.sysmocom.de/ofono
test: Add script for hanging up active call
This commit is contained in:
parent
5269a2f9be
commit
ba2fd65b5e
|
@ -341,6 +341,7 @@ test_scripts = test/backtrace \
|
||||||
test/enable-modem \
|
test/enable-modem \
|
||||||
test/enter-pin \
|
test/enter-pin \
|
||||||
test/hangup-all \
|
test/hangup-all \
|
||||||
|
test/hangup-active \
|
||||||
test/set-context \
|
test/set-context \
|
||||||
test/list-contexts \
|
test/list-contexts \
|
||||||
test/list-modems \
|
test/list-modems \
|
||||||
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
#!/usr/bin/python
|
||||||
|
|
||||||
|
import sys
|
||||||
|
import dbus
|
||||||
|
|
||||||
|
bus = dbus.SystemBus()
|
||||||
|
|
||||||
|
manager = dbus.Interface(bus.get_object('org.ofono', '/'),
|
||||||
|
'org.ofono.Manager')
|
||||||
|
|
||||||
|
modems = manager.GetModems()
|
||||||
|
path = modems[0][0]
|
||||||
|
|
||||||
|
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),
|
||||||
|
'org.ofono.VoiceCall')
|
||||||
|
|
||||||
|
call.Hangup()
|
Loading…
Reference in New Issue