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) |
| Modifier and Type | Method and Description |
|---|---|
void |
addAnswer(String answer,
AskFast askFast)
adds an answer by linking the questionid of the askFast parameter as the
callbackURL.
|
void |
addAnswer(String answer,
String next)
adds an answer corresponding to a question asked
|
void |
addEvent(EventPost.EventType eventType,
String callbackURL) |
void |
addMediaProperty(MediaProperty.MediumType mediumType,
MediaProperty.MediaPropertyKey propertyKey,
String value) |
void |
ask(String ask)
asks a question
|
void |
ask(String ask,
AskFast askFast) |
void |
ask(String ask,
String next)
asks an open question with text as in field: ask and an answer with
callback as in field: next
|
void |
ask(String ask,
String answerText,
String next)
asks an open question with text as in field: ask and an answer with callback as in field: next
and text as in field: answerText
|
void |
askByVoice(String ask,
String next)
creates an open question with media property as audio.
|
void |
conference(String ask,
String next)
Sets up a conference.
|
void |
exit(String exitURL)
Ends this conversation
|
String |
getAccountID() |
String |
getASKFAST_JSONRPC() |
String |
getASKFAST_KEYSERVER() |
String |
getBaseURL() |
String |
getBearerToken() |
Map<String,String> |
getParams() |
Question |
getQuestion() |
String |
getQuestionId() |
String |
obtainAccessToken() |
String |
outBoundCall(String fromAddress,
String senderName,
Collection<String> toAddressList,
String subject,
String url)
overloaded method for any broadcast outboundcalls with a subject
(Everything including an Email)
|
String |
outBoundCall(String fromAddress,
String senderName,
Map<String,String> toAddressNameMap,
Map<String,String> ccAddressNameMap,
Map<String,String> bccAddressNameMap,
String subject,
String url)
overloaded method for any broadcast outboundcalls with a subject, cc and bcc list (Everything including Email)
|
String |
outBoundCall(String fromAddress,
String senderName,
Map<String,String> toAddressNameMap,
String url)
overloaded method for any broadcast outboundcalls without a subject
(Everything except an Email).
|
String |
outBoundCall(String fromAddress,
String senderName,
Map<String,String> toAddressNameMap,
String subject,
String url)
overloaded method for any broadcast outboundcalls with a subject
|
String |
outBoundCall(String fromAddress,
String toAddress,
String url)
overloaded method for any outboundcalls without a subject (Everything
except Email)
|
String |
outBoundCall(String fromAddress,
String toAddress,
String subject,
String url)
overloaded method for any outboundcalls with a subject (Everything
including Email)
|
String |
outBoundCall(String fromAddress,
String senderName,
String toAddress,
String subject,
String url) |
void |
redirect(String to)
redirect the control to a new agent
|
void |
redirect(String to,
String redirectText)
redirect the control to a new agent
|
void |
redirect(String to,
String redirectText,
String next)
redirect the control to a new agent
|
void |
redirect(String to,
String redirectText,
String next,
String preconnectURL)
redirect the control to a new phone.
|
String |
render() |
void |
render(javax.servlet.http.HttpServletResponse response) |
void |
say(String value)
creates a comment question if the next parameter is null.
|
void |
say(String value,
String next) |
void |
setAccountID(String accountID) |
void |
setASKFAST_JSONRPC(String aSKFAST_JSONRPC) |
void |
setASKFAST_KEYSERVER(String aSKFAST_KEYSERVER) |
void |
setBaseURL(String baseURL) |
void |
setBearerToken(String bearerToken) |
void |
setPreferredLanguage(String language) |
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 - public void ask(String ask)
ask - public void askByVoice(String ask, String next)
ask - next - public void ask(String ask, String next)
ask - next - public void ask(String ask, String answerText, String next)
ask - next - public void exit(String exitURL)
Text - or url to be played before exitpublic void conference(String ask, String next)
Text - or url to be played before exitpublic void addAnswer(String answer, String next)
answerText - next - public void addAnswer(String answer, AskFast askFast)
answer - askFast - this is linked to the callback of the answerpublic void redirect(String to)
public void redirect(String to, String redirectText)
redirectText - : can be the text directly or a HTTP based url which contains
the textpublic void redirect(String to, String redirectText, String next)
redirectText - : can be the text directly or a HTTP based url which contains
the textnext - : the URL where the question for the redirection agent is
availablepublic void redirect(String to, String redirectText, String next, String preconnectURL)
to - redirect the phone control to this addressplays - this redirectText or url when the control is being redirected.next - the URL where the question for the redirection agent is
availablepreconnectURL - 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()
public String outBoundCall(String fromAddress, String toAddress, String url) throws Exception
fromAddress - address of the sendertoAddress - address of the receiverurl - GET request on this URL has the questionExceptionpublic String outBoundCall(String fromAddress, String toAddress, String subject, String url) throws Exception
fromAddress - address of the sendertoAddress - address of the receiverurl - GET request on this URL has the questionExceptionpublic String outBoundCall(String fromAddress, String senderName, String toAddress, String subject, String url) throws Exception
Exceptionpublic String outBoundCall(String fromAddress, String senderName, Collection<String> toAddressList, String subject, String url) throws Exception
fromAddress - address of the sendersenderName - name of the sender (userful for sending emails)toAddressList - collection of all recipient addressessubject - subject of the emailurl - question urlExceptionpublic String outBoundCall(String fromAddress, String senderName, Map<String,String> toAddressNameMap, String url) throws Exception
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 questionExceptionpublic String outBoundCall(String fromAddress, String senderName, Map<String,String> toAddressNameMap, String subject, String url) throws Exception
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 questionExceptionpublic String outBoundCall(String fromAddress, String senderName, Map<String,String> toAddressNameMap, Map<String,String> ccAddressNameMap, Map<String,String> bccAddressNameMap, String subject, String url) throws Exception
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 questionExceptionpublic void addEvent(EventPost.EventType eventType, String callbackURL)
public void addMediaProperty(MediaProperty.MediumType mediumType, MediaProperty.MediaPropertyKey propertyKey, String value)
public void setAccountID(String accountID)
public 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 © 2015 AskFast BV. All rights reserved.