List Inbound Routes

Use this endpoint to return a list of your inbound routes. From the list, you can then select routes to use as the primary and failover routes associated with a phone number, which is done using the Update Phone Number Routes endpoint.

Endpoint

GET /routes/

Request Parameters

  • limit
    integer

    Limits the number of items to retrieve. A maximum of 200 items can be retrieved.

  • page
    integer

    Sets the page to display.

  • pattern
    integer

    Indicates a pattern of integers to match against. This field supports partial matches. For example, if you enter 12066, all numbers that include 12066 are returned. There is no minimum number of integers on which you can search.

Documentation

  • routes

    Limits the number of items to retrieve. A maximum of 200 items can be retrieved.

    • route name - The name of the route assigned using Create an Inbound Route. It is further composed of:

    • type - The type assigned to the route when it was created. Will be HOST, PSTN, or URI. If no route type was assigned, SIP-REG is used as the default.

    • value - Value of the route, dependent on the type. This value is assigned to the route when created.

Example Request

This assumes that you have the Python API Wrapper installed and set up.

#Instantiate the Controller
irc = InboundRoutesController()

#List Inbound Routes
response = irc.list(limit=4,page=1)

                        

Example Request

This assumes that you have the PHP API Wrapper installed and set up.

#Instantiate the Controller
use FlowrouteNumbersLib\Controllers\InboundRoutesController;
use FlowrouteNumbersLib\APIException;

$irc = new InboundRoutesController();

use FlowrouteNumbersLib\Models\Route;

#List Inbound Routes
$response = $inbound->mlist(4,1);

                        

Example Request

This assumes that you have the Ruby API Wrapper installed and set up.

#Instantiate the Controller
irc = FlowrouteNumbers::InboundRoutesController.new()

#List Routes
response = irc.list(limit:4, page:1)

                    

Example Request

This assumes that you have the Node.js API Wrapper installed and set up.

/*
1. Load the Numbers v1 SDK and Node.js util module
2. Declare flowroutenumberslib path relative to your JS file
*/
var flowroute = require('./flowroutenumberslib'); 
var util = require('util');

//Define your callback function
var cb =  function(err, response){
  if(err){
    console.log(err);
  }
  console.log(util.inspect(response, false, null));
};

//List Routes
flowroute.InboundRoutesController.list(4, 1, cb);

                            

Example Response

200 OK

#Note: The following response is formatted for clarity only.
{
  "routes": [
    {
      "MyHost": {
        "type": "HOST",
        "value": "24.239.23.40:5060"
      },
      "cg2ui": {
        "type": "HOST",
        "value": "cg2ui.kevgriffin.com"
      },
      "AiDib": {
        "type": "URI",
        "value": "sips:AiDib@securedserver.com"
      },
      "gEtnQ": {
        "type": "URI",
        "value": "sips:gEtnQ@securedserver.com"
      }
    },
    {
      "next": "/v1/routes/?limit=4&page;=2"
    }
  ]
}