Revision as of 23:56, 26 September 2009 by
Archived:How to make a phone call using PySymbian
From Nokia Developer Wiki
Devices(s): Nokia N95, Nokia E90Compatibility
Platform(s): S60 1st Edition, S60 2nd Edition, S60 3rd EditionArticle
Created: (15 Mar 2007)
Last edited:(26 Sep 2009)
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.