public class AskFast extends Object
| Constructor and Description |
|---|
AskFast() |
AskFast(javax.servlet.http.HttpServletRequest req) |
AskFast(javax.servlet.http.HttpServletRequest req,
String accountID,
String refreshToken,
Map<String,String> params) |
AskFast(String url) |
AskFast(String url,
String accountID,
String refreshToken,
Map<String,String> params) |
public AskFast()
public AskFast(javax.servlet.http.HttpServletRequest req)
public AskFast(String url)
public AskFast(javax.servlet.http.HttpServletRequest req,
String accountID,
String refreshToken,
Map<String,String> params)
public String getQuestionId()
public Question getQuestion()
public void say(String value)
value - Either a string value (TTS in case of a phonecall) or a url to
an audio file, which explains your question or statementpublic void say(String value, String next)
value - Either a string value (TTS in case of a phonecall) or a url to
an audio file, which explains your question or statementnext - The next URL that must be fetched. This url is added as the
answer callbackpublic void ask(String ask)
Question.QUESTION_TYPE_OPENask - Either a string value (TTS in case of a phonecall) or a url to
an audio file, which explains your question or statementpublic void askByVoice(String ask, String next)
ask - Either a string value (TTS in case of a phonecall) or a url to
an audio file, which explains your question or statementnext - The next URL that must be fetched. This url is added as the
answer callbackpublic void ask(String ask, String next)
ask - Either a string value (TTS in case of a phonecall) or a url to
an audio file, which explains your question or statementnext - The next URL that must be fetched. This url is added as the
answer callbackpublic void ask(String ask, String answerText, String next)
ask - Either a string value (TTS in case of a phonecall) or a url to
an audio file, which explains your question or statementanswerText - In an open question, this is not very relevant as information
specific to an answer can also be added to the ask paramnext - The next URL that must be fetched. This url is added as the
answer callbackpublic void exit(String exitURL)
exitURL - Text or url to be played before exitpublic void reject()
public void conference(String ask, String next)
ask - Either a string value (TTS in case of a phonecall) or a url to
an audio file, which explains your question or statementnext - The next URL that must be fetched. This url is added as the
answer callbackpublic void addAnswer(String answer, String next)
answer - Either a string value (TTS in case of a phonecall) or a url to
an audio file, which explains this answer or statementnext - The next URL that must be fetched. This url is added as the
answer callbackpublic void redirect(String to)
to - You can redirect to a phonenumber, client or another http URL.public void redirect(String to, String redirectText)
to - You can redirect to a phonenumber, client or another http URL.redirectText - Either a string value (TTS in case of a phonecall) or a url to
an audio file, which is played out before the redirect happenspublic void redirect(String to, String redirectText, String next)
to - You can redirect to a phonenumber, client or another http URL.redirectText - Either a string value (TTS in case of a phonecall) or a url to
an audio file, which is played out before the redirect happensnext - The next URL that must be fetched. This url is added as the
answer callbackpublic void redirect(String to, String redirectText, String next, String preconnectURL)
to - You can redirect to a phonenumber, client or another http URL.redirectText - Either a string value (TTS in case of a phonecall) or a url to
an audio file, which is played out before the redirect happensnext - The next URL that must be fetched. This url is added as the
answer callbackpreconnectURL - this url is used to execute a question at the callee side
before connecting him to the caller. E.g. Now the callee can
pick the phone, listen to a menu, then connect the call. This
is useful only with special calling adapters.public void redirect(List<String> addresses, String redirectText, String next, String preconnectURL)
addresses - Redirect the phone call to all these addressesredirectText - Either a string value (TTS in case of a phonecall) or a url to
an audio file, which is played out before the redirect happensnext - The next URL that must be fetched. This url is added as the
answer callbackpreconnectURL - this url is used to execute a question at the callee side
before connecting him to the caller. E.g. Now the callee can
pick the phone, listen to a menu, then connect the call. This
is useful only with special calling adapters.public String render()
@Deprecated public String outBoundCall(String fromAddress, String toAddress, String url) throws Exception
AskFastRestClient.startDialog(String, com.askfast.model.AdapterType, String, String, String)
AskFastRestClient.startDialog(String, String, String, String, String)
,
AskFastRestClient.startDialog(Map, Map, Map, com.askfast.model.AdapterType, String, String, String, String)
,
AskFastRestClient.startEmailDialog(String, String, String, String)
, AskFastRestClient.startPhoneDialog(String, String),
AskFastRestClient.startSMSDialog(String, String, String)
fromAddress - address of the sendertoAddress - address of the receiverurl - GET request on this URL has the questionException - 403 Authorization Exceptionspublic String outBoundCall(String fromAddress, String toAddress, String subject, String url) throws Exception
AskFastRestClient.startDialog(String, com.askfast.model.AdapterType, String, String, String)
AskFastRestClient.startDialog(String, String, String, String, String)
,
AskFastRestClient.startDialog(Map, Map, Map, com.askfast.model.AdapterType, String, String, String, String)
,
AskFastRestClient.startEmailDialog(String, String, String, String)
, AskFastRestClient.startPhoneDialog(String, String),
AskFastRestClient.startSMSDialog(String, String, String)
fromAddress - address of the sendertoAddress - address of the receiversubject - Subject is relevant to email conversations onlyurl - GET request on this URL has the questionException - 403 Authorization Exceptionspublic String outBoundCall(String fromAddress, String senderName, String toAddress, String subject, String url) throws Exception
AskFastRestClient.startDialog(String, com.askfast.model.AdapterType, String, String, String)
AskFastRestClient.startDialog(String, String, String, String, String)
,
AskFastRestClient.startDialog(Map, Map, Map, com.askfast.model.AdapterType, String, String, String, String)
,
AskFastRestClient.startEmailDialog(String, String, String, String)
, AskFastRestClient.startPhoneDialog(String, String),
AskFastRestClient.startSMSDialog(String, String, String)
fromAddress - address of the sendersenderName - The alternative senderIdtoAddress - address of the receiversubject - Subject is relevant to email conversations onlyurl - GET request on this URL has the questionException - 403 Authorization Exceptionspublic String outBoundCall(String fromAddress, String senderName, Collection<String> toAddressList, String subject, String url) throws Exception
AskFastRestClient.startDialog(String, com.askfast.model.AdapterType, String, String, String)
AskFastRestClient.startDialog(String, String, String, String, String)
,
AskFastRestClient.startDialog(Map, Map, Map, com.askfast.model.AdapterType, String, String, String, String)
,
AskFastRestClient.startEmailDialog(String, String, String, String)
, AskFastRestClient.startPhoneDialog(String, String),
AskFastRestClient.startSMSDialog(String, String, String)
fromAddress - address of the sendersenderName - name of the sender (userful for sending emails)toAddressList - collection of all recipient addressessubject - subject of the emailurl - question urlException - 403 Authorization Exceptionspublic String outBoundCall(String fromAddress, String senderName, Map<String,String> toAddressNameMap, String url) throws Exception
AskFastRestClient.startDialog(String, com.askfast.model.AdapterType, String, String, String)
AskFastRestClient.startDialog(String, String, String, String, String)
,
AskFastRestClient.startDialog(Map, Map, Map, com.askfast.model.AdapterType, String, String, String, String)
,
AskFastRestClient.startEmailDialog(String, String, String, String)
, AskFastRestClient.startPhoneDialog(String, String),
AskFastRestClient.startSMSDialog(String, String, String)
fromAddress - address of the sendersenderName - name of the sender (userful for sending emails)toAddressNameMap - map containing all recipient address for a Broadcast callurl - GET request on this URL has the questionException - 403 Authorization Exceptionspublic String outBoundCall(String fromAddress, String senderName, Map<String,String> toAddressNameMap, String subject, String url) throws Exception
AskFastRestClient.startDialog(String, com.askfast.model.AdapterType, String, String, String)
AskFastRestClient.startDialog(String, String, String, String, String)
,
AskFastRestClient.startDialog(Map, Map, Map, com.askfast.model.AdapterType, String, String, String, String)
,
AskFastRestClient.startEmailDialog(String, String, String, String)
, AskFastRestClient.startPhoneDialog(String, String),
AskFastRestClient.startSMSDialog(String, String, String)
fromAddress - address of the sendersenderName - name of the sender (userful for sending emails)toAddressNameMap - map containing all recipient address for a Broadcast callsubject - subject used in case this is an outbound emailurl - GET request on this URL has the questionException - 403 Authorization Exceptionspublic String outBoundCall(String fromAddress, String senderName, Map<String,String> toAddressNameMap, Map<String,String> ccAddressNameMap, Map<String,String> bccAddressNameMap, String subject, String url) throws Exception
AskFastRestClient.startDialog(String, com.askfast.model.AdapterType, String, String, String)
AskFastRestClient.startDialog(String, String, String, String, String)
,
AskFastRestClient.startDialog(Map, Map, Map, com.askfast.model.AdapterType, String, String, String, String)
,
AskFastRestClient.startEmailDialog(String, String, String, String)
, AskFastRestClient.startPhoneDialog(String, String),
AskFastRestClient.startSMSDialog(String, String, String)
fromAddress - address of the sendersenderName - name of the sender (userful for sending emails)toAddressNameMap - map containing all recipient address for a Broadcast callccAddressNameMap - map containing all cc recipient address for a Broadcast callbccAddressNameMap - map containing all bcc recipient address for a Broadcast callsubject - subject used in case this is an outbound emailurl - GET request on this URL has the questionException - 403 Authorization Exceptionspublic void addEvent(EventPost.EventType eventType, String callbackURL)
eventType - Type of the eventcallbackURL - The callback to which EventPost is POSTed topublic void addMediaProperty(MediaProperty.MediumType mediumType, MediaProperty.MediaPropertyKey propertyKey, String value)
mediumType - The type of the communication channelpropertyKey - The type of the property addedvalue - The value of the property addedpublic String obtainAccessToken() throws Exception
AskFastRestClient.getAccessToken() insteadException - 403 Authorization Exceptionspublic void setAccountID(String accountID)
accountID - The accountId of userpublic String getAccountID()
public String getBearerToken()
public void setBearerToken(String bearerToken)
public void setPreferredLanguage(String language)
public void render(javax.servlet.http.HttpServletResponse response)
throws IOException
IOExceptionpublic String getBaseURL()
public void setBaseURL(String baseURL)
public String getASKFAST_JSONRPC()
public void setASKFAST_JSONRPC(String aSKFAST_JSONRPC)
public String getASKFAST_KEYSERVER()
public void setASKFAST_KEYSERVER(String aSKFAST_KEYSERVER)
Copyright © 2017 AskFast BV. All Rights Reserved.