A connection is one gateway of a vendor: where the switch sends calls, how it authenticates, how many calls it may carry and how numbers and SIP headers are rewritten on the way out. These methods do the same as the Connections screen of a vendor in the panel.
createVendorConnection and updateVendorConnection take these fields, and the read methods return them together with i_connection. Required applies to createVendorConnection. Values of int fields marked “dictionary” come from getDictionary .
Name
Type
Required
Description
i_vendor
int
yes
ID of the vendor. Cannot be changed
name
string
yes
Connection Name
destination
string
yes
Destination : host name or IP of the gateway, with :port when it is not 5060
i_proto_transport
int
no
Protocol : 1 SIP/UDP, 2 H.323, 3 IAX2, 4 SIP/TCP, 5 SIP/TLS. Dictionary proto_transports
username
string
no
Username for SIP digest authentication towards the vendor
password
string
no
Password for SIP digest authentication. None removes it
capacity
int
no
Capacity : simultaneous calls on the connection
enforce_capacity
boolean
no
Enforce Capacity : reject calls above capacity instead of only counting them
max_cps
double
no
Max CPS : call attempts per second. None means unlimited
blocked
boolean
no
Blocked : take the connection out of routing
i_media_relay_type
int
no
Use Media Relay : When Necessary, Always or Never. Dictionary media_relay_types
i_media_relay
int
no
Preferred Media Relay . Dictionary media_relays
timeout_100
int
no
Reply Timeout, sec : wait for the first SIP reply before the next connection is tried
huntstop_scodes
string
no
Huntstop SIP Codes , comma-separated, for example 486,603
i_privacy_mode
int
no
Send Identity As . Dictionary privacy_modes
use_asserted_id
boolean
no
Use CLI As Identity
use_priv_id_as_cli
boolean
no
Use Identity As CLI
trusted_privacy_domain
boolean
no
Trusted Privacy Domain
outbound_proxy
string
no
Outbound Proxy . None for none
outbound_ip
string
no
Outbound IP : source IP of the signalling. None chooses it automatically
single_outbound_port
boolean
no
Single Outbound Port
from_domain
string
no
From Domain . None uses the switch’s IP
pass_ruri_params
string
no
Allowed RURI Params. , comma-separated without spaces, for example user
random_call_id
boolean
no
Random Call-Id
accept_redirects
boolean
no
Accept 3xx Redirects
redirect_depth_limit
int
no
Redirect Depth Limit , 1 to 20
ignore_lrn
boolean
no
Ignore LRN
enable_diversion
boolean
no
Enable Diversion
translation_rule
string
no
CLD Translation Rule for the called number
cli_translation_rule
string
no
CLI Translation Rule for the calling number
asserted_id_translation
string
no
Identity Tr. Rule
diversion_translation
string
no
Diversion Header Tr. Rule
qmon_acd_enabled
boolean
no
Monitor ACD Quality
qmon_acd_threshold
int
no
ACD Threshold, sec
qmon_asr_enabled
boolean
no
Monitor ASR Quality
qmon_asr_threshold
double
no
ASR Threshold, %
qmon_pdd_enabled
boolean
no
Monitor PDD Quality
qmon_pdd_threshold
double
no
PDD Threshold, sec
qmon_stat_window
int
no
Statistics Window : number of recent calls the metrics use
qmon_retry_interval
int
no
Retry Interval, sec
qmon_retry_batch
int
no
Retry Batch
qmon_action
string
no
Bad Quality Action : make_last_in_routing, block or notify_only. Dictionary qmon_actions
qmon_notification_enabled
boolean
no
Notify On Status Change
Creates a connection of a vendor.
The fields of the connection structure .
Name
Type
Description
result
string
OK
i_connection
int
ID of the new connection
call ( " createVendorConnection " , {
" name " : " Example Carrier primary " ,
" destination " : " 198.51.100.20:5060 " ,
" translation_rule " : " s/^00// " ,
{ " result " : " OK " , " i_connection " : 207 }
Changes a connection. Fields you leave out keep their values. The change applies to new calls at once.
Name
Type
Required
Description
i_connection
int
yes
ID of the connection
other fields
no
Any field of the connection structure except i_vendor
Name
Type
Description
result
string
OK
call ( " updateVendorConnection " , { " i_connection " : 207 , " blocked " : True } )
Deletes a connection. Routing group entries that used it stop matching.
Name
Type
Required
Description
i_connection
int
yes
ID of the connection
Name
Type
Description
result
string
OK
call ( " deleteVendorConnection " , { " i_connection " : 207 } )
Returns one connection.
Name
Type
Required
Description
i_connection
int
yes
ID of the connection
Name
Type
Description
result
string
OK
vendor_connection
struct
i_connection and the fields of the connection structure , including password
call ( " getVendorConnectionInfo " , { " i_connection " : 207 } )
" name " : " Example Carrier primary " ,
" destination " : " 198.51.100.20:5060 " ,
Returns the connections of one vendor.
Name
Type
Required
Description
i_vendor
int
yes
ID of the vendor
name_pattern
string
no
Filter by name, an SQL LIKE pattern: % matches any characters
limit
int
no
Return at most this many connections
offset
int
no
Skip this many connections first
Name
Type
Description
result
string
OK
vendor_connections
array
One struct per connection, with i_connection and the fields of the connection structure
call ( " getVendorConnectionsList " , { " i_vendor " : 41 , " name_pattern " : " %primary% " } )
{ " i_connection " : 207 , " name " : " Example Carrier primary " ,
" destination " : " 198.51.100.20:5060 " , " blocked " : False }, # … the other fields