Query SIP Setting
Query the SIP settings of the PBX.
Request URL
GET {base_url}/{api_path}/sip_settings/get?access_token={access_token}
Request parameters
No request parameters. Send the request URL directly to query SIP setting.
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.
|
| data | Object<Sip_Settings> | The SIP settings of the PBX. |
- Sip_Settings
-
Parameter Type Description alert_info String The configuration of the Alert-Info header. caller_id_from String The SIP header from which the caller number is obtained. from: The From header.contact: The Contact header.rpid: The Remote-Party-ID header.pai: The P-Asserted-Identity header.ppi: The P-Preferred-Identity header.
client_call_assurance_list Array<Integer> The ID list of extensions for call assurance. This field takes effect when enb_client_call_assurance is 1. codec_sel String The preferred list of audio codecs, separated by a comma. The list order indicates the priority. cos_audio Integer The CoS priority value of audio RTP streams. Valid values: 0 to 7. cos_sip Integer The CoS priority value of SIP signaling. Valid values: 0 to 7. cos_video Integer The CoS priority value of video RTP streams. Valid values: 0 to 7. def_outbound_reg_expires Integer The default expiration time of outbound registration, in seconds. Valid values: 0 to 99999. did_from String The SIP header from which the DID number is obtained. to: The To header.invite: The INVITE URI.diversion: The Diversion header.rpid: The Remote-Party-ID header.pai: The P-Asserted-Identity header.ppi: The P-Preferred-Identity header.pcpid: The P-Called-Party-ID header.
disable_reinvite_with_t38 Integer Whether to disable the Re-INVITE for T.38 fax. 0: Disabled.1: Enabled.
enb_asserted_identity Integer Whether to enable the P-Asserted-Identity header. 0: Disabled.1: Enabled.
enb_autp_rtp Integer Whether to enable RTP passthrough. This field cannot be modified when call transcription is enabled. 0: Disabled.1: Enabled.
enb_client_call_assurance Integer Whether to enable call assurance. 0: Disabled.1: Enabled.
enb_ext_diversion Integer Whether to carry the Diversion header in extension call forwarding. 0: Disabled.1: Enabled.
enb_guest_auth Integer Whether to enable guest authentication. 0: Disabled.1: Enabled.
enb_inband_progress Integer Whether to enable Inband Progress. 0: Disabled.1: Enabled.
enb_message Integer Whether to enable the SIP MESSAGE method. 0: Disabled.1: Enabled.
enb_opus_codec Integer Whether to enable the Opus codec. 0: Disabled.1: Enabled.
enb_random_outbound Integer Whether to enable random outbound SIP ports. 0: Disabled.1: Enabled.
enb_t38_err_corr Integer Whether to enable T.38 error correction. 0: Disabled.1: Enabled.
enb_tcp Integer Whether to enable TCP transport. 0: Disabled.1: Enabled.
enb_tls Integer Whether to enable TLS transport. 0: Disabled.1: Enabled.
enb_tls_verify_client Integer Whether to verify the TLS client certificate. 0: Disabled.1: Enabled.
enb_tls_verify_server Integer Whether to verify the TLS server certificate. 0: Disabled.1: Enabled.
enb_uacsta Integer Whether to enable UACSTA. 0: Disabled.1: Enabled.
forward_dest String The destinations allowed for call forwarding, separated by a comma. extension: Extensions.ringgroup: Ring groups.queue: Queues.
ilbc_mode Integer The frame mode of the iLBC codec. 20: 20 ms.30: 30 ms.
max_reg_expires Integer The maximum expiration time of registration, in seconds. Valid values: 0 to 9999999. max_subs_expires Integer The maximum expiration time of subscription, in seconds. Valid values: 0 to 99999. max_t38_bitrate Integer The maximum transmission rate of T.38, in bits per second. Valid values: 2400, 4800, 7200, 9600, 12000, and 14400. min_reg_expires Integer The minimum expiration time of registration, in seconds. Valid values: 0 to 99999. min_subs_expires Integer The minimum expiration time of subscription, in seconds. Valid values: 0 to 99999. outbound_port_end Integer The end value of random outbound SIP ports. outbound_port_start Integer The start value of random outbound SIP ports. qualify_freq Integer The interval of qualify keep-alive detection, in seconds. Valid values: 0 to 86400. reg_attempts Integer The number of registration retries after a registration failure. Valid values: 0 to 99999. rtp_member_list Array<Option_Param> The member list of RTP passthrough (extension IDs). This field takes effect when rtp_member_type is specific. You can query the available values using the GET /openapi/v1.0/extension/list interface. rtp_member_type String The member type of RTP passthrough. all: All extensions.specific: Specified extensions.
rtp_port_end Integer The end value of RTP ports. rtp_port_start Integer The start value of RTP ports. rtp_trunk_list Array<Option_Param> The member list of RTP passthrough (trunk IDs). You can query the available values using the GET /openapi/v1.0/trunk/list interface. session_expires Integer The Session Timer expiration time, in seconds. Valid values: 90 to 99999. The value must not be smaller than session_min_interval. session_min_interval Integer The minimum interval of Session Timer, in seconds. Valid values: 90 to 99999. session_name String The SDP session name (the s= field). Maximum length: 32 characters. session_owner String The owner of the SDP session (the username part of the o= field). Maximum length: 32 characters. session_timer String The Session Timer mode. supported: Session timers are supported.no: Session timers are disabled.required: Session timers are required.forced: Session timers are forced.
tcp_port Integer The SIP TCP listening port. tls_conn_method String The TLS connection method. tlsv1: TLSv1.tlsv1_2: TLSv1.2.
tls_port Integer The SIP TLS listening port. tls_server_cert String The path of the TLS server certificate. Maximum length: 255 characters. Set the value to empty to clear the certificate configuration. tos_audio String The ToS/DSCP marking value of audio RTP streams. The value is a numeric string from 0 to 255. tos_sip String The ToS/DSCP marking value of SIP signaling. The value is a numeric string from 0 to 255. tos_video String The ToS/DSCP marking value of video RTP streams. The value is a numeric string from 0 to 255. udp_port Integer The SIP UDP listening port. user_agent String The custom value of the SIP User-Agent header. Maximum length: 255 characters.
- Option_Param
-
Parameter Type Description value String The ID of the extension or trunk in the list.
Example
Request example
GET /openapi/v1.0/sip_settings/get?access_token=xVx9wX2B38gSD0C2o4y9b9bd5QOPz2MK HTTP/1.1
Host: yeastardocs.example.yeastarcloud.com
Response example
HTTP/1.1 200 OK
{
"errcode": 0,
"errmsg": "SUCCESS",
"data": {
"udp_port": 5060,
"enb_tcp": 1,
"tcp_port": 5060,
"rtp_port_start": 10000,
"rtp_port_end": 20000,
"enb_random_outbound": 0,
"outbound_port_start": 5062,
"outbound_port_end": 5082,
"max_reg_expires": 3600,
"min_reg_expires": 600,
"qualify_freq": 120,
"reg_attempts": 0,
"def_outbound_reg_expires": 1800,
"max_subs_expires": 3600,
"min_subs_expires": 600,
"ilbc_mode": 20,
"codec_sel": "ulaw,alaw,gsm,vp8,h264,ilbc,g722,g726,g729",
"enb_tls": 1,
"tls_port": 5061,
"tls_server_cert": "",
"enb_tls_verify_client": 0,
"enb_tls_verify_server": 0,
"tls_conn_method": "tlsv1_2",
"session_timer": "supported",
"session_expires": 1800,
"session_min_interval": 90,
"tos_sip": "96",
"tos_audio": "184",
"tos_video": "136",
"cos_sip": 3,
"cos_audio": 5,
"cos_video": 6,
"disable_reinvite_with_t38": 0,
"enb_t38_err_corr": 0,
"max_t38_bitrate": 14400,
"caller_id_from": "from",
"did_from": "invite",
"user_agent": "",
"enb_guest_auth": 0,
"enb_message": 0,
"enb_inband_progress": 0,
"enb_uacsta": 1,
"alert_info": "alert-internal",
"enb_autp_rtp": 0,
"rtp_member_type": "all",
"enb_ext_diversion": 0,
"enb_opus_codec": 1,
"enb_asserted_identity": 0,
"forward_dest": "extension",
"enb_client_call_assurance": 0,
"session_name": "",
"session_owner": "",
"rtp_member_list": null,
"rtp_trunk_list": null,
"client_call_assurance_list": null
}
}