|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.hoiio.sdk.HoiioService
public class HoiioService
Constructor Summary | |
---|---|
HoiioService(String appId,
String accessToken)
Constructor |
Method Summary | |
---|---|
Map<String,Object> |
call(String dest1,
String dest2,
String callerId,
String tag,
String notifyUrl)
Make 2-way callback |
Map<String,Object> |
callGetHistory(Date from,
Date to,
Integer page)
Get call history |
Map<String,Object> |
callGetRate(String dest1,
String dest2)
Get Call Rate |
Map<String,Object> |
callQueryStatus(String txnRef)
Query call status |
Map<String,Object> |
conference(String dest,
String room,
String callerId,
String tag,
String notifyUrl)
Make conference call |
Map<String,Object> |
hangup(String txnRef)
|
Map<String,Object> |
ivrDial(String msg,
String dest,
String callerID,
String tag,
String notifyUrl)
Make outgoing IVR |
Map<String,Object> |
ivrGather(String session,
String msg,
Integer maxDigits,
Integer timeout,
Integer attempts,
String tag,
String notifyUrl)
IVR Gather |
Map<String,Object> |
ivrHangup(String session,
String msg,
String tag,
String notifyUrl)
IVR Hangup |
Map<String,Object> |
ivrPlay(String session,
String msg,
String tag,
String notifyUrl)
IVR play the message |
Map<String,Object> |
ivrRecord(String session,
String msg,
String maxDuration,
String tag,
String notifyUrl)
IVR Record |
Map<String,Object> |
ivrTransfer(String session,
String msg,
String dest,
String callerID,
String tag,
String notifyUrl)
IVR Transfer |
Map<String,String> |
parseNotify(String notify)
Parse notify for call, sms and ivr |
Map<String,Object> |
smsGetHistory(Date from,
Date to,
Integer page)
Get SMS history |
Map<String,Object> |
smsGetRate(String dest,
String msg)
Get SMS rate |
Map<String,Object> |
smsQueryStatus(String txnRef)
Query SMS status |
Map<String,Object> |
smsSend(String dest,
String senderName,
String msg,
String tag,
String notifyUrl)
Send SMS |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HoiioService(String appId, String accessToken)
Method Detail |
---|
public Map<String,Object> call(String dest1, String dest2, String callerId, String tag, String notifyUrl) throws HoiioException
dest1
- (optional) The first number to call in E.164 format (e.g. +6511111111). This cannot be the same as dest2 parameter. If omitted, the call will be made to the number registered in your developer account.dest2
- The second number to call in E.164 format (e.g. +6511111111). This cannot be the same as dest1 parameter.callerId
- (optional) Caller ID that dest2 will see on their incoming call. Can be either developer's registered number/hoiio number/"private"tag
- (optional) This is a text string containing your own reference ID for this transactionnotifyUrl
- (optional) A fully-qualified HTTP/S callback URL on your web server to be notified when the call ends
HoiioException
- Any error occurspublic Map<String,Object> callGetRate(String dest1, String dest2) throws HoiioException
dest1
- The first number to call in E.164 format (e.g. +6511111111).dest2
- The second number to call in E.164 format (e.g. +6511111111).
HoiioException
- Any error occurspublic Map<String,Object> callQueryStatus(String txnRef) throws HoiioException
txnRef
- The unique reference ID for the required transaction.
HoiioException
- Any error occurspublic Map<String,Object> callGetHistory(Date from, Date to, Integer page) throws HoiioException
from
- (optional) Retrieve call history made by this app starting from this date/time in "YYYY-MM-DD HH:MM:SS" (GMT+8) format. E.g. "2010-01-01 00:00:00". If omitted, call history will be retrieved from the earliest transaction.to
- (optional) Retrieve call history made by this app before this date/time in "YYYY-MM-DD HH:MM:SS" (GMT+8) format. E.g. "2010-01-01 00:00:00". If omitted, call history will be retrieved up to the current point of time.page
- (optional) Each request returns a maximum of 100 entries. This parameter indicates which subset of entries to return. If omitted, the first page will be retrieved.
HoiioException
- Any error occurspublic Map<String,Object> conference(String dest, String room, String callerId, String tag, String notifyUrl) throws HoiioException
dest
- A comma-seperated list of destination numbers in E.164 format to be called and placed in the conference roomroom
- (optional) A text string representing the conference room ID. Valid characters are a-z, A-Z, 0-9, period (.) and underscore (_) characters. Max 32 characters.callerId
- (optional) The Caller ID that each destination number will see on their incoming call.tag
- (optional) This is a text string containing your own reference ID for this transactionnotifyUrl
- (optional) A fully-qualified HTTP/S callback URL on your web server to be notified when a call ends
HoiioException
- Any error occurspublic Map<String,Object> hangup(String txnRef) throws HoiioException
txnRef
- The unique reference ID for the call you want to hangup.
HoiioException
public Map<String,Object> smsSend(String dest, String senderName, String msg, String tag, String notifyUrl) throws HoiioException
dest
- The recipient number of the SMS in E.164 format (e.g. +6511111111).senderName
- (optional) The sender name that the recipient of your SMS will seemsg
- Contents of the SMS message.tag
- (optional) This is a text string containing your own reference ID for this transactionnotifyUrl
- (optional) A fully-qualified HTTP/S callback URL on your web server to be notified when the SMS has been delivered
HoiioException
public Map<String,Object> smsGetRate(String dest, String msg) throws HoiioException
dest
- The recipient number of the SMS in E.164 format (e.g. +6511111111).msg
- (optional) If provided, an estimate of the number of multipart SMS and total cost of sending this message will be included in the response. Otherwise, the rate per multipart SMS will be returned.
HoiioException
public Map<String,Object> smsQueryStatus(String txnRef) throws HoiioException
txnRef
- The unique reference ID for the required transaction.
HoiioException
public Map<String,Object> smsGetHistory(Date from, Date to, Integer page) throws HoiioException
from
- (optional) Retrieve SMS history made by this app starting from this date/time in "YYYY-MM-DD HH:MM:SS" (GMT+8) format. E.g. "2010-01-01 00:00:00". If omitted, SMS history will be retrieved from the earliest transaction.to
- (optional) Retrieve SMS history made by this app before this date/time in "YYYY-MM-DD HH:MM:SS" (GMT+8) format. E.g. "2010-01-01 00:00:00". If omitted, SMS history will be retrieved up to the current point of time.page
- (optional) Each request returns a maximum of 100 entries. This parameter indicates which subset of entries to return. If omitted, the first page will be retrieved.
HoiioException
public Map<String,Object> ivrDial(String msg, String dest, String callerID, String tag, String notifyUrl) throws HoiioException
msg
- (optional) The message that you want to play after the call is answered. Max 500 characters.dest
- The destination number to call in E.164 format (e.g. +6511111111).callerID
- (optional) The Caller ID that the destination number will see on their incoming calltag
- (optional) This is a text string containing your own reference ID for this transactionnotifyUrl
- (optional) A fully-qualified HTTP/S URL on your web server to be notified when this action has completed execution
HoiioException
public Map<String,Object> ivrPlay(String session, String msg, String tag, String notifyUrl) throws HoiioException
session
- The unique session ID for this particular call. (returned in one of the start blocks: dial or answer)msg
- (optional) This is the message that you want to play to the user. Max 500 characters.tag
- (optional) This is a text string containing your own reference ID for this transactionnotifyUrl
- (optional) A fully-qualified HTTP/S URL on your web server to be notified when this action has completed execution
HoiioException
public Map<String,Object> ivrGather(String session, String msg, Integer maxDigits, Integer timeout, Integer attempts, String tag, String notifyUrl) throws HoiioException
session
- The unique session ID for this particular call. (returned in one of the start blocks: dial or answer)msg
- (optional) This is the message that you want to play to the user. Max 500 characters.maxDigits
- (optional) the maximum digits people can entertimeout
- (optional) the time that user need to input the responseattempts
- (optional) number of user attemptstag
- (optional) This is a text string containing your own reference ID for this transactionnotifyUrl
- A fully-qualified HTTP/S URL on your web server to be notified when this action has completed execution
HoiioException
public Map<String,Object> ivrRecord(String session, String msg, String maxDuration, String tag, String notifyUrl) throws HoiioException
session
- The unique session ID for this particular call. (returned in one of the start blocks: dial or answer)msg
- (optional) This is the message that you want to play to the user. Max 500 characters.maxDuration
- (optional) maximum time of the recordtag
- (optional) This is a text string containing your own reference ID for this transactionnotifyUrl
- A fully-qualified HTTP/S URL on your web server to be notified when this action has completed execution
HoiioException
public Map<String,Object> ivrTransfer(String session, String msg, String dest, String callerID, String tag, String notifyUrl) throws HoiioException
session
- The unique session ID for this particular call. (returned in one of the start blocks: dial or answer)msg
- (optional) This is the message that you want to play to the user. Max 500 characters.dest
- the destination to transfer the call tocallerID
- (optional) the callerID of the calltag
- (optional) This is a text string containing your own reference ID for this transactionnotifyUrl
- (optional) A fully-qualified HTTP/S URL on your web server to be notified when this action has completed execution
HoiioException
public Map<String,Object> ivrHangup(String session, String msg, String tag, String notifyUrl) throws HoiioException
session
- The unique session ID for this particular call. (returned in one of the start blocks: dial or answer)msg
- (optional) This is the message that you want to play to the user. Max 500 characters.tag
- (optional) This is a text string containing your own reference ID for this transactionnotifyUrl
- (optional) A fully-qualified HTTP/S URL on your web server to be notified when this action has completed execution
HoiioException
public Map<String,String> parseNotify(String notify)
notify
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |