/usr/share/doc/gammu-doc/examples/setdiverts.py is in gammu-doc 1.33.0-3.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | #!/usr/bin/env python
import gammu
import sys
sm = gammu.StateMachine()
if len(sys.argv) >= 2:
sm.ReadConfig(Filename = sys.argv[1])
del sys.argv[1]
else:
sm.ReadConfig()
sm.Init()
if len(sys.argv) != 2:
print 'Usage: setdiverts.py NUMBER'
sys.exit(1)
sm.SetCallDivert('AllTypes', 'All', sys.argv[1])
diverts = sm.GetCallDivert()
for x in diverts:
print x
|