Alexa Auto SDK  4.3
Public Types | Public Member Functions | List of all members
aace::phoneCallController::PhoneCallController Class Referenceabstract

Public Types

using ConnectionState = aace::phoneCallController::PhoneCallControllerEngineInterface::ConnectionState
 
using CallState = aace::phoneCallController::PhoneCallControllerEngineInterface::CallState
 
using CallingDeviceConfigurationProperty = aace::phoneCallController::PhoneCallControllerEngineInterface::CallingDeviceConfigurationProperty
 
using CallError = aace::phoneCallController::PhoneCallControllerEngineInterface::CallError
 
using DTMFError = aace::phoneCallController::PhoneCallControllerEngineInterface::DTMFError
 

Public Member Functions

virtual bool dial (const std::string &payload)=0
 
virtual bool redial (const std::string &payload)=0
 
virtual void answer (const std::string &payload)=0
 
virtual void stop (const std::string &payload)=0
 
virtual void sendDTMF (const std::string &payload)=0
 
void connectionStateChanged (ConnectionState state)
 
void callStateChanged (CallState state, const std::string &callId, const std::string &callerId="")
 
void callFailed (const std::string &callId, CallError code, const std::string &message="")
 
void callerIdReceived (const std::string &callId, const std::string &callerId)
 
void sendDTMFSucceeded (const std::string &callId)
 
void sendDTMFFailed (const std::string &callId, DTMFError code, const std::string &message="")
 
void deviceConfigurationUpdated (std::unordered_map< CallingDeviceConfigurationProperty, bool > configurationMap)
 
std::string createCallId ()
 

Detailed Description

PhoneCallController should be extended to allow a user to use Alexa to interact with a calling device such as a connected mobile phone. It provides interfaces for controlling inbound and outbound calls and for notifying the Engine of the state of a call session and the state of platform connection to a calling device.

The platform implementation is responsible for managing the lifecycle and user experience of a call session and connection to the calling device.

Deprecated:
This platform interface is deprecated. Use the Alexa Auto Services Bridge (AASB) message broker to publish and subscribe to AASB messages instead.
See also
aace::core::MessageBroker

Member Typedef Documentation

◆ ConnectionState

Describes the state of connection to a calling device

◆ CallState

Describes the state of a call

◆ CallingDeviceConfigurationProperty

Describes a configuration property of a connected calling device

◆ CallError

Describes an error for a failed call

◆ DTMFError

Describes an error preventing a DTMF signal from being delivered

Member Function Documentation

◆ dial()

virtual bool aace::phoneCallController::PhoneCallController::dial ( const std::string &  payload)
pure virtual

Notifies the platform implementation to initiate an outgoing phone call to the destination address

Parameters
[in]payloadDetails of the dial request in structured JSON format. See the following payload structure and the description of each field:
{
"callId": "{{STRING}}",
"callee": {
"details": "{{STRING}}",
"defaultContactAddress": {
"protocol": "{{STRING}}",
"format": "{{STRING}}",
"value": "{{STRING}}"
},
"alternativeContactAddresses": [{
"protocol": "{{STRING}}",
"format": "{{STRING}}",
"value": {{STRING}}
}]
},
}
}
  • callId (required): A unique identifier for the call
  • callee (required): The destination of the outgoing call
  • callee.details (optional): Descriptive information about the callee
  • callee.defaultContactAddress (required): The default address to use for calling the callee
  • callee.alternativeContactAddresses (optional): An array of alternate addresses for the callee
  • address.protocol (required): The protocol for this address of the callee. One of PSTN, SIP, H.323
  • address.format (optional): The format for this address of the callee. One of E.164, E.163, E.123, MICROSOFT, DIN5008, RAW
  • address.value (required): The address of the callee.
Returns
true if the platform implementation successfully handled the call

◆ redial()

virtual bool aace::phoneCallController::PhoneCallController::redial ( const std::string &  payload)
pure virtual

Notifies the platform implementation to redial the last called phone number.

After returning true, if no stored number is available to be redialed, PhoneCallController::callFailed with CallError::NO_NUMBER_FOR_REDIAL should be called.

Parameters
[in]payloadDetails of the redial request in structured JSON format. See the following payload structure and the description of each field:
{
"callId": "{{STRING}}"
}
  • callId (required): A unique identifier for the call
Returns
true if the platform implementation successfully handled the call

◆ answer()

virtual void aace::phoneCallController::PhoneCallController::answer ( const std::string &  payload)
pure virtual

Notifies the platform implementation to answer an inbound call

Parameters
[in]payloadDetails of the answer request in structured JSON format. See the following payload structure and the description of each field:
{
"callId": "{{STRING}}",
}
  • callId (required): The unique identifier for the call to answer

◆ stop()

virtual void aace::phoneCallController::PhoneCallController::stop ( const std::string &  payload)
pure virtual

Notifies the platform implementation to end an ongoing call or stop inbound or outbound call setup

Parameters
[in]payloadDetails of the stop request in structured JSON format. See the following payload structure and the description of each field:
{
"callId": "{{STRING}}"
}
  • callId (required): The unique identifier for the call to be stopped

◆ sendDTMF()

virtual void aace::phoneCallController::PhoneCallController::sendDTMF ( const std::string &  payload)
pure virtual

Notifies the platform implementation to send a DTMF signal to the calling device

Parameters
[in]payloadDetails of the DTMF request in structured JSON format. See the following payload structure and the description of each field:
{
"callId": "{{STRING}}",
"signal": "{{STRING}}"
}
  • callId (required): The unique identifier for the call
  • signal (required): The DTMF string to be sent to the calling device associated with the callId

◆ connectionStateChanged()

void aace::phoneCallController::PhoneCallController::connectionStateChanged ( ConnectionState  state)

Notifies the Engine of a change in connection to a calling device

Parameters
[in]stateThe state of connection to a calling device

◆ callStateChanged()

void aace::phoneCallController::PhoneCallController::callStateChanged ( CallState  state,
const std::string &  callId,
const std::string &  callerId = "" 
)

Notifies the Engine of a change in the state of an ongoing call

Parameters
[in]stateThe state of the call
[in]callIdThe unique identifier associated with the call
[in]callerIdThe identifier for a contact. May be included for CallState::CALL_RECEIVED

◆ callFailed()

void aace::phoneCallController::PhoneCallController::callFailed ( const std::string &  callId,
CallError  code,
const std::string &  message = "" 
)

Notifies the Engine of an error related to a call

Parameters
[in]callIdThe unique identifier for the call associated with the error
[in]codeThe error type
[in]messageA description of the error

◆ callerIdReceived()

void aace::phoneCallController::PhoneCallController::callerIdReceived ( const std::string &  callId,
const std::string &  callerId 
)

Notifies the Engine that a caller id was received for an inbound call

Parameters
[in]callIdThe unique identifier for the call associated with the callId
[in]callerIdThe caller's identifier or phone number

◆ sendDTMFSucceeded()

void aace::phoneCallController::PhoneCallController::sendDTMFSucceeded ( const std::string &  callId)

Notifies the Engine that sending the DTMF signal succeeded.

Parameters
[in]callIdThe unique identifier for the associated call
See also
PhoneCallController::sendDTMF

◆ sendDTMFFailed()

void aace::phoneCallController::PhoneCallController::sendDTMFFailed ( const std::string &  callId,
DTMFError  code,
const std::string &  message = "" 
)

Notifies the Engine that the DTMF signal could not be delivered to the remote party

Parameters
[in]callIdThe unique identifier for the associated call
[in]codeThe error type
[in]messageA description of the error
See also
PhoneCallController::sendDTMF

◆ deviceConfigurationUpdated()

void aace::phoneCallController::PhoneCallController::deviceConfigurationUpdated ( std::unordered_map< CallingDeviceConfigurationProperty, bool >  configurationMap)

Notifies the Engine of the calling feature configuration of the connected calling device. The configuration data may change if, for example, the connection mechanism to the calling device changes. The provided configuration will override the default or previous configuration.

See PhoneCallController::CallingDeviceConfigurationProperty for a description of each configurable feature

Parameters
[in]configurationMapA map of configuration properties to the boolean state of the properties

◆ createCallId()

std::string aace::phoneCallController::PhoneCallController::createCallId ( )

Generates a unique identifier for a call


Alexa Auto SDK 4.3 - Copyright 2017-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0