Add an IVR
Add and configure an IVR.
Request URL
POST {base_url}/{api_path}/ivr/create?access_token={access_token}
Request parameters
Parameter | Required | Type | Description |
---|---|---|---|
number | Yes | String | IVR number. |
name | Yes | String | IVR name. |
prompt | Yes | String | The name of the IVR prompt. Valid value:
Note:
|
prompt_repeat | Yes | Integer | The maximum number of times the IVR prompt will be
repeated. Valid value: |
resp_timeout | Yes | Integer | The timeout duration for callers to input keys after playing
the IVR prompt (Unit: Second). Valid value:
Note: If no input is received after the
timeout, the system will repeat the IVR prompt until the
maximum number of times is reached. If there is still no
input after the timeout, the call will be routed to the
Timeout Destination. |
digit_timeout | Yes | Integer | The timeout duration between the caller inputting a key and
the next key (Unit: Second). Valid value:
|
alert_info | No | String | The "Alert-info" Header in the INVITE request to trigger the IP phone to play distinctive ringtones when receiving an incoming call from this IVR. |
dial_ext_option | Yes | String | Whether to allow callers to dial extensions via
IVR. Valid value:
|
dial_ext_list | No | Array <Allow_Ext_List> | Extensions or extension groups that callers are allowed to call within the IVR. |
restrict_dial_ext_list | No | Array <Restrict_Ext_List> | Extensions or extension groups that callers are prohibited from calling within the IVR. |
enb_dial_call_number | No | Integer | Whether to allow callers to directly dial ring group, queue,
and conference room numbers via the IVR. Valid value:
|
dial_call_number_list | No | Array <Allow_Call_Number_List> | Ring group, queue, and conference room numbers that callers are allowed to call via the IVR. |
enb_dial_outb_routes | No | Integer | Whether to allow callers to use outbound routes to make
outbound calls from the IVR. Valid value:
|
dial_outb_route_list | No | Array <Allow_Route_List> | The outbound route that callers are allowed to use within the
IVR. |
enb_dial_check_vm | No | Integer | Whether to allow callers to check voicemail via
IVR. Valid value:
|
prompt_manger_enb | No | Integer | Whether to allow users to dial the feature code
#9 to modify the IVR prompt.Valid
value:
|
prompt_manger_password | No | String | The password for modifying IVR prompts. |
pressX_dest | No | String | The destination type of key X. Note: X refers to a
specific number between 0 and 9. Valid value:
|
pressX_dest_prefix | No | String |
This parameter defines different settings depending on the destination type of key X (pressX_dest). Note: X refers to a
specific number between 0 and 9.
|
pressX_dest_value | No | String | The destination of key X. This parameter
defines different settings depending on the destination type of
key X (pressX_dest). Note: X refers to a
specific number between 0 and 9.
|
allow_out_recordX | No | Integer | After a call has been routed to the destination of key
X, stop recording the call. Note: X refers to a
specific number between 0 and 9. Valid
value:
|
press_hash_dest | No | String | The destination type of key # .Valid value:
|
press_hash_dest_prefix | No | String | This parameter defines different settings depending on the
destination type of key # .
|
press_hash_dest_value | No | String | The destination of key # . This parameter
defines different settings depending on the destination type of
key # .
|
allow_out_record_hash | No | Integer | After a call has been routed to the destination of key
# , stop recording the call. Valid
value:
|
press_star_dest | No | String | The destination type of key * .Valid value:
|
press_star_dest_prefix | No | String | The parameter defines different settings depending on the
destination type of key * .
|
press_star_dest_value | No | String | The destination of key * . This parameter
defines different settings depending on the destination type of
key * .
|
allow_out_record_star | No | Integer | After a call has been routed to the destination of key
* , stop recording the call. Valid value:
|
timeout_dest | No | String | The destination type of Response Timeout. Note: Response Timeout occurs when
the system has played the prompt repeatedly for the maximum
number of times, but the caller has not taken any action
within the specified time. Valid value:
|
timeout_dest_prefix | No | String | This parameter defines different settings depending on the
destination type of Response Timeout.
|
timeout_dest_value | No | String | The destination of Response Timeout. This parameter
defines different settings depending on the destination type of
Response Timeout.
|
allow_out_record_timeout | No | Integer | After a call has been routed to the destination of
Response Timeout, stop recording the call.
Valid value:
|
invalid_dest | No | String | The destination type of invalid input. Valid value:
|
invalid_dest_prefix | No | String | This parameter defines different settings depending on the
destination type of invalid input.
|
invalid_dest_value | No | String | The destination of invalid input. This parameter defines
different settings depending on the destination type of invalid
input.
|
allow_out_record_invalid | No | Integer | After a call has been routed to the destination of invalid
input, stop recording the call. Valid value:
|
- Allow_Ext_List
-
Parameter Required Type Description value Yes String The ID of the extension / extension group / organization that callers are allowed to call. Note: You can use Get Menu Options to query ID of the desired extension, extension group, and organization.type Yes String The type of the object that callers are allowed to call. Valid value:
extension
ext_group
organization
- Restrict_Ext_List
-
Parameter Required Type Description value Yes String The ID of the extension / extension group / organization that callers are prohibited from calling. Note: You can use Get Menu Options to query ID of the desired extension, extension group, and organization.type Yes String The type of the object that callers are prohibited from calling. Valid value:
extension
ext_group
organization
- Allow_Call_Number_List
-
Parameter Required Type Description value Yes String The ID of the ring group / queue / conference that callers are allowed to call via the IVR. Note: You can use Get Menu Options to query ID of the desired ring group, queue, and conference.type Yes String The type of the object that callers are allowed to call via the IVR. ring_group
queue
conference
- Allow_Route_List
-
Parameter Required Type Description text No String The name of the outbound route that callers are allowed to use. value Yes String The ID of the outbound route that callers are allowed to use. Note: You can use Search Specific Outbound Routes to query the ID of the desired outbound route.
Response parameters
Parameter | Type | Description |
---|---|---|
errcode | Integer | Returned error code.
Note: You can check the error code and
error message in Error Code and Error Message.
|
errmsg | String | Returned message.
|
id | Integer | The unique ID of the IVR. |
Examples
POST /openapi/v1.0/ivr/create?access_token=sRuPSzYcPflKgdwSVpA1lhxlVLw0q0z1 HTTP/1.1
Host: 192.168.5.150:8088
Content-Type: application/json
{
"number": "6210",
"name": "VoiceMenu Navigator",
"prompt": "default",
"prompt_repeat": 3,
"resp_timeout": 3,
"digit_timeout": 3,
"alert_info": "",
"dial_ext_option": "allow",
"dial_ext_list": [
{
"value": "85",
"type": "extension"
},
{
"value": "86",
"type": "ext_group"
}
],
"enb_dial_outb_routes": 1,
"dial_outb_route_list": [
{
"text": "",
"value": "1"
}
],
"enb_dial_call_number": 1,
"dial_call_number_list": [
{
"value": "1",
"type": "conference"
},
{
"value": "1",
"type": "ring_group"
},
{
"value": "1",
"type": "queue"
}
],
"enb_dial_check_vm": 0,
"prompt_manger_enb": 0,
"prompt_manger_password": "",
"press2_dest": "extension",
"press2_dest_prefix": "",
"press2_dest_value": "85",
"allow_out_record2": 1,
"press3_dest": "play_greeting",
"press3_dest_prefix": "2",
"press3_dest_value": "IVR.wav",
"allow_out_record3": 1,
"press4_dest": "external_num",
"press4_dest_prefix": "155",
"press4_dest_value": "18691000000",
"allow_out_record4": 1,
"timeout_dest": "play_greeting",
"timeout_dest_prefix": "1",
"timeout_dest_value": "IVR.wav",
"allow_out_record_timeout": 1,
"invalid_dest": "play_prompt",
"invalid_dest_prefix": "1",
"invalid_dest_value": "IVR.wav",
"allow_out_record_invaild": 1
}
Response exampleHTTP/1.1 200 OK
{
"errcode": 0,
"errmsg": "SUCCESS",
"id": 9
}