×

Discussion Board

Page 1 of 2 12 LastLast
Results 1 to 15 of 16
  1. #1
    Regular Contributor
    Join Date
    May 2008
    Posts
    88

    Detecting a Call

    Hi,
    I am implementing an application that requires to know whether the user in handling a call or not at that time.What module should I use?..Plz Help.
    Rishabh

  2. #2
    Super Contributor
    Join Date
    Oct 2007
    Location
    Deva, Romania
    Posts
    3,471

    Re: Detecting a Call

    Hi,

    I suggest you use the telephone module for detecting the various states of a call. From the PyS60 documentation, these are the available constants:
    EStatusUnknown
    Indicates that the status is unknown.

    EStatusIdle
    Idle line status (no active calls).

    EStatusDialling
    Call dialling status.

    EStatusRinging
    Call ringing status.

    EStatusAnswering
    Call answering status.

    EStatusConnecting
    Call connecting status.

    EStatusConnected
    Call connected status.

    EStatusReconnectPending
    Call is undergoing temporary channel loss and it may or may not be reconnected.

    EStatusDisconnecting
    Call disconnecting status.

    EStatusHold
    Call on hold.

    EStatusTransferring
    Call is transferring.

    EStatusTransferAlerting
    Call in transfer is alerting the remote party.
    As an alternative, you can use the sysagent module by cyke64 to see the call state. See this article for more info.

    Hope that helps

  3. #3
    Regular Contributor
    Join Date
    May 2008
    Posts
    88

    Re: Detecting a Call

    Hey,
    Thnx for the help but I couldnt get u completely.I want to detect whether a call is gng on and if a call is gng on when it ends that too.Can u suggest which constants to use.It will gr8.
    Rishabh

  4. #4
    Super Contributor
    Join Date
    Oct 2007
    Location
    Deva, Romania
    Posts
    3,471

    Re: Detecting a Call

    Well, EStatusRinging is for when someone is calling you, EStatusDialling is for when you are calling someone. EStatusConnected is for when a call is answered (by either side). EStatusIdle is for when no call is in progress (that means you're not being called and are not calling anyone).

    This thread may be of use to you, particularly this post.

    Hope that helps you understand better. If you have any more questions feel free to ask

  5. #5
    Regular Contributor
    Join Date
    May 2008
    Posts
    88

    Smile Re: Detecting a Call

    Hey Buddy,
    Thnks for all ur help
    Rishabh

  6. #6
    Regular Contributor
    Join Date
    May 2008
    Posts
    88

    Re: Detecting a Call

    Hey,
    Hi I tried the program that was in the post.But I was not able to run it.It gave an error like:-
    Attribute Error:'module' object has no attribute 'call_state'
    Rishabh

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

    Re: Detecting a Call

    Quote Originally Posted by rishabhgupta View Post
    Hey,
    Hi I tried the program that was in the post.But I was not able to run it.It gave an error like:-
    Attribute Error:'module' object has no attribute 'call_state'
    Rishabh
    Did you use the following lines to import the modules?

    from sysagent import *
    from esysagent import *
    Best Regards,
    Croozeus
    Pankaj Nathani
    www.croozeus.com

  8. #8
    Regular Contributor
    Join Date
    May 2008
    Posts
    88

    Re: Detecting a Call

    No it hadnt done then but i did it now,but it still showing the error.
    Rishabh

  9. #9
    Regular Contributor
    Join Date
    May 2008
    Posts
    88

    Re: Detecting a Call

    Hey,
    Is this thing limited to 3rd Edition Mobile Phones only or extends to 2nd Edition 2?....
    Rishabh

  10. #10
    Super Contributor
    Join Date
    Oct 2007
    Location
    Deva, Romania
    Posts
    3,471

    Re: Detecting a Call

    Quote Originally Posted by rishabhgupta View Post
    Hey,
    Is this thing limited to 3rd Edition Mobile Phones only or extends to 2nd Edition 2?....
    Rishabh
    Are you talking about the built-in telephone method, or the sysagent method?
    For telephone, from the documentation:
    Note: The following functions and data items are available from S60 3rd Edition onwards (inclusive).
    As for sysagent, I'm not sure but I think it works on S60 2nd edition too.

  11. #11
    Regular Contributor
    Join Date
    May 2008
    Posts
    88

    Re: Detecting a Call

    This sysagent thing because on net i found two methods in the telephone module i.e. Dial and Hangup..
    Is there any documentation from where I can learn...well I had implemented my previous program that checked for incoming messages and played an alert alarm in case of a particular message.When I checked this application while a call is going on.i.e. if a person who has this program running in the background and is attending a call,gets a message that is supposed to give an alarm,the alarm comes but it stops when the call is ended.I want to start it again when the call is ended,thats y i need the state of the phone at that time.Can u suggest wht to do in this case and how to do this.
    Thnx very much
    Rishabh

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

    Smile Re: Detecting a Call

    Quote Originally Posted by rishabhgupta View Post
    Hey,
    Is this thing limited to 3rd Edition Mobile Phones only or extends to 2nd Edition 2?....
    Rishabh
    Quote Originally Posted by bogdan.galiceanu View Post
    A
    As for sysagent, I'm not sure but I think it works on S60 2nd edition too.
    The sysagent works on 2nd Edition devices as well

    Best Regards,
    Croozeus
    Pankaj Nathani
    www.croozeus.com

  13. #13
    Regular Contributor
    Join Date
    May 2008
    Posts
    88

    Re: Detecting a Call

    Hey,
    I used the following code.But it still shows that error. I am using Edition 2 mobile phone.
    Code:
    import appuifw
    import e32
    import telephone
    import sysagent 
    import esysagent 
    
    
    appuifw.app.title = u'Incoming call Test'
    
    def handle_call(state):
       appuifw.note(u"Chiamato", "info")
       
    def cb_calling(state):
        appuifw.note(unicode('0:' + str(state[0]) + ';1:' + str(state[1])), "info")
        if (state[0]==telephone.EStatusRinging):
            handle_call(state)
    
    
    def quit():
        app_lock.signal()
    
    appuifw.app.exit_key_handler= quit
    app_lock=e32.Ao_lock()
    
    telephone.call_state(cb_calling)
    #telephone.incoming_call()
    
    app_lock.wait()
    Rishabh

  14. #14
    Super Contributor
    Join Date
    Oct 2007
    Location
    Deva, Romania
    Posts
    3,471

    Re: Detecting a Call

    Quote Originally Posted by rishabhgupta View Post
    Hey,
    I used the following code.But it still shows that error. I am using Edition 2 mobile phone.
    Code:
    import appuifw
    import e32
    import telephone
    import sysagent 
    import esysagent 
    
    
    appuifw.app.title = u'Incoming call Test'
    
    def handle_call(state):
       appuifw.note(u"Chiamato", "info")
       
    def cb_calling(state):
        appuifw.note(unicode('0:' + str(state[0]) + ';1:' + str(state[1])), "info")
        if (state[0]==telephone.EStatusRinging):
            handle_call(state)
    
    
    def quit():
        app_lock.signal()
    
    appuifw.app.exit_key_handler= quit
    app_lock=e32.Ao_lock()
    
    telephone.call_state(cb_calling)
    #telephone.incoming_call()
    
    app_lock.wait()
    Rishabh
    If you're planning to use sysagent there's no need to use telephone.call_state() (and on 2nd edition devices it's not even available, that's why you get the "module object has no attribute call_state" error). To check the call state with sysagent check this article.

  15. #15
    Registered User
    Join Date
    Dec 2007
    Posts
    9

    Re: Detecting a Call

    Quote Originally Posted by bogdan.galiceanu View Post
    Hi,

    I suggest you use the telephone module for detecting the various states of a call. From the PyS60 documentation, these are the available constants:


    As an alternative, you can use the sysagent module by cyke64 to see the call state. See this article for more info.

    Hope that helps
    Would you give me some code example to use telephone module for detecting various states of a call?

Similar Threads

  1. Call conference
    By nukool_c in forum Mobile Java General
    Replies: 7
    Last Post: 2007-09-07, 21:30
  2. Replies: 1
    Last Post: 2007-08-07, 11:00
  3. Nokia E61 Transfer VoIP Call Bug
    By heininger in forum VoIP
    Replies: 0
    Last Post: 2007-01-30, 11:13
  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. Detecting Incoming call Activity.
    By Utk in forum Symbian
    Replies: 1
    Last Post: 2004-04-16, 14:03

Posting Permissions

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