Перейти к содержимому

Manage incoming routes

Это содержимое пока не доступно на вашем языке.

An account has one incoming route for on-net calls and one for each of its DIDs. Each route delivers calls either to the registered account or to one of the account’s trunks. These methods do the same as the Incoming Routing screen of an account. Routes are not added or deleted through these methods.

Both methods support trusted mode with i_customer.

Name Type Description
i_incoming_route int ID of the route
i_did int Source: ID of the DID the calls come to. Nil for on-net calls
did string The DID number
i_trunk int Destination: ID of the trunk the calls go to. Nil for the registered account
trunk_name string Name of the trunk
i_forward_did_mode int Fwd DID Mode: how the DID is passed to the destination, see the table below
self_managed boolean Self Managed: the account can change the route’s destination in its self-care portal
i_forward_did_mode Name
1 Off
2 Forward DID in URI
3 Diversion Header

The list is also returned by getDictionary with name forward_did_modes, see Get system dictionaries.

Lists the incoming routes of an account.

Name Type Required Description
i_account int yes ID of the account
offset int no Skip this many routes
limit int no Return at most this many routes
Name Type Description
result string OK
incoming_routes array Routes, each a struct with the fields of the structure
request
call("getIncomingRoutesList", {"i_account": 3092})
response
{
"result": "OK",
"incoming_routes": [
{"i_incoming_route": 610, "i_did": None, "did": None, "i_trunk": None,
"trunk_name": None, "i_forward_did_mode": 3, "self_managed": False},
{"i_incoming_route": 611, "i_did": 845, "did": "442071234567", "i_trunk": 52,
"trunk_name": "PBX", "i_forward_did_mode": 2, "self_managed": True},
],
}

Changes the destination of a route.

Name Type Required Description
i_incoming_route int yes ID of the route
i_trunk int no Trunk of the same account. Nil delivers the calls to the registered account
i_forward_did_mode int no Forward DID mode. Only for DID routes
self_managed boolean no Let the account change the destination itself
Name Type Description
result string OK
request
call("updateIncomingRoute", {"i_incoming_route": 611, "i_trunk": 52, "i_forward_did_mode": 2})
response
{"result": "OK"}