Archived:How to make time limited calls using PySymbian

From Nokia Developer Wiki
Jump to: navigation, search

Archived.pngAquivado: Este artigo foi arquivado, pois o conteúdo não é mais considerado relevante para se criar soluções comerciais atuais. Se você achar que este artigo ainda é importante, inclua o template {{ForArchiveReview|escreva a sua justificativa}}.

All PySymbian articles have been archived. PySymbian is no longer maintained by Nokia and is not guaranteed to work on more recent Symbian devices. It is not possible to submit apps to Nokia Store.

Article Metadata
Tested with
Devices(s): Nokia N95
Platform(s): S60 1st Edition, S60 2nd Edition, S60 3rd Edition
Keywords: telephone
Created: diegodobelo (11 Mar 2009)
Last edited: hamishwillee (31 May 2013)



Here is a very simple example teaching how to make time limited calls. In this example we just need to define the number to be called and the call duration. After that the call will be established and will automatically hanged up in the time you have entered in the application.

Code Snippet

import telephone
import e32
import appuifw
number = appuifw.query(u"Enter Your Phone Number",'number')#Enter the number you want to call
duration = appuifw.query(u"Enter the Durations",'number') #Enter the time
telephone.dial(str(number)) #make call
#define the handler function
def handle_hang_up(status):
#test if the call was complete
if status[0] == telephone.EStatusConnected:
#hangup after defined duration
e32.ao_sleep(float(duration), telephone.hang_up)
telephone.call_state(handle_hang_up) #set the handler function


The below are screenshots which will help you to understand the program:

Timelimited1.jpg Timelimited2.jpg

Related Links

This page was last modified on 31 May 2013, at 04:09.
29 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.


Thank you!

We appreciate your feedback.