You Are Here:

Community: Developer Discussion Boards

#1 Old Bug with telephone.call_state(handle_call) ? - 2009-06-20, 16:42

Join Date: Dec 2008
Posts: 6
gueninmi
Offline
Registered User
Hi

I tried the code given from python examples :

import appuifw, telephone, e32
CALL_STATE = {telephone.EStatusUnknown: "unknown",
telephone.EStatusIdle: "idle",
telephone.EStatusDialling: "dialing",
telephone.EStatusRinging: "ringing",
telephone.EStatusAnswering: "answering",
telephone.EStatusConnecting: "connecting",
telephone.EStatusConnected: "connected",
telephone.EStatusReconnectPending: "reconnect pending",
telephone.EStatusDisconnecting: "disconnecting",
telephone.EStatusHold: "hold",
telephone.EStatusTransferring: "transferring",
telephone.EStatusTransferAlerting: "transfer alerting"};
def handle_call(callstate):
print "Current call state: "+CALL_STATE[callstate]
def quit():
app_lock.signal()
appuifw.app.exit_key_handler = quit
appuifw.app.title = u"Call States"
telephone.incoming_call() # waits for an incoming call
telephone.call_state(handle_call) # connects to handle_call for status handling
app_lock=e32.Ao_lock()
app_lock.wait()

but it never prints anything when i call the phone.

==> i din't know how tu use telephone.call_state(handle)

My first aim was to dial then to exit the app when call is finished like :

def handle_call(callstate):
if (callstate == telephone.EStatusHold) or (callstate == telephone.Disconnecting):
app_lock.signal()
appuifw.app.set_exit()

...
telephone.dial(phonenumber)
telephone.call_state(handle_call)

But it doesn't work, the python app is put in background when dialing and never exits.

Is there any solution ?

Thanks
Reply With Quote

#2 Old Re: Bug with telephone.call_state(handle_call) ? - 2009-06-20, 18:14

Join Date: Feb 2008
Posts: 743
Location: Belo Horizonte, Brazil
Send a message via Skype™ to Rafael T.
Rafael T.'s Avatar
Rafael T.
Offline
Forum Nokia Champion
Hi guenimi,

I guess the call states are only detected in an incoming call, so it will not work when you use telephone.dial().



BR,

Rafael, happy to be back at this forum
Reply With Quote

#3 Old Re: Bug with telephone.call_state(handle_call) ? - 2009-06-20, 18:44

Join Date: Feb 2008
Posts: 2,546
Location: Bhavnagar, Gujarat, India
Send a message via Yahoo to gaba88 Send a message via Skype™ to gaba88
gaba88's Avatar
gaba88
Offline
Forum Nokia Champion
hello gueninmi

next time you post any of the code please use the code tags(#) provided in the editor box, this will provide indentation and help others to understand your code.

Regards
Gaba88


Gargi Das- http://gargidas.blogsot.com

Forum Nokia Python Wiki


Learn Python at http://mobapps.org/PyS60
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump
Similar Threads
Thread Thread Starter Forum Replies Last Post
RecordStore bug on Series 60 ncerezo2 Mobile Java General 20 2008-11-13 05:31
Serious BUG in Nokia phones!!! bartekn Mobile Java Media (Graphics & Sounds) 10 2004-03-28 23:09
A bug: setColor with offscreen graphics - PLEASE, REPLY THIS TIME palmcrust Mobile Java General 11 2003-12-04 13:43
Firmware bug or code bug displaying list on 3650 blackjack75 Mobile Java General 2 2003-09-24 20:52
** Important ** Event bug in phone and emulator. fnagaton General Symbian C++ 8 2003-07-11 13:56

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia