Hoiio Open API

Definition

https://secure.hoiio.com/open/ivr/middle/unhold

Parameters

app_id* string
Application ID assigned to your application.
access_token* string
Access Token assigned to your application.
session* string
The unique session ID for this particular call.
tag string
This is a text string containing your own reference ID for this transaction. This value will be included in the response for Notification for your reference. Max 256 characters.
notify_url string
A fully-qualified HTTP/S URL on your web server to be notified when this action has completed execution. The length of this parameter must not exceed 4000 characters. See Controlling IVR Behavior for more details. If omitted, the call will hang up after msg is played, and the notification will not be sent to you.

Result Format

{"status":"success_ok"}

Documentation

The Unhold block resumes an IVR session that was put on hold with the Hold block. Once the IVR session is ready, we will post a notification to your specified notify URL.

Response Parameters

status The result of your request. Refer to Result Status for details.

Result Status

success_ok The request has been processed successfully.
error_invalid_http_method Invalid HTTP method. Only GET or POST are allowed.
error_malformed_params HTTP POST request parameters contains non-readable bytes.
error_X_param_missing A required parameter is missing. X is the name of the parameter that is missing.
error_invalid_access_token Your Access Token is invalid, expired or has been revoked.
error_invalid_app_id Your Application ID is invalid or has been revoked.
error_invalid_session The session is invalid.
error_session_access_denied You do not have access to this session.
error_session_ended The session is ended or expired.
error_session_not_on_hold The session is not on hold.
error_rate_limit_exceeded You have exceeded your request limit for this API. Refer to API Limits for details.
error_internal_server_error There is an unexpected error. Please contact Hoiio support for assistance.

Notifications

You will receive a notification to your application URL when the Unhold block has finished executing with the following parameters:

Notification Parameters

ivr_block his is an identifer for the type of block this notification is for. You can use this to differenciate between notifications. This block notification can be identified by the value unhold.
session This is a unique session ID for this particular call. Include this session in your subsequent requests to select what action to take next.
txn_ref The unique reference ID for this transaction.
from The incoming Caller ID of this call. Phone numbers start with a "+" and country code (E.164 format), e.g. +6511111111. This is present only if the call is an incoming call to a Hoiio Number.
to The dialed number of this call (your Hoiio Number). Phone numbers start with a "+" and country code (E.164 format), e.g. +6511111111. This is present only if the call is an incoming call to a Hoiio Number.
dest The destination number that was called. Phone numbers start with a "+" and country code (E.164 format), e.g. +6511111111. This is present only if the call is an outgoing call made via the Dial block.
tag Your own reference ID submitted in the initial request.
call_state The current state of this call. Possible values are:
  • ongoing - This call has been answered. You should follow up with one of the Middle or End blocks.
  • ended - This call has ended. You should not send any more requests for this call.
date Date/time (GMT+8) of this transaction in "YYYY-MM-DD HH:mm:SS" format. This is present only if call_state=ended.
duration Duration of the call in minutes. This is present only if call_state=ended.
currency Currency used for this transaction. Refer to Currency Code for the list of currency code. This is present only if call_state=ended.
rate Per-minute charges (sum of both incoming and outgoing call rates) for this call transaction. This is present only if call_state=ended.
debit Total amount billed for this transaction. This is present only if call_state=ended.

API Limits

None

Charges

The prevailing incoming or outgoing call rate applies. See Charges for Answer and Dial block for details.

If you use the Transfer block later on in this call, an additional outgoing call rate (depending on the destination number of the transfer) will be charged. For details of the incoming and outgoing call rate, please refer to the Pricing Section.