4.2 telephone -- Telephone services

Availability: S60.

This module provides an API to a telephone.

Since the users of the device can also hang-up the phone explicitly, they might affect the current status of the call. In addition, using this extension in an emulator has no effect since no calls can be connected.

The telephone module has the following functions:

dial( number)

Dials the number set in number. number is a string, for example u'+358501234567' where '+' is the international prefix, '358' is the country code, '50' is the mobile network code (or the area code), and '1234567' is the subscriber number. If there is an ongoing phone call prior to calling dial from Python, then the earlier call is put on hold and a new call is established. Calling dial multiple times when, for example, the first call has been answered and a line has been established results in subsequent calls not being connected.

hang_up( )
Hangs up if a call initiated by dial is in process. If this call has already been finished, SymbianError: KErrNotReady is raised.

incoming_call( )
Wait for incoming call, returns immediately. If a call arrives, answer can be called to answer the call. Without the invocation of function incoming_call, the function answer has no effect.

answer( )

Answers an incoming call - see also incoming_call.

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 first 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 defined as telephone module constants.

The following data items for state information are available in telephone4.3:

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.



Footnotes

...telephone4.3
The descriptions are taken from the S60 SDK documentation [4]
See About this document... for information on suggesting changes.