编辑SIP设置

编辑PBX的SIP设置。

请求 URL

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

请求参数

参数 是否必填 类型 说明
alert_info 否 String Alert-Info 头域配置。
caller_id_from 否 String 主叫号码来源的 SIP 头域。

取值范围:

  • from:From 头域。
  • contact:Contact 头域。
  • rpid:Remote-Party-ID 头域。
  • pai:P-Asserted-Identity 头域。
  • ppi:P-Preferred-Identity 头域。
client_call_assurance_list 否 Array<Integer> 呼叫保障指定的分机 ID 列表。enb_client_call_assurance 为 1 时该字段生效。
codec_sel 否 String 音频编解码器的首选列表,多个编解码器用英文逗号分隔,列表顺序即优先级。
cos_audio 否 Integer 音频 RTP 流的 CoS 优先级。取值为 0 到 7。
cos_sip 否 Integer SIP 信令的 CoS 优先级。取值为 0 到 7。
cos_video 否 Integer 视频 RTP 流的 CoS 优先级。取值为 0 到 7。
def_outbound_reg_expires 否 Integer 出局注册的默认有效期(秒)。取值为 0 到 99999。
did_from 否 String DID 号码来源的 SIP 头域。

取值范围:

  • to:To 头域。
  • invite:INVITE URI。
  • diversion:Diversion 头域。
  • rpid:Remote-Party-ID 头域。
  • pai:P-Asserted-Identity 头域。
  • ppi:P-Preferred-Identity 头域。
  • pcpid:P-Called-Party-ID 头域。
disable_reinvite_with_t38 否 Integer 是否在 T.38 传真时禁用 Re-INVITE。

取值范围:

  • 0:禁用。
  • 1:启用。
enb_asserted_identity 否 Integer 是否启用 P-Asserted-Identity 头域。

取值范围:

  • 0:禁用。
  • 1:启用。
enb_autp_rtp 否 Integer 是否启用 RTP 透传。通话转录已开启时禁止修改该字段。

取值范围:

  • 0:禁用。
  • 1:启用。
enb_client_call_assurance 否 Integer 是否开启呼叫保障。

取值范围:

  • 0:禁用。
  • 1:启用。
enb_ext_diversion 否 Integer 分机呼叫转移时是否携带 Diversion 头域。

取值范围:

  • 0:禁用。
  • 1:启用。
enb_guest_auth 否 Integer 是否启用访客认证。

取值范围:

  • 0:禁用。
  • 1:启用。
enb_inband_progress 否 Integer 是否启用 Inband Progress。

取值范围:

  • 0:禁用。
  • 1:启用。
enb_message 否 Integer 是否启用 SIP MESSAGE 方法。

取值范围:

  • 0:禁用。
  • 1:启用。
enb_opus_codec 否 Integer 是否启用 Opus 编解码器。

取值范围:

  • 0:禁用。
  • 1:启用。
enb_random_outbound 否 Integer 是否启用随机出站 SIP 端口。

取值范围:

  • 0:禁用。
  • 1:启用。
enb_t38_err_corr 否 Integer 是否启用 T.38 错误校正。

取值范围:

  • 0:禁用。
  • 1:启用。
enb_tcp 否 Integer 是否启用 TCP 传输。

取值范围:

  • 0:禁用。
  • 1:启用。
enb_tls 否 Integer 是否启用 TLS 传输。

取值范围:

  • 0:禁用。
  • 1:启用。
enb_tls_verify_client 否 Integer 是否验证 TLS 客户端证书。

取值范围:

  • 0:禁用。
  • 1:启用。
enb_tls_verify_server 否 Integer 是否验证 TLS 服务器证书。

取值范围:

  • 0:禁用。
  • 1:启用。
enb_uacsta 否 Integer 是否启用 UACSTA。

取值范围:

  • 0:禁用。
  • 1:启用。
forward_dest 否 String 允许呼叫前转的目的地,多个目的地用英文逗号分隔。

取值范围:

  • extension:分机。
  • ringgroup:响铃组。
  • queue:队列。
ilbc_mode 否 Integer iLBC 编解码的帧模式。

取值范围:

  • 20:20 毫秒。
  • 30:30 毫秒。
max_reg_expires 否 Integer 注册的最大有效期(秒)。取值为 0 到 9999999。
max_subs_expires 否 Integer 订阅的最大有效期(秒)。取值为 0 到 99999。
max_t38_bitrate 否 Integer T.38 的最大传输速率(bps)。取值为 2400、4800、7200、9600、12000 或 14400。
min_reg_expires 否 Integer 注册的最小有效期(秒)。取值为 0 到 99999。
min_subs_expires 否 Integer 订阅的最小有效期(秒)。取值为 0 到 99999。
outbound_port_end 否 Integer 出站 SIP 随机端口的结束值。
outbound_port_start 否 Integer 出站 SIP 随机端口的起始值。
qualify_freq 否 Integer Qualify 保活检测的频率(秒)。取值为 0 到 86400。
reg_attempts 否 Integer 注册失败后的重试次数。取值为 0 到 99999。
rtp_member_list 否 Array<Option_Param> RTP 透传的分机成员列表(分机 ID 集合)。rtp_member_type 为 specific 时该字段生效。
rtp_member_type 否 String RTP 透传的分机成员类型。

取值范围:

  • all:所有分机。
  • specific:指定分机。
rtp_port_end 否 Integer RTP 端口的结束值。
rtp_port_start 否 Integer RTP 端口的起始值。
rtp_trunk_list 否 Array<Option_Param> RTP 透传的中继成员列表(中继 ID 集合)。
session_expires 否 Integer Session Timer 的超时时间(秒)。取值为 90 到 99999,且必须不小于 session_min_interval。
session_min_interval 否 Integer Session Timer 的最小间隔(秒)。取值为 90 到 99999。
session_name 否 String SDP 会话名称(s= 字段)。最大长度:32 个字符。
session_owner 否 String SDP 会话所有者(o= 字段的用户名部分)。最大长度:32 个字符。
session_timer 否 String Session Timer 模式。

取值范围:

  • supported:支持 Session Timer。
  • no:禁用 Session Timer。
  • required:要求 Session Timer。
  • forced:强制 Session Timer。
tcp_port 否 Integer SIP TCP 监听端口。
tls_conn_method 否 String TLS 连接方法。

取值范围:

  • tlsv1:TLSv1。
  • tlsv1_2:TLSv1.2。
tls_port 否 Integer SIP TLS 监听端口。
tls_server_cert 否 String TLS 服务器证书的路径。最大长度:255 个字符。传空可清空证书配置。
tos_audio 否 String 音频 RTP 流的 ToS/DSCP 标记值。为数字字符串,取值为 0 到 255。
tos_sip 否 String SIP 信令的 ToS/DSCP 标记值。为数字字符串,取值为 0 到 255。
tos_video 否 String 视频 RTP 流的 ToS/DSCP 标记值。为数字字符串,取值为 0 到 255。
udp_port 否 Integer SIP UDP 监听端口。
user_agent 否 String SIP User-Agent 头域的自定义值。最大长度:255 个字符。
force_ilbc_mode 否 Integer 是否强制修改 ilbc_mode。将 ilbc_mode 改为 30 且 Linkus 开启时,服务端返回参数错误并提示确认,需携带 force_ilbc_mode=1 重新提交。

取值范围:

  • 0:禁用。
  • 1:启用。
Option_Param
参数 类型 说明
value String 列表中的分机或中继 ID。

响应参数

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

示例

请求示例

POST /openapi/v1.0/sip_settings/update?access_token=xVx9wX2B38gSD0C2o4y9b9bd5QOPz2MK HTTP/1.1

Host: yeastardocs.example.yeastarcloud.com
Content-Type: application/json
{
    "user_agent": "API-Test-UA"
}

响应示例

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