Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User night_amir's Avatar
    Join Date
    Aug 2008
    Posts
    46
    How to get number of incomming call?
    I can trap event of incomming call, but cant detect of phone number...

  2. #2
    Nokia Developer Champion rahulvala's Avatar
    Join Date
    Oct 2008
    Location
    INDIA
    Posts
    2,298
    Hi, amir

    How to get number of incomming call?
    Just check this code :
    Code:
     import logs        #import the module
    
     n=logs.calls(mode='in')     #set mode to get the list of incoming numbers.
     for i in range(len(n)):
              print n[i]["number"]
    Best regards,
    RaHuL

  3. #3
    Registered User night_amir's Avatar
    Join Date
    Aug 2008
    Posts
    46
    Big thanx) its work!

    How i can hang up incoming call? Function telephone.hang_up() work only with telephone.dial(number). I use this code:
    Code:
    import logs, appuifw, os, e32, time, telephone
    
    global n
    n = logs.calls(mode='in')
    
    def handle_hang_up(status):
        global n
        if status[0] == telephone.EStatusRinging:
            telephone.hang_up()
        elif status[0] == telephone.EStatusDisconnecting:
            time.sleep(1)
            print n[0]["number"]
    
    telephone.call_state(handle_hang_up)
    
    lock = e32.Ao_lock()
    os.abort = lock.signal
    lock.wait()

  4. #4
    Nokia Developer Champion rahulvala's Avatar
    Join Date
    Oct 2008
    Location
    INDIA
    Posts
    2,298
    Ya, its true this function work only either you have initiated the call or you have picked (received ) the call.

    best regards,
    RaHuL

  5. #5
    Registered User night_amir's Avatar
    Join Date
    Aug 2008
    Posts
    46
    rahulvala, and so, how i can hang up a call???
    can you give work example?

  6. #6
    Nokia Developer Champion rahulvala's Avatar
    Join Date
    Oct 2008
    Location
    INDIA
    Posts
    2,298
    If you are using module telephone then you can use this function to cancel the call.

    telephone.hang_up()

    Best regards,
    RaHuL

Similar Threads

  1. how to get the new incomming message and new incomming call alert for nokia 3110c
    By rammicbe in forum Mobile Design and User Experience
    Replies: 0
    Last Post: 2009-09-21, 08:00
  2. incomming call
    By namak in forum Symbian C++
    Replies: 2
    Last Post: 2007-11-22, 13:12
  3. Outgoing call and incomming call on emulatro...
    By go4jas in forum Symbian C++
    Replies: 1
    Last Post: 2006-11-10, 08:09
  4. Incomming call problem
    By Svat_ in forum Symbian C++
    Replies: 0
    Last Post: 2006-10-10, 10:35
  5. Incomming call event
    By ash_bhatia in forum Symbian C++
    Replies: 5
    Last Post: 2004-12-16, 13:40

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved