×

Discussion Board

Results 1 to 10 of 10
  1. #1
    Registered User
    Join Date
    Feb 2008
    Posts
    18

    Last received call

    Hello,
    is there a function in PYS60 that can show us the number of the last received call??
    or the last missed call??

    thx

  2. #2
    Nokia Developer Moderator
    Join Date
    Oct 2007
    Location
    Deva, Romania
    Posts
    3,471

    Re: Last received call

    Code:
    import logs
    
    l=logs.calls(mode='missed')[0]  #The dictionary for the latest missed call
                                  #You could use 'in' instead of 'missed' for received
    l["number"]        #Returns the value for the entry "number"
    Last edited by bogdan.galiceanu; 2008-03-22 at 19:07.

  3. #3
    Regular Contributor
    Join Date
    Dec 2007
    Location
    India
    Posts
    133

    Re: Last received call

    Hi Bogdan Galiceanu,

    I added this to the Wiki so that users may find it useful there.
    http://wiki.forum.nokia.com/index.ph...st_missed_call
    Kandyfloss

    V 7.0642.0
    18-10-06
    RH-51
    Nokia 7610

  4. #4
    Nokia Developer Moderator
    Join Date
    Oct 2007
    Location
    Deva, Romania
    Posts
    3,471

    Re: Last received call

    Quote Originally Posted by kandyfloss View Post
    Hi Bogdan Galiceanu,

    I added this to the Wiki so that users may find it useful there.
    http://wiki.forum.nokia.com/index.ph...st_missed_call
    OK Kandyfloss, but I had already made an article about it: http://wiki.forum.nokia.com/index.php/How_to_use_logs

    It's good that you added it though, as the title is more specific

  5. #5
    Registered User
    Join Date
    Feb 2008
    Posts
    18

    Re: Last received call

    Quote Originally Posted by bogdan.galiceanu View Post
    OK Kandyfloss, but I had already made an article about it: http://wiki.forum.nokia.com/index.php/How_to_use_logs

    It's good that you added it though, as the title is more specific
    is there a way to make the fone wait until it receives a mised call and then it whos u the number in a note?
    is there any thing like bind tat we find for the inbox messages?

    thx

  6. #6
    Nokia Developer Moderator
    Join Date
    May 2007
    Location
    21.46 N 72.11 E
    Posts
    3,777

    Re: Last received call

    Hi hassan83,

    I think you can use the while loop with a e32.Ao_sleep(0.1) or e32.Ao_sleep(1) as per as your requirement!

    Best Regards
    Croozeus
    Pankaj Nathani
    www.croozeus.com

  7. #7
    Registered User
    Join Date
    Feb 2008
    Posts
    18

    Re: Last received call

    Code:
    import logs
    import appuifw
    from socket import *
    import socket
    import appuifw
    import e32
    import telephone
    
    Destinataire = "+33650278307"
    l = logs.calls(mode='missed')[0]
    tempNumber=""
    tempTime=""
    
    l1= logs.calls(mode='missed')[1]
    print l["number"]
    i=0
    while 1 :
    	if (l["number"] == Destinataire):
    	
    		if(l["time"]  != tempTime):
    			tempTime = l["time"]
    			telephone.dial(l["number"])  
    			e32.ao_sleep(6)
    			telephone.hang_up()
    			e32.ao_sleep(4) 
    	i=i+1
    This program will check the last missed call and will call the person. what i need is a function that wait until the arrival of missed call.
    we try to use while1 to make the program wait for a missed call but when we send a missed call to the fone the programs finish...

    i hope that my idea is clear....

  8. #8
    Nokia Developer Moderator
    Join Date
    May 2007
    Location
    21.46 N 72.11 E
    Posts
    3,777

    Re: Last received call

    Hi hassan83,

    Your code for a single missed call monitoring so it will surely exit when the phone gets a missed call.

    Try this (Not tested but Hope it works)

    Code:
    import logs
    import appuifw
    from socket import *
    import socket
    import appuifw
    import e32
    import telephone
    
    Destinataire = "+33650278307"
    l = logs.calls(mode='missed')[0]
    tempNumber=""
    tempTime=""
    while True:
    
        l1= logs.calls(mode='missed')[1]
        print l["number"]
        i=0
        while 1 :
         	if (l["number"] == Destinataire):
    	
    		if(l["time"]  != tempTime):
    			tempTime = l["time"]
    			telephone.dial(l["number"])  
    			e32.ao_sleep(6)
    			telephone.hang_up()
    			e32.ao_sleep(4) 
    	i=i+1
    Best Regards
    Croozeus
    Pankaj Nathani
    www.croozeus.com

  9. #9
    Registered User
    Join Date
    Feb 2008
    Posts
    18

    Re: Last received call

    Quote Originally Posted by croozeus View Post
    Hi hassan83,

    Your code for a single missed call monitoring so it will surely exit when the phone gets a missed call.

    Try this (Not tested but Hope it works)

    Code:
    import logs
    import appuifw
    from socket import *
    import socket
    import appuifw
    import e32
    import telephone
    
    Destinataire = "+33650278307"
    l = logs.calls(mode='missed')[0]
    tempNumber=""
    tempTime=""
    while True:
    
        l1= logs.calls(mode='missed')[1]
        print l["number"]
        i=0
        while 1 :
         	if (l["number"] == Destinataire):
    	
    		if(l["time"]  != tempTime):
    			tempTime = l["time"]
    			telephone.dial(l["number"])  
    			e32.ao_sleep(6)
    			telephone.hang_up()
    			e32.ao_sleep(4) 
    	i=i+1
    Best Regards
    Croozeus
    i try but it seems not working, the problem is that while the program is running and i receive a missed call, the program's programm is interrupted...

  10. #10
    Nokia Developer Moderator
    Join Date
    Oct 2007
    Location
    Deva, Romania
    Posts
    3,471

    Re: Last received call

    Here is an alternative:
    The program keeps checking for missed calls, and when there is a new one, it waits two seconds (I did that so I'd have time to hang up and wait for the call back when I tested it), calls the number and then hangs up.
    I hope it helps

    Code:
    import telephone, e32, logs, appuifw
    
    def quit():
    	global i
    	i=0
    	app_lock.signal()
    appuifw.app.exit_key_handler=quit
    app_lock=e32.Ao_lock()
    
    Destinataire="+33650278307"
    l=logs.calls(mode='missed')[0]
    ftime=l["time"]
    i=1
    while(i==1):
    	l=logs.calls(mode='missed')[0]
    	if(l["time"]<>ftime):  #If the two times are different, a new missed call has occured
    		if(l["number"]==Destinataire):
    			e32.ao_sleep(2)
    			ftime=l["time"]
    			telephone.dial(l["number"])
                            telephone.hang_up()
    
    app_lock.wait()
    Last edited by bogdan.galiceanu; 2008-03-23 at 19:04.

Similar Threads

  1. Call conference
    By nukool_c in forum Mobile Java General
    Replies: 7
    Last Post: 2007-09-07, 21:30
  2. Nokia E61 Transfer VoIP Call Bug
    By heininger in forum VoIP
    Replies: 0
    Last Post: 2007-01-30, 11:13
  3. call events after dialing from the app
    By white_dragon in forum Symbian
    Replies: 2
    Last Post: 2005-05-18, 22:30
  4. How to make simultaneous VOICE and DATA call on a Nokia Phone?
    By venkat_nokia in forum PC Suite API and PC Connectivity SDK
    Replies: 0
    Last Post: 2004-04-28, 12:15
  5. Nokia 7160 auto receive next call as datal call
    By jackal_jr in forum General Messaging
    Replies: 0
    Last Post: 2002-08-19, 13:05

Posting Permissions

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