Archived:How to make a phone call using PySymbian
This snippet shows how to dial and hang up a call in Python.
import appuifw, e32, telephone
app_lock = e32.Ao_lock()
#Define the exit function
#Cancel the timer when the user exits, if it has not expired
appuifw.app.exit_key_handler = quit
number = "072xxxxxxx"
#The number to be called
#Dial the number
#Instantiate a timer
t = e32.Ao_timer()
#Let it ring for 10 seconds and then hang up
#Wait for the user to request the exit
A call is made to the specified number. The call will last for 10 seconds and will then be hung up.
The contacts module can be used for retrieving numbers.