Qtopia Telephony System Overview
DialerControl
• The DialerControl class provides a convenient interface to the phone call manager.
• Application should use DialerControl instead of QPhoneCallManager
• Main functions:
– dial ( const QString & number, bool sendcallerid, const QString & callType = "Voice", const QUniqueId & contact = QUniqueId() )
– endAllCalls ()
– endCall ( int id )
– hold ()
– activateCall ( int id )
– accept ()
– join ()
– transfer ()
QPhoneCallManager
• Internally used by DialerControl
• new outgoing calls can be created with create().
• The calls() method returns a list of all active calls in the system
• As calls change state, the statesChanged() signal is emitted
• The newCall() signal is emitted when new calls are added to the call list
QPhoneCall
• The QPhoneCall class provides an interface for managing individual incoming and outgoing phone calls.
• QPhoneCall is the primary interface for managing a phone call that is in progress.
• QPhoneCall instances act as identifiers for the actual call objects. The actual call object will persist until the call ends, either due to explicit hangup(), remote disconnection, or some form of network failure.
• State changes on individual calls can be tracked using QPhoneCall::connectStateChanged()
TelephonyService
All interfaces list: qtopia-phone-4.2.3/doc/html/phonelibrary.html
• Handlers in the telephony system are referred to as services. Each service has a unique name, such as modem, voip, etc.
• Within each service is a list of interfaces for functionality areas such as network registration, phone calls, SMS, SIM Application Toolkit, etc.
QPhoneCallProvider
• The QPhoneCallProvider class implements a mechanism for phone call providers to hook into the telephony system.
• Phone call providers inherit from the QPhoneCallProvider class and override the create() method. They also separately inherit their own call implementation class from QPhoneCallImpl.
• Subclasses should call setCallTypes() within their constructor to indicate the call types that they can handle.
• QPhoneCallProvider have two IPC channels(QtopiaIpcAdaptor) to communicate with other client application(dialer):
QPE/Communications/QPhoneCallProvider/Request
QPE/Communications/QPhoneCallProvider/Response
• Request received from QPE/Communications/QPhoneCallProvider/Request
dial(QString,QString,QString,QDialOptions)
hangup(QString,QPhoneCall::Scope)
accept(QString)
hold(QString)
activate(QString,QPhoneCall::Scope)
join(QString,bool)
tone(QString,QString)
transfer(QString,QString)
listAllCalls()
• Response sent from QPE/Communications/QPhoneCallProvider/Response:
requestFailed(QString,QPhoneCall::Request)
notification(QString,QPhoneCall::Notification,QString)
dataPort(QString,int) stateChanged(QString,QPhoneCall::State,QString,QString,QString,int)
stateTransaction(QByteArray)
QPhoneCallImpl
• The QPhoneCallImpl class provides a base class for specific phone call implementations.
• The QPhoneCallProvider class provides the infrastructure to receive requests from client applications and dispatch them to the appropriate methods on QPhoneCallImpl. As the calls change state, the state information is sent back to the client applications.
Outgoing call state machine
Incoming call State Machine
Make a phone call
- DMSPhoneCallProvider is subclassed from QPhoneCallProvider
- DMSPhoneCallImple is subclessed from QPhoneCalImple
- DMSLayer is a class which encapsulates hardware-related phone system details.
Receive an incoming Call