mirror of
https://github.com/sailfishos/ofono
synced 2025-12-01 15:11:04 +08:00
test: Add script for hanging up active call
This commit is contained in:
@@ -341,6 +341,7 @@ test_scripts = test/backtrace \
|
||||
test/enable-modem \
|
||||
test/enter-pin \
|
||||
test/hangup-all \
|
||||
test/hangup-active \
|
||||
test/set-context \
|
||||
test/list-contexts \
|
||||
test/list-modems \
|
||||
|
||||
23
test/hangup-active
Executable file
23
test/hangup-active
Executable file
@@ -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()
|
||||
Reference in New Issue
Block a user