Provides the functionality of a phone
Events
phoneready
Triggered when phone is idle (no incoming, outgoing, active calls) and ready to accept commands
callback parameter event
{Object}
Example
{ service: {String} // identifies the phone service }
phonecallactive
Triggered when active phone call (recipient accepted the outgoing call or incoming call accepted locally)
callback parameter event
{Object}
Example
{ service: {String} // identifies the phone service callId: {String} // incoming call phone number in case of Handsfree, can be BBID etc }
phoneincoming
Triggered when there is incoming call, phone is ringing
callback parameter event
{Object}
Example
{ service: {String} // identifies the phone service callId: {String} // incoming call phone number in case of Handsfree, can be BBID etc }
Members
-
SERVICE_HFP
-
Defines identifier for HFP service
Methods
-
accept
-
Accept incoming call
Parameters:
Name Type Description callId
String ID to identify a call. Note that currently callId
is not in use, because with existing implementation of Handsfree we can have only one active call.service
String [optional] Identifier of the phone service, if no parameter is specified, the function call will be routed to the default service (currently Handsfree). Note: Currently service
is not in use. -
dial
-
Dial a number
If no parameters are specified, the function call will be routed to the default service (currently Handsfree). Note: Currently
service
is not in use.Parameters:
Name Type Description number
String Number to dial. service
String [optional] Identifier of the phone service. -
getActiveCalls
-
Not implemented
-
getState
-
Return the current state of the phone
Parameters:
Name Type Description service
String [optional] Identifier of the phone service, if no parameter is specified, the function call will be routed to the default service (currently Handsfree). Note: Currently service
is not in use.Returns:
Current state of the phone- Type
-
- String
-
hangup
-
End the current call
Parameters:
Name Type Description callId
String ID to identify a call. Note that currently callId
is not in use, because with existing implementation of Handsfree we can have only one active call.service
String [optional] Identifier of the phone service, if no parameter is specified, the function call will be routed to the default service (currently Handsfree). Note: Currently service
is not in use. -
hold
-
Not implemented
-
mute
-
Not implemented
-
redial
-
Redial the last called number
Parameters:
Name Type Description service
String [optional] Identifier of the phone service, if no parameter is specified, the function call will be routed to the default service (currently Handsfree). Note: Currently service
is not in use.