编辑提示音选项

编辑系统的提示音选项。

请求 URL

POST {base_url}/{api_path}/prompt_preference/update?access_token={access_token}

请求参数

参数 是否必填 类型 说明
moh 否 String 等待音乐列表的名称。
注: 最大字符长度为 255。
call_fwd_prompt 否 String 呼叫前转等待音乐的类型。

Valid value:

  • moh: The MoH (music on hold) is played.
  • ring_tone: The ring tone is played.
invaild_num_prompt 否 String The prompt to be played when the dial number is invalid.

Valid value:

  • Empty string: No prompt is played.
  • The filename of a custom prompt: Corresponding prompt is played (e.g. demo.wav).
    注:
    • The maximum length is 255 characters.
    • 可使用 接口查询 the filename of the custom prompts using 搜索自定义提示音.
busy_line_prompt 否 String The prompt to be played when the trunk is busy.

Valid value:

  • Empty string: No prompt is played.
  • default: The default built-in prompt is played.
  • The filename of a custom prompt: Corresponding prompt is played (e.g. demo.wav).
    注:
    • The maximum length is 255 characters.
    • 可使用 接口查询 the filename of the custom prompts using 搜索自定义提示音.
dial_fail_prompt 否 String The prompt to be played when a dial failed.

Valid value:

  • Empty string: No prompt is played.
  • The filename of a custom prompt: Corresponding prompt is played (e.g. demo.wav).
    注:
    • The maximum length is 255 characters.
    • 可使用 接口查询 the filename of the custom prompts using 搜索自定义提示音.
event_center_prompt 否 String The prompt to be played to the notification contact when answering an event notification call.

Valid value:

  • Empty string: No prompt is played.
  • default: The default built-in prompt is played.
  • The filename of a custom prompt: Corresponding prompt is played (e.g. demo.wav).
    注:
    • The maximum length is 255 characters.
    • 可使用 接口查询 the filename of the custom prompts using 搜索自定义提示音.
enb_call_fwd_prompt 否 Integer 是否启用播放呼叫前转提示音。

取值范围:

  • 0:禁用
  • 1:启用
enb_call_waiting_prompt 否 Integer 是否启用播放呼叫等待提示音。

取值范围:

  • 0:禁用
  • 1:启用

响应参数

参数 类型 说明
errcode Integer 返回错误码。
  • 0:请求成功。
  • 非零值:请求失败。
注: 更多错误码和错误信息说明,请参见 错误码 & 错误信息。
errmsg String 返回信息。
  • SUCCESS:请求成功。
  • FAILURE:请求失败。

示例

请求示例

POST /openapi/v1.0/prompt_preference/update?access_token=gwakjgu9ZBUfz36wql4ndsVKkryI0kdj HTTP/1.1

Host: yeastardocs.example.yeastarcloud.com
Content-Type: application/json
{
  "enb_call_waiting_prompt": 0,
  "call_fwd_prompt": "ring_tone",
  "enb_call_fwd_prompt": 0
}

响应示例

HTTP/1.1 200 OK
{
  "errcode": 0,
  "errmsg": "SUCCESS"
}