|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.hoiio.sdk.services.HttpService
com.hoiio.sdk.services.VoiceService
public class VoiceService
The Voice API provides developers access to telephony
services in more than 200 countries around the world.
You will be able to initiate phone calls to any mobile phones,
land lines or create call conferences just by making an API request to our servers.
For more info please refer to: http://developer.hoiio.com/docs/voice.html
Constructor Summary | |
---|---|
VoiceService(String appId,
String accessToken)
Constructs the service to make all Voice requests |
Method Summary | |
---|---|
Conference |
createConference(List<String> dests)
Dials out to a list of destination numbers and place them together in a conference call. |
Conference |
createConference(List<String> dests,
String room,
String callerId,
String tag,
String notifyUrl)
Dials out to a list of destination numbers and place them together in a conference call. |
Conference |
createConference(String dest)
Dials out to a list of destination numbers and place them together in a conference call. |
Conference |
createConference(String dest,
String room,
String callerId,
String tag,
String notifyUrl)
Dials out to a list of destination numbers and place them together in a conference call. |
Call |
fetchCall(String txnRef)
Fetches the current status of a call made previously |
CallHistory |
fetchHistory()
Retrieves the history of calls made by this application. |
CallHistory |
fetchHistory(Date from,
Date to,
Integer page)
Retrieves the history of calls made by this application. |
CallRate |
fetchRate(String dest1,
String dest2)
Retrieves the billable rate that will be charged for calls made |
CallHangUp |
hangup(String txnRef)
Hangs up a call that is currently in progress |
CallTxn |
makeCall(String dest2)
Dials out to 2 destination numbers and connect them together in a phone conversation. |
CallTxn |
makeCall(String dest1,
String dest2,
String callerId,
String tag,
String notifyUrl)
Dials out to 2 destination numbers and connect them together in a phone conversation. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public VoiceService(String appId, String accessToken)
appId
- AppID of the developeraccessToken
- AccessToken of the developerMethod Detail |
---|
public Conference createConference(List<String> dests) throws HoiioException
dests
- List of destination numbers in E.164 format (start with a "+" and country code) to be called and placed in the conference room. A maximum of 8 numbers are allowed.
HoiioException
public Conference createConference(List<String> dests, String room, String callerId, String tag, String notifyUrl) throws HoiioException
dests
- List of destination numbers in E.164 format (start with a "+" and country code) to be called and placed in the conference room. A maximum of 8 numbers are allowed.room
- (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) This is 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 transaction. This value will be included in the response for Notification, FetchVoice and FetchHistory for your reference. Max 256 characters.notifyUrl
- (optional) A fully-qualified HTTP/S callback URL on your web server to be notified when a call ends
HoiioException
public Conference createConference(String dest) throws HoiioException
dest
- A comma-seperated list of destination numbers in E.164 format (start with a "+" and country code) to be called and placed in the conference room. A maximum of 8 numbers are allowed. E.g. +6511111111,+6522222222,+6533333333
HoiioException
public Conference createConference(String dest, String room, String callerId, String tag, String notifyUrl) throws HoiioException
dest
- A comma-seperated list of destination numbers in E.164 format (start with a "+" and country code) to be called and placed in the conference room. A maximum of 8 numbers are allowed. E.g. +6511111111,+6522222222,+6533333333room
- (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) This is 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 transaction. This value will be included in the response for Notification, FetchVoice and FetchHistory for your reference. Max 256 characters.notifyUrl
- (optional) A fully-qualified HTTP/S callback URL on your web server to be notified when a call ends
HoiioException
public Call fetchCall(String txnRef) throws HoiioException
txnRef
- The unique reference ID for the required transaction.
HoiioException
public CallHistory fetchHistory() throws HoiioException
HoiioException
public CallHistory fetchHistory(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.
HoiioException
public CallRate fetchRate(String dest1, String dest2) throws HoiioException
dest1
- The first number to call. Phone numbers should start with a "+" and country code (E.164 format), e.g. +6511111111.dest2
- The second number to call. Phone numbers should start with a "+" and country code (E.164 format), e.g. +6511111111.
HoiioException
public CallHangUp hangup(String txnRef) throws HoiioException
txnRef
- The unique reference ID for the call you want to hangup.
HoiioException
public CallTxn makeCall(String dest2) throws HoiioException
dest2
- The second number to call. Phone numbers should start with a "+" and country code (E.164 format), e.g. +6511111111. This cannot be the same as your mobile number.
HoiioException
public CallTxn makeCall(String dest1, String dest2, String callerId, String tag, String notifyUrl) throws HoiioException
dest1
- (optional) The first number to call. Phone numbers should start with a "+" and country code (E.164 format), e.g. +6511111111. This cannot be the same as dest2 parameter.dest2
- The second number to call. Phone numbers should start with a "+" and country code (E.164 format), e.g. +6511111111. This cannot be the same as dest1 parameter.callerId
- (optional) This is the Caller ID that dest2 will see on their incoming calltag
- (optional) This is a text string containing your own reference ID for this transaction. This value will be included in the response for Notification, FetchVoice and FetchHistory for your reference. Max 256 characters.notifyUrl
- (optional) A fully-qualified HTTP/S callback URL on your web server to be notified when the call ends.
HoiioException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |