Extended Routing extends a routing group to one of your customers, optionally together with the tariff to be applied. A customer can only be assigned a routing group, or extend one to its own customers, once that routing group has been extended to it.

All methods below support trusted mode, in which case the i_wholesaler (integer) parameter should be supplied. Entries are owned by that wholesaler, and only its own entries can be listed, read, changed or deleted. When the call is authenticated instead, i_wholesaler is ignored and the authenticated customer is used.

createExtendedRouting()

Available since version Softswitch 2025 and FreightSwitch 2025.

Extends a routing group to a customer. The ROOT customer may extend any existing routing group; a wholesaler below ROOT may only extend a routing group that has been extended to it in turn.

Parameters:

  • i_customer - Customer the routing group is extended to. Must be a customer of the wholesaler the call is made on behalf of. Integer. Required.
  • i_routing_group - Routing group to extend. The group must not already be extended to this customer and must not be the routing group the customer is assigned to. Integer. Required.
  • i_tariff - Tariff applied to the calls routed through this entry. The tariff must be owned by the wholesaler, must be a normal tariff and its currency must match the customer's base currency. 0 selects the customer's own tariff and is only accepted below ROOT; ROOT must supply a tariff. Integer. Optional.
  • description - Entry description (max 128 chars). String. Optional.

Returns:

  • result - OK means that the entry has been created. String.
  • i_extended_routing - the identifier assigned to the new entry. Integer.

Faults:

  • "Routing Group" field is mandatory. - i_routing_group was not supplied or is not a positive value.
  • Conflicting Extended Routing entry already exists. - the routing group is already extended to this customer.
  • You cannot use this Routing Group. - the routing group does not exist, is the one the customer is already assigned to, or has not been extended to the wholesaler.
  • "Tariff" field is mandatory. - ROOT supplied no tariff, or a negative i_tariff was supplied.
  • You cannot use this Tariff. - the tariff is not owned by the wholesaler, is not a normal tariff, or its currency does not match the customer's currency. When i_tariff is 0, the customer and the wholesaler do not share a base currency.
  • Customer not found. - i_customer is not a customer of the wholesaler.
  • A required parameter is missing or a supplied parameter has an invalid value.

listExtendedRouting()

Available since version Softswitch 2024 and FreightSwitch 2024.

Allows retrieving the extended routing entries that the wholesaler has created for one of its customers.

Parameters:

  • i_customer - Customer whose entries are returned. Must be a customer of the wholesaler. Integer. Required.
  • limit - Maximum number of rows to return. Defaults to 50. Integer. Optional.
  • offset - Number of matching rows to skip before returning results. Defaults to 0. Integer. Optional.

Returns:

  • result - OK. String.
  • extended_routing - list of extended routing structures:
    • i_extended_routing - entry identifier. Integer.
    • i_wholesaler - identifier of the customer owning the entry. Integer.
    • i_customer - identifier of the customer the routing group is extended to. Integer.
    • i_routing_group - routing group identifier. Integer.
    • i_tariff - tariff identifier; nil when the customer's own tariff is used. Integer.
    • description - entry description. String.
  • pagination - pagination metadata:
    • page - the current page number (1-based). Integer.
    • items_per_page - the requested limit. Integer.
    • total_items - the total number of entries matching the parameter filters, ignoring limit/offset. Integer.

Faults:

  • Customer not found. - i_customer is not a customer of the wholesaler.
  • A required parameter is missing or a supplied parameter has an invalid value.

getExtendedRoutingInfo()

Available since version Softswitch 2025 and FreightSwitch 2025.

Allows retrieving the attributes of a single extended routing entry. The entry must belong to the wholesaler the call is made on behalf of.

Parameters:

  • i_extended_routing - Entry identifier. Integer. Required.

Returns:

  • result - OK means that the entry has been found. String.
  • extended_routing - extended routing structure:
    • i_extended_routing - entry identifier. Integer.
    • i_wholesaler - identifier of the customer owning the entry. Integer.
    • i_customer - identifier of the customer the routing group is extended to. Integer.
    • i_routing_group - routing group identifier. Integer.
    • i_tariff - tariff identifier; nil when the customer's own tariff is used. Integer.
    • description - entry description. String.

Faults:

  • Extended routing not found. - the entry does not exist or belongs to another wholesaler.
  • A required parameter is missing or a supplied parameter has an invalid value.

updateExtendedRouting()

Available since version Softswitch 2025 and FreightSwitch 2025.

Updates an existing extended routing entry. Only the tariff and the description can be changed; the customer and the routing group are fixed when the entry is created.

Parameters:

  • i_extended_routing - Identifier of the entry to update. Integer. Required.
  • i_tariff - New tariff. The same rules as for createExtendedRouting() apply: the tariff must be owned by the wholesaler, must be a normal tariff and its currency must match the customer's base currency. 0 selects the customer's own tariff and is only accepted below ROOT. Integer. Optional.
  • description - New entry description (max 128 chars). String. Optional.
  • i_customer - Accepted so that a listExtendedRouting() structure can be sent back unchanged. It must match the current value of the entry. Integer. Optional.
  • i_routing_group - Accepted so that a listExtendedRouting() structure can be sent back unchanged. It must match the current value of the entry. Integer. Optional.

Returns:

  • result - OK means that the entry has been updated. String.
  • i_extended_routing - identifier of the updated entry. Integer.

Faults:

  • Extended routing not found. - the entry does not exist or belongs to another wholesaler.
  • Changing i_customer is not allowed. - a different i_customer was supplied.
  • Changing i_routing_group is not allowed. - a different i_routing_group was supplied.
  • "Tariff" field is mandatory. - ROOT attempted to clear the tariff, or a negative i_tariff was supplied.
  • You cannot use this Tariff. - the tariff is not owned by the wholesaler, is not a normal tariff, or its currency does not match the customer's currency. When i_tariff is 0, the customer and the wholesaler do not share a base currency.
  • A required parameter is missing or a supplied parameter has an invalid value.

deleteExtendedRouting()

Available since version Softswitch 2025 and FreightSwitch 2025.

Deletes an extended routing entry, withdrawing the customer's access to the routing group. The entry cannot be deleted while the customer has passed the routing group on, either by extending it to one of its own customers or by assigning it to one of them.

Parameters:

  • i_extended_routing - Identifier of the entry to delete. Integer. Required.

Returns:

  • result - OK means that the entry has been deleted. String.
  • i_extended_routing - identifier of the deleted entry. Integer.

Faults:

  • Extended routing not found. - the entry does not exist or belongs to another wholesaler.
  • Cannot delete Extended Routing entry. - the customer has extended the routing group to one of its own customers or assigned it to one of them.
  • A required parameter is missing or a supplied parameter has an invalid value.