×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Dec 2008
    Posts
    6

    Bug with telephone.call_state(handle_call) ?

    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

  2. #2
    Super Contributor
    Join Date
    Feb 2008
    Location
    Belo Horizonte, Brazil
    Posts
    744

    Re: Bug with telephone.call_state(handle_call) ?

    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

  3. #3
    Nokia Developer Champion
    Join Date
    Feb 2008
    Location
    Ahmedabad, Gujarat, India
    Posts
    3,852

    Re: Bug with telephone.call_state(handle_call) ?

    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

Similar Threads

  1. RecordStore bug on Series 60
    By ncerezo2 in forum Mobile Java General
    Replies: 21
    Last Post: 2009-11-26, 10:12
  2. Serious BUG in Nokia phones!!!
    By bartekn in forum Mobile Java Media (Graphics & Sounds)
    Replies: 10
    Last Post: 2004-03-28, 22:09
  3. A bug: setColor with offscreen graphics - PLEASE, REPLY THIS TIME
    By palmcrust in forum Mobile Java General
    Replies: 11
    Last Post: 2003-12-04, 12:43
  4. Firmware bug or code bug displaying list on 3650
    By blackjack75 in forum Mobile Java General
    Replies: 2
    Last Post: 2003-09-24, 19:52
  5. Replies: 8
    Last Post: 2003-07-11, 12:56

Posting Permissions

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