Query Inbound Route List

Query the inbound route list.

Request URL

GET {base_url}/{api_path}/inbound_route/list?access_token={access_token}

Request parameters

Table 1.
Parameter Required Type Description
page No Integer Define which page is displayed.
page_size No Integer Define how many records per page.
sort_by No String Define the sorting field.
Valid value:
  • id
  • pos
  • name
order_by No String Define the display order.

Valid value:

  • asc: Ascending order
  • desc: Descending order

Response parameters

Table 2.
Parameter Type Description
errcode Integer Returned error code.
  • 0: Succeed.
  • Non-zero value: Failed.
Note: You can check the error code and error message in Error Code and Error Message.
errmsg String Returned message.
  • SUCCESS: Succeed.
  • FAILURE: Failed.
total_number Integer The total number of inbound routes.
last_pos Integer The last position in the inbound route list.
data Array <Inroute_Info> The basic information of the inbound route.
Inroute_Info
Table 3.
Parameter Type Description
id Integer The unique ID of the inbound route.
pos Integer The current position of the inbound route in the list.
name String The name of the inbound route.
default_destination String The default destination of the inbound route.
  • disabled
  • end_call: Hang up
  • extension: Extension
  • pattern_to_ext: Match DID pattern to extensions
  • range_to_ext: Match DID range to extension range
  • pattern_to_ext_list: Match DID number(s) to extension(s) in one-to-one correspondence.
  • ext_vm: Extension voicemail
  • ivr: IVR
  • ring_group: Ring group
  • queue: Queue
  • group_vm: Group voicemail
  • conference: Conference
  • external_num: External number
  • outroute: Outbound route
  • play_greeting: Play greeting then hang up
  • fax_to_email: Fax to email
default_desination_value String The specific value of the default destination.
current_destination String The current destination of the inbound route.
  • end_call: Hang up
  • extension: Extension
  • pattern_to_ext: Match DID pattern to extensions
  • range_to_ext_dest: Match extension range
  • ext_vm: Extension voicemail
  • ivr: IVR
  • ring_group: Ring group
  • queue: Queue
  • group_vm: Group voicemail
  • conference: Conference
  • external_num: External number
  • outroute: Outbound route
  • play_greeting: Play greeting then hang up
  • fax_to_email: Fax to email
current_desination_value String The specific value of the current destination.
time_condition String Time-based routing mode.
  • disabled: Inbound calls are routed to the default condition.
  • global: Inbound calls are routed based on global business hours.
  • route_scope: Inbound calls are routed based on custom business hours.
  • custom: Inbound calls are routed based on custom time periods.
business_hours_destination String The destination for inbound calls during business hours.
  • disabled
  • end_call: Hang up
  • extension: Extension
  • pattern_to_ext: Match DID pattern to extensions
  • range_to_ext: Match DID range to extension range
  • pattern_to_ext_list: Match DID number(s) to extension(s) in one-to-one correspondence.
  • ext_vm: Extension voicemail
  • ivr: IVR
  • ring_group: Ring group
  • queue: Queue
  • group_vm: Group voicemail
  • conference: Conference
  • external_num: External number
  • outroute: Outbound route
  • play_greeting: Play greeting then hang up
  • fax_to_email: Fax to email
business_hours_destination_value String The specific value of business hours destination.
outside_business_hours_destination String The destination for inbound calls during outside business hours.
  • disabled
  • end_call: Hang up
  • extension: Extension
  • pattern_to_ext: Match DID pattern to extensions
  • range_to_ext: Match DID range to extension range
  • pattern_to_ext_list: Match DID number(s) to extension(s) in one-to-one correspondence.
  • ext_vm: Extension voicemail
  • ivr: IVR
  • ring_group: Ring group
  • queue: Queue
  • group_vm: Group voicemail
  • conference: Conference
  • external_num: External number
  • outroute: Outbound route
  • play_greeting: Play greeting then hang up
  • fax_to_email: Fax to email
outside_business_hours_destination_value String The specific value of outside business hours destination.
holidays_hours_destination String The destination for inbound calls during holidays.
  • disabled
  • end_call: Hang up
  • extension: Extension
  • pattern_to_ext: Match DID pattern to extensions
  • range_to_ext: Match DID range to extension range
  • pattern_to_ext_list: Match DID number(s) to extension(s) in one-to-one correspondence.
  • ext_vm: Extension voicemail
  • ivr: IVR
  • ring_group: Ring group
  • queue: Queue
  • group_vm: Group voicemail
  • conference: Conference
  • external_num: External number
  • outroute: Outbound route
  • play_greeting: Play greeting then hang up
  • fax_to_email: Fax to email
holidays_hours_destination_value String The specific value of holidays destination.
time_condition_value Array <Time_Condition_Info> The information of time condition.
Note: This parameter is displayed only when time_condition is set to route_scope or custom.
Time_Condition_Info
Parameter Type Description
days_of_week String Days of week.
  • mon
  • tue
  • wed
  • thu
  • fri
  • sat
  • sun
times String Period of time.

Examples

Request example

GET /openapi/v1.0/inbound_route/list?page=1&page_size=20&sort_by=pos&order_by=asc&access_token=VpTsz7k6XSOpfjDntqetBQ7nSE9QsbAN HTTP/1.1
Host: 192.168.5.150:8088

Response example

HTTP/1.1 200 OK
{
    "errcode": 0,
    "errmsg": "SUCCESS",
    "total_number": 5,
    "last_pos": 5,
    "data": [
        {
            "id": 52,
            "pos": 1,
            "name": "from-110",
            "default_destination": "extension",
            "current_destination": "extension",
            "time_condition": "disabled",
            "default_desination_value": "2005-Kristin Hale",
            "current_desination_value": "2005-Kristin Hale"
        },
        {
            "id": 48,
            "pos": 2,
            "name": "from41",
            "default_destination": "ring_group",
            "current_destination": "ring_group",
            "time_condition": "disabled",
            "default_desination_value": "Support",
            "current_desination_value": "6300-Support"
        },
        {
            "id": 49,
            "pos": 3,
            "name": "from-35",
            "default_destination": "disabled",
            "current_destination": "end_call",
            "time_condition": "custom",
            "time_condition_value": [
                {
                    "days_of_week": "mon tue",
                    "times": [
                        "09:15-12:00"
                    ]
                }
            ],
            "business_hours_destination": "end_call",
            "outside_business_hours_destination_value": "39",
            "holidays_hours_destination": "ivr",
            "holidays_hours_destination_value": "Holiday"
        },
        {
            "id": 50,
            "pos": 4,
            "name": "from-34",
            "default_destination": "disabled",
            "current_destination": "ring_group",
            "time_condition": "route_scope",
            "current_desination_value": "6300-Support",
            "time_condition_value": [
                {
                    "days_of_week": "mon tue wed thu fri",
                    "times": [
                        "09:00-11:30",
                        "13:30-17:40"
                    ]
                }
            ],
            "business_hours_destination": "ring_group",
            "business_hours_destination_value": "Support",
            "outside_business_hours_destination": "ivr",
            "outside_business_hours_destination_value": "Self-Service",
            "holidays_hours_destination": "ivr",
            "holidays_hours_destination_value": "Holiday"
        },
        {
            "id": 53,
            "pos": 5,
            "name": "local_support",
            "default_destination": "disabled",
            "current_destination": "ring_group",
            "time_condition": "global",
            "current_desination_value": "6300-Support",
            "business_hours_destination": "ring_group",
            "business_hours_destination_value": "Support",
            "outside_business_hours_destination": "ivr",
            "outside_business_hours_destination_value": "Self-Service",
            "holidays_hours_destination": "ivr",
            "holidays_hours_destination_value": "Holiday"
        }
    ]
}