A destination set is a vendor’s price list: a currency, per-call charges and one route per prefix. The panel shows destination sets as Termination Routes ; routing groups pair them with vendor connections. Use these methods to load a vendor’s routes from your own tools.
addRouteToDestinationSet and updateRouteInDestinationSet take these fields of a route.
Name
Type
Description
prefix
string
Destination prefix of the route (Prefix )
price_1
double
Price per minute for the first interval (Price 1 )
price_n
double
Price per minute for the next intervals (Price N )
interval_1
int
First billing interval in seconds (Interval 1, sec )
interval_n
int
Next billing intervals in seconds (Interval N, sec )
preference
int
Preference of the route; higher is tried first by the Route Preference policy. The panel default is 5
huntstop
int
1: do not try other connections after this route fails (Huntstop )
timeout_1xx
int
Seconds to wait for a provisional response (1xx Timeout, sec ). The panel default is 10
timeout
int
Seconds to wait for the answer (2xx Timeout, sec ). The panel default is 60
forbidden
boolean
True: never send this prefix to the vendor (Forbidden )
Creates a destination set.
Name
Type
Required
Description
name
string
yes
Name of the set
currency
string
yes
ISO 4217 code of the set’s prices, for example USD. Cannot be changed later
description
string
no
Free text
connect_fee
double
no
Charge per connected call (Connect Fee )
free_seconds
int
no
Free seconds at the start of a call (Free Seconds )
grace_period
int
no
Calls up to this length in seconds are not charged (Grace Period, sec )
post_call_surcharge
double
no
Surcharge after the call (Post Call Surcharge, % )
Name
Type
Description
result
string
OK
i_destination_set
int
ID of the new set
call ( " addDestinationSet " , { " name " : " Carrier A - wholesale " , " currency " : " USD " , " connect_fee " : 0.0 } )
{ " result " : " OK " , " i_destination_set " : 118 }
Returns destination sets with all their attributes.
Name
Type
Required
Description
name_pattern
string
no
Filter by name with SQL LIKE syntax: % matches any text
i_destination_set
int
no
Return only this set
Name
Type
Description
result
string
OK
list
array
One struct per set with the fields of addDestinationSet and i_destination_set
call ( " listDestinationSets " , { " name_pattern " : " Carrier A% " } )
{ " i_destination_set " : 118 , " name " : " Carrier A - wholesale " , " currency " : " USD " },
Adds a route to a destination set.
Name
Type
Required
Description
i_destination_set
int
yes
ID of the set
prefix
string
yes
Prefix of the route
other fields
no
Any field of the route structure
Name
Type
Description
result
string
OK
call ( " addRouteToDestinationSet " , {
" i_destination_set " : 118 ,
Changes the route of a prefix.
Name
Type
Required
Description
i_destination_set
int
yes
ID of the set
prefix
string
yes
Current prefix of the route
new_prefix
string
no
New prefix for the route
other fields
no
Any field of the route structure
Name
Type
Description
result
string
OK
call ( " updateRouteInDestinationSet " , { " i_destination_set " : 118 , " prefix " : " 4420 " , " price_1 " : 0.011 , " price_n " : 0.011 } )
Removes the route of a prefix from a destination set.
Name
Type
Required
Description
i_destination_set
int
yes
ID of the set
prefix
string
yes
Prefix of the route
Name
Type
Description
result
string
OK
call ( " delRouteFromDestinationSet " , { " i_destination_set " : 118 , " prefix " : " 4420 " } )
Removes every route of a destination set and keeps the set itself. The panel uses it for Delete All on the routes screen and does not offer it while an uploaded price list is being processed for the set; do the same in your integration.
Name
Type
Required
Description
i_destination_set
int
yes
ID of the set
Name
Type
Description
result
string
OK
call ( " deleteAllRoutesInDestinationSet " , { " i_destination_set " : 118 } )