| Reply | « Previous Thread | Next Thread » |
|
Hello Everyone,
I am looking for detail information about call_state. I know that the call_state is a Tuple of which the first is the call state, and the second is confusing. Please provide more information on the second part of the Tuple. I have read that the second part of the Tuple is the number of an incoming call. What is the call_state for an outgoing call (is it the outgoing call phone number)?? RickTheGreat |
| RickTheGreat |
| View Public Profile |
| Find all posts by RickTheGreat |
|
Join Date: Feb 2008
Posts: 743
Location: Belo Horizonte, Brazil
Rafael T.
Offline
Forum Nokia Champion
|
|
|
Quote:
Code:
import telephone
STATES = {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"};
BR, Rafael. |
|
Hello,
According to "Pys60 Library Reference Release 1.4.5 Final", page 53. Link to document --> http://downloads.sourceforge.net/pys...3&big_mirror=0 Clearly states that the argument for the callable is a tuple (see below). call state(callable) The callable will be called when there are changes in the telephone line (lines) in the device. The argument for the call is a tuple with rst item the possible new state and the second item, the possible incoming call number as a Unicode string. The possible states in the tuple are defned as telephone module constants. Can someone tell me what the components of the tuple are. I know that the first one is the status of the phone line, but not what the second component is. RickTheGreat |
| RickTheGreat |
| View Public Profile |
| Find all posts by RickTheGreat |
|
Join Date: Feb 2008
Posts: 743
Location: Belo Horizonte, Brazil
Rafael T.
Offline
Forum Nokia Champion
|
|
Sorry, but the variables of call state are not a tuple
![]() It seems that call_state() passes a tuple to the callable argument ![]() But the call state variables are not tuples! If you try printing the variables, you will see that it returns an integer: Code:
import telephone print telephone.EStatusIdle # prints 1 print telephone.EStatusHold # prints 9 Code:
import e32, telephone
STATES = {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 handlecall((callState, number)):
print "callState = "+STATES[callState]
print "call from "+number
if callState == telephone.EStatusRinging:
telephone.asnwer()
elif callState == telephone.EStatusAnswering:
print "hanging up"
telephone.hang_up()
elif callState == telephone.EStatusDisconnecting:
print "hung up"
telephone.incoming_call()
telephone.call_state(handlecall)
app_lock = e32.Ao_lock()
app_lock.wait()
You may also want to check this tutorial. Hope it helps, Rafael.
Last edited by Rafael T. : 2009-01-24 at 20:26.
|
|
Hello Rafael T.,
Thanks for the quick response to my questions. I am still un-sure of what the elements of the tuple are in this situation. I believe the first element is the Line Status, and I think the second element is the phone number of the outgoing call. I want to be able to review the outgoing phone number of a call being place (dialed) on a cell phone. My question are still: 1. What are the elements of the tuple? 2. Are the elements of the tuple the Line Status and the Phone Number of the outgoing call? I have reviewed some of the coding on the web site and it seem to indicate that the second element in the tuple is the outgoing phone number. Please tell me if this is true. Regards, RickTheGreat |
| RickTheGreat |
| View Public Profile |
| Find all posts by RickTheGreat |
|
Join Date: Feb 2008
Posts: 743
Location: Belo Horizonte, Brazil
Rafael T.
Offline
Forum Nokia Champion
|
|
|
Quote:
![]() |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Rate This Thread | |
| Thread | Thread Starter | Forum | Replies | Last Post |
|---|---|---|---|---|
| While reading callLog i am only getting the voice call details, no details about sms | dejies | General Symbian C++ | 4 | 2009-01-20 01:29 |
| [moved]How to get software details from mobile device using j2me api or any other api | azar_sheik | Mobile Java General | 5 | 2008-08-29 07:22 |
| Symbian C++ - Series 60 - How can i extract details for an SMS message? | periakaruppan | Symbian User Interface | 2 | 2005-09-05 08:40 |
| Symbian C++ - Series 60 - How can i extract details for an SMS message? | periakaruppan | Symbian Networking & Messaging | 2 | 2005-08-03 03:18 |
| "Web Address" setting in Midlet Details | jinja2 | Mobile Java General | 0 | 2004-12-08 02:21 |