Settings

Retrieve system settings

get

Retrieve settings for PortSIP PBX.

Authorizations
Responses
200
OK
application/json
get
GET /api/admin/settings HTTP/1.1
Host: hostname:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "user_agent": "PortSIP UC",
  "blocked_user_agents": "text",
  "enable_shared_address_space_address_range": true,
  "enable_digest_auth": true,
  "enable_auth_mid_dialog": false,
  "enable_digest_auth_int": false,
  "enable_external_recording": true,
  "enable_reject_bad_nonce": false,
  "statistics_log_interval": 600,
  "dead_session_timeout": 600,
  "enable_session_timer": true,
  "session_timer_duration": 3600,
  "enable_to_tag_in_register": false,
  "enable_congestion_management": true,
  "congestion_management_metric": "WAIT_TIME",
  "congestion_management_tolerance": 600,
  "enable_create_non_exist_extension": false,
  "enable_prack": false,
  "enable_tenant_level_trunk": true,
  "enable_diversion_support": false,
  "enable_history_info_support": false,
  "enable_outbound_support": true,
  "flow_timer": 0,
  "register_expiration_time": 300,
  "enable_auto_answer_alert_info_header": false,
  "auto_answer_alert_info_header": "INTERCOM",
  "enable_auto_answer_call_info_header": true,
  "enable_require_answer_mode": false,
  "enable_www_auth": false,
  "user_equal_required_for_auth_name": true,
  "trace_server_host": "text",
  "trace_server_port": 80,
  "web_failed_auth_amount": 5,
  "web_blacklist_time_interval": 3600,
  "sip_failed_auth_amount": 50,
  "sip_failed_challenge_requests_amount": 1000,
  "sip_blacklist_time_interval": 3600,
  "sip_detection_period": 10,
  "sip_barrier_1_packets": 5000,
  "sip_barrier_1_blocking_time": 3600,
  "sip_barrier_2_packets": 2000,
  "sip_barrier_2_blocking_time": 30,
  "stir_shaken_cert": "text",
  "stir_shaken_key": "text",
  "custom_options": "text"
}

Update system settings

post

Update settings for PortSIP PBX

Authorizations
Body
user_agentstring · min: 1 · max: 1024Optional

User agent.

Default: PortSIP UC
blocked_user_agentsstringOptional

The semicolon separated list of blocked user agents.

enable_shared_address_space_address_rangebooleanOptional

Enable Shared Address Space Address Range or not (RFC 6598).

Default: true
enable_digest_authbooleanOptional

Indicates if DIGEST authentication would be enabled.

Default: true
enable_auth_mid_dialogbooleanOptional

Indicates if PortSIP PBX requires authentication against all subsequent requests originated from one calling.

Default: false
enable_digest_auth_intbooleanOptional

Indicates if auth-int DIGEST authentication mode would be enabled.

Default: false
enable_external_recordingbooleanOptional

Allow external calls recording.

Default: true
enable_reject_bad_noncebooleanOptional

When a client sends a bad nonce in their credentials, return 403 message if this parameter is true, or send a new challenge if this parameter is false.

Default: false
statistics_log_intervalinteger · int32Optional

Interval for statistics logs, in seconds.

Default: 600
dead_session_timeoutinteger · int32Optional

Close the session if no RTP packets received within specified duration, in seconds.

Default: 600
enable_session_timerbooleanOptional

Indicates if session timer (RFC 4028) would be enabled. This also requires client support.

Default: true
session_timer_durationinteger · int32 · min: 90 · max: 3600Optional

Duration recorded by Session timer. Precondition: "enable_session_timer" MUST be set to true.

Default: 3600
enable_to_tag_in_registerbooleanOptional

Indicates if "to" tag is allowed in REGISTER message.

Default: false
enable_congestion_managementbooleanOptional

Indicates if congestion management would be enabled.

Default: true
congestion_management_metricstring · enumOptional

Precondition: "enable_congestion_management" parameter MUST be set to true. The recommended is WAIT_TIME based on the expected wait time for each FIFO.

  • WAIT_TIME:
  • TIME_DEPTH:
  • SIZE:
Possible values:
congestion_management_toleranceinteger · int32Optional

Precondition: "enable_congestion_management" parameter MUST be set to true. Congestion management tolerance for the given metric. This parameter determines when the Rejection Behavior changes.

Default: 600
enable_create_non_exist_extensionbooleanOptional

Indicates if the extension would be automatically created when a non-existent extension try to register. If it is set to true, when a non-included extension tries to send registry message to PBX, the PBX will create the extension with default password "portsip" automatically.

Default: false
enable_prackbooleanOptional

Enable prack or not.

Default: false
enable_tenant_level_trunkbooleanOptional

Whether to enable tenant-level trunk.

Default: true
enable_diversion_supportbooleanOptional

Enable Diversion support or not (RFC 5806).

Default: false
enable_history_info_supportbooleanOptional

Enable History-Info support (RFC 7044).

Default: false
enable_outbound_supportbooleanOptional

Enable Outbound Support or not (RFC 5626).

Default: true
flow_timerinteger · int32Optional

The flow timer interval in seconds.

Default: 0
register_expiration_timeinteger · min: 90 · max: 3600Optional

The register expiration time in seconds.

Default: 300
enable_auto_answer_alert_info_headerbooleanOptional

Enable call-info header for auto answer or not.

Default: false
auto_answer_alert_info_headerstring · enumOptional

Alert-info header to be added in INVITE message when PBX is forwarding the page/intercom. Values includes:

  • INTERCOM: info=intercom.
  • ALERT_AUTO_ANSWER: Alert-Info:;info=alert-autoanswer;delay=0.
  • AUTO_ANSWER: info=Auto Answer.
Possible values:
enable_auto_answer_call_info_headerbooleanOptional

Enable call-info header for auto answer. The value is "sip:portsip.com;answer-after=0".

Default: true
enable_require_answer_modebooleanOptional

Enable Require Answer Mode (RFC 5373) for auto answer.

Default: false
enable_www_authbooleanOptional

Enable WWW authentication or not.

Default: false
user_equal_required_for_auth_namebooleanOptional

User equal required for authentication name.

Default: true
trace_server_hoststringOptional

Tracer server host.

trace_server_portall ofOptional

The tracer server port.

integer · int32 · max: 65535Optional

A port number is a 16-bit unsigned integer, thus ranging from 0 to 65535. For TCP, port number 0 is reserved and cannot be used, while for UDP, the source port is optional and a value of zero means no port

Example: 80
web_failed_auth_amountinteger · int32Optional

Block if failed to login PortSIP PBX Web more than this times.

Default: 5
web_blacklist_time_intervalinteger · int32Optional

The web blocked time in seconds.

Default: 3600
sip_failed_auth_amountinteger · int32Optional

The number of authentication failures.

Default: 50
sip_failed_challenge_requests_amountinteger · int32Optional

DOS attacks can send REGISTER/INVITE requests but do not reply to Challenge (407). Configure the amount of "fake" requests that PortSIP PBX will accept per IP Address. If this value is exceeded in "Detection Period" interval the source IP address is put in the Blacklist. IP will remain blacklisted till "SIP Blacklist time interval" expires.

Default: 1000
sip_blacklist_time_intervalinteger · int32Optional

The sip blocked time in seconds.

Default: 3600
sip_detection_periodinteger · int32Optional

The detection period in seconds.

Default: 10
sip_barrier_1_packetsinteger · int32Optional

If the amount of packets is exceeded, the PBX will block the source IP for "Level 1 blacklist time interval" seconds.

Default: 5000
sip_barrier_1_blocking_timeinteger · int32Optional

This is the time interval in seconds that an abusive IP Address remains in the blacklist

Default: 3600
sip_barrier_2_packetsinteger · int32Optional

If the amount of packets is exceeded, the PBX will block the source IP for "Level 2 blacklist time interval" seconds.

Default: 2000
sip_barrier_2_blocking_timeinteger · int32Optional

This is the time interval in seconds that an abusive IP Address remains in the blacklist

Default: 30
stir_shaken_certstringOptional

Content of this certificate file for STIR/SHAKEN support.

stir_shaken_keystringOptional

Content of this private certificate file for STIR/SHAKEN support.

custom_optionsstringOptional

Some custom configuration options serialized as json string.

Responses
200
OK
post
POST /api/admin/settings HTTP/1.1
Host: hostname:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 1443

{
  "user_agent": "PortSIP UC",
  "blocked_user_agents": "text",
  "enable_shared_address_space_address_range": true,
  "enable_digest_auth": true,
  "enable_auth_mid_dialog": false,
  "enable_digest_auth_int": false,
  "enable_external_recording": true,
  "enable_reject_bad_nonce": false,
  "statistics_log_interval": 600,
  "dead_session_timeout": 600,
  "enable_session_timer": true,
  "session_timer_duration": 3600,
  "enable_to_tag_in_register": false,
  "enable_congestion_management": true,
  "congestion_management_metric": "WAIT_TIME",
  "congestion_management_tolerance": 600,
  "enable_create_non_exist_extension": false,
  "enable_prack": false,
  "enable_tenant_level_trunk": true,
  "enable_diversion_support": false,
  "enable_history_info_support": false,
  "enable_outbound_support": true,
  "flow_timer": 0,
  "register_expiration_time": 300,
  "enable_auto_answer_alert_info_header": false,
  "auto_answer_alert_info_header": "INTERCOM",
  "enable_auto_answer_call_info_header": true,
  "enable_require_answer_mode": false,
  "enable_www_auth": false,
  "user_equal_required_for_auth_name": true,
  "trace_server_host": "text",
  "trace_server_port": 80,
  "web_failed_auth_amount": 5,
  "web_blacklist_time_interval": 3600,
  "sip_failed_auth_amount": 50,
  "sip_failed_challenge_requests_amount": 1000,
  "sip_blacklist_time_interval": 3600,
  "sip_detection_period": 10,
  "sip_barrier_1_packets": 5000,
  "sip_barrier_1_blocking_time": 3600,
  "sip_barrier_2_packets": 2000,
  "sip_barrier_2_blocking_time": 30,
  "stir_shaken_cert": "text",
  "stir_shaken_key": "text",
  "custom_options": "text"
}

No content