Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Name

Type

Description

Required

Default value

name

string

The name of the trunk

yes

direction

string("in","out","all")

The direction of the trunk. The trunk can be incoming (value “in”), in which case incoming calls to DID can be received through the trunk, outgoing (value “out”), in which case outgoing calls can be routed through the trunk, and bidirectional (value “all”).

no

id

integer

The unique ID of the trunk. Read only.

-

-

network_permission_group_id

integer

The identifier of a group of trusted networks from which requests are allowed for this trunk. Applies to trunks with in and all direction

yes, if trunk direction is in or all

null

address

string

The address of the SIP server to which the call will be sent according to the routing rules. Applies to trunks with out and all directions. Specified as host:port. Host can be a domain name, ":port" is optional (5060 if not present). If it is necessary to use tcp protocol, then "host:port;tranport=tcp"

yes, if trunk direction is out or all

null

status_in

string("active","blocked")

The status of the trunk for receiving incoming calls. If the parameter is set to blocked, then the system will return an error on an attempt to call the DID of this trunk.

no

blocked

status_out

string("active","blocked"

The status of the trunk for receiving outgoing calls. If the parameter is set to blocked, then an attempt to make an external call through this trunk will fail.

no

blocked

sbc_mode

string

Enable (“yes” value) or disable (“no” value) sbc mode for the trunk. If SBC mode is enabled, the media for calls going through the trunk will go through the same address as the SIP messages.

no

strip

integer

The number of characters that will be removed from the beginning of the number when an outgoing call is sent through this trunk.

no

null

pri_prefix

string

The prefix that will be added to the beginning of the number when sending an outgoing call through this trunk.

no

null

auth_username

string

The username for authorization when sending an outgoing call through this trunk.

no

null

auth_pass

string

The user password for authorization when sending an outgoing call through this trunk.

no

null

from_username

string

The username in the “From” field when sending an outgoing call through this trunk.

no

null

from_domain

string

The domain in the “From” field when sending an outgoing call through this trunk.

no

null

insert_internal_user

string("yes","no")

If the parameter is set to "yes", then when sending an outgoing call through the trunk to an external SIP server, the Ringme-user header will be added to the INVITE packet, which will contain the full name of the extension from which the call is made, in the format with a domain prefix: domain_prefix*client_prefix*extension_number

no

yes

super_trunk_ip

array(string)

A list of addresses in the form ip[:port] to check if calls from them can be used to call to any DID or extension. Addresses are unique within the entire PBX.

no

[]

any_extension

string{"yes","no")

If the call is from "super_trunk_ip", to a global extension (xxxx*xxx*xxx), then it is allowed if the parameter is set to "yes".

no

no

any_did

string("yes","no")

If the call is from "super_trunk_ip", to a DID number, then it is allowed if the parameter value is "yes".

no

no

channel_limit

integer

The maximum number of simultaneous channels used by the trunk. Incoming/outgoing are summarized. With a value of "0" there is no limit.

no

0

in_anumber_rule_id

integer

On an incoming call from the trunk, converts the A-number according to the corresponding dialing rules

no

null

out_anumber_rule_id

integer

On a call going to the trunk, converts the A-number (“From” field) according to the corresponding dialing rules

no

null

use_dns_srv

Anchor
dns_srv
dns_srv

boolean

When the "use_dns_srv" option is enabled, if the "address" parameter of the trunk is specified as a domain without a port, then the SRV records of this domain are analyzed and if an outgoing call to one address fails (timeout), the call will be sent to another. The availability timeout for each address is set to 6 seconds (instead of 30 with use_dns_srv=false)

For example, "address" = srvtest.ucom4b.com 

  1. For srvtest.ucom4b.com

$ host -t srv _sip._udp.srvtest.ucom4b.com
_sip._udp.srvtest.ucom4b.com has SRV record 10 50 5067 srvpbx1.ucom4b.com.
_sip._udp.srvtest.ucom4b.com has SRV record 20 50 5068 srvpbx2.ucom4b.com.
Then, if srvpbx1.ucom4b.com:5067 is unavailable, the call will be directed to srvpbx1.ucom4b.com:5068 (Priority 10 and 20 respectively)

2. For srvtest.ucom4b.com

$ host -t srv _sip._udp.srvtest.ucom4b.com
_sip._udp.srvtest.ucom4b.com has SRV record 20 50 5067 srvpbx1.ucom4b.com.
_sip._udp.srvtest.ucom4b.com has SRV record 20 50 5068 srvpbx2.ucom4b.com.
The calls will leave and be reserved by SRV records randomly (Priority is the same)

3. There is more than one A record for srvtest.ucom4b.com but no SRV records: calls will leave and reserve on A records randomly


Important: if "address" is specified with a port, then the reservation logic does not work in any way: the call is sent to the first available A record of the domain.

no

false

history_info

boolean

Trunk property: when sending an invite to the trunk, replace the Diversion field (if exist) with History-info in form:

History-Info: <sip:+79785550032@10.50.150.57:5061;transport=udp?reason=SIP%3Bcause%3D408%3Btext%3D%22User%20No%20Reply%22&Privacy=none>;index=1

History-Info: <sip:D25019183706818@10.50.150.52:6000;transport=udp>;index=1.1

no

false

...